mirror of
https://github.com/mirror/tinycc.git
synced 2024-12-28 04:00:06 +08:00
2507c71704
This allow the tcc cross compilers to work as expected, when tcc was build with '--enable-cross' and a simple config-extra.mak (see the provided config-extra.mak.example). Make sure, that cross development packages for libc are installed Fixes also open bugs in various bug tracker. Example in debian: 940469 tcc: error: library 'c' not found tcc: error: file 'crtn.o' not found tcc: error: undefined symbol 'printf'
28 lines
1.2 KiB
Plaintext
28 lines
1.2 KiB
Plaintext
#
|
|
# during 'make', this file is included from the tcc Makefile
|
|
#
|
|
# this is an example, how to help tcc to find
|
|
# the c library and the startup files for cross compiling.
|
|
#
|
|
# we expect here, that the GNU libc is used and that the related development files
|
|
# are installed in a subdirectory with the target triplet used by gcc
|
|
#
|
|
|
|
# set CONFIG_TRIPLET for cross compiler targets
|
|
DEF-i386+= -UCONFIG_TRIPLET -DCONFIG_TRIPLET="\"i386-linux-gnu\" "
|
|
DEF-x86_64+=-UCONFIG_TRIPLET -DCONFIG_TRIPLET="\"x86_64-linux-gnu\" "
|
|
|
|
# many api/fp combinations are possible for arm
|
|
DEF-arm+=-UCONFIG_TRIPLET -DCONFIG_TRIPLET="\"arm-linux-gnueabihf\" "
|
|
DEF-arm64+= -UCONFIG_TRIPLET -DCONFIG_TRIPLET="\"aarch64-linux-gnu\" "
|
|
|
|
DEF-riscv64+= -UCONFIG_TRIPLET -DCONFIG_TRIPLET="\"riscv64-linux-gnu\" "
|
|
# For win32/win64 targets, we expect mingw 64
|
|
# is is for additional packes, as tcc has ist own win32 startfiles
|
|
DEF-i386-win32+= -UCONFIG_TRIPLET -DCONFIG_TRIPLET="\"i686-w64-mingw32\" "
|
|
DEF-x86_64-win32+= -UCONFIG_TRIPLET -DCONFIG_TRIPLET="\"x86_64-w64-mingw32\" "
|
|
|
|
# is a free cross compile toolchain for macos available?
|
|
#DEF-x86_64-osx+= -UCONFIG_TRIPLET -DCONFIG_TRIPLET="\"x86_64-apple-darwin\" "
|
|
#DEF-arm64-osx+= -UCONFIG_TRIPLET -DCONFIG_TRIPLET="\"aarch64-apple-darwin\" "
|