On an armeabi-v7a device (phone) in the termux app with clang & make installed this passes all the tests. Can be used as a cross compiler to create "native apps" as well. Example 'config-extra.mak' for the cross arm-eabi-tcc: SYSROOT = <path_to_android_ndk...>/sysroot/usr TRIPLET = arm-linux-androideabi ANDRVER = 32 ROOT-arm-eabi = $(SYSROOT) CRT-arm-eabi = {R}/lib/$(TRIPLET)/$(ANDRVER) LIB-arm-eabi = {B};{R}/lib/$(TRIPLET)/$(ANDRVER);{R}/lib/$(TRIPLET) INC-arm-eabi = {B}/lib/include;{R}/include/$(TRIPLET);{R}/include DEF-arm-eabi = -DTCC_TARGET_ARM -DTCC_ARM_VFP -DTCC_ARM_EABI DEF-arm-eabi += -DTARGETOS_ANDROID -DCONFIG_TCC_PIE -DCONFIG_NEW_DTAGS DEF-arm-eabi += -DCONFIG_TCC_ELFINTERP=\"/system/bin/linker\" # on unix replace ';' by ':'. $ ./configure && make cross-arm-eabi && make install
Showing the changes to include (1 of 14 files). Show all
Unified · Split
| @@ -125,6 +125,13 @@ · 124 unmodified lines | |||
| 125 | #define __FINITE_MATH_ONLY__ 1 | 125 | #define __FINITE_MATH_ONLY__ 1 |
| 126 | #define _FORTIFY_SOURCE 0 | 126 | #define _FORTIFY_SOURCE 0 |
| 127 | 127 | ||
| 128 | #elif defined __ANDROID__ | ||
| 129 | #define BIONIC_IOCTL_NO_SIGNEDNESS_OVERLOAD | ||
| 130 | #define __PRETTY_FUNCTION__ __FUNCTION__ | ||
| 131 | #define __has_builtin(x) 0 | ||
| 132 | #define _Nonnull | ||
| 133 | #define _Nullable | ||
| 134 | |||
| 128 | #else | 135 | #else |
| 129 | /* Linux */ | 136 | /* Linux */ |
| 130 | 137 | ||