tcc android-enabled (armeabi-v7a)
commit09808f327f1d22c4cc5a2c7f96ba65be7ee9affa
authorgrischka <grischka>
Tue, 17 May 2022 20:28:32 +0000 (17 22:28 +0200)
committergrischka <grischka>
Sun, 24 Jul 2022 07:51:32 +0000 (24 09:51 +0200)
treee5e650935deff1a7056ae9a168b51b0ba7dc5071
parent8e860702e44ca1279098e0fc2142ad579774b1d2
tcc android-enabled (armeabi-v7a)

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
14 files changed:
Makefile
configure
conftest.c
include/tccdefs.h
lib/bcheck.c
libtcc.c
tcc.c
tccelf.c
tccgen.c
tccpp.c
tccrun.c
tests/Makefile
tests/tcctest.c
tests/tests2/Makefile