mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-13 05:10:07 +08:00
Use GNU triplet prefix for cross tcc compilers
Compatibility symlinks are put in place in case some script were relying on former names except for CMake since it was added after last release.
This commit is contained in:
parent
3352cb8aef
commit
bf2854d2a2
@ -195,58 +195,53 @@ macro(make_tcc native_name cross_name cross_enabled definitions tcc_sources libt
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
make_tcc("Win32" i386-win32 TCC_BUILD_WIN32
|
||||
make_tcc("Win32" i386-w64-mingw32 TCC_BUILD_WIN32
|
||||
"TCC_TARGET_I386;TCC_TARGET_PE"
|
||||
"${I386_SOURCES};tccpe.c"
|
||||
tiny_libmaker_32 "${LIBTCC1_I386_SOURCES};${LIBTCC1_WIN_SOURCES}" "win32/include;win32/include/winapi"
|
||||
)
|
||||
make_tcc("Win64" x86_64-win32 TCC_BUILD_WIN64
|
||||
make_tcc("Win64" x86_64-w64-mingw32 TCC_BUILD_WIN64
|
||||
"TCC_TARGET_X86_64;TCC_TARGET_PE"
|
||||
"${X86_64_SOURCES};tccpe.c"
|
||||
tiny_libmaker_64 "lib/alloca86_64.S;${LIBTCC1_WIN_SOURCES}" "win32/include;win32/include/winapi"
|
||||
)
|
||||
make_tcc("WinCE" arm-win32 TCC_BUILD_WINCE
|
||||
make_tcc("WinCE" arm-wince-mingw32ce TCC_BUILD_WINCE
|
||||
"TCC_TARGET_ARM;TCC_ARM_VERSION=${TCC_ARM_VERSION};TCC_TARGET_PE"
|
||||
"${ARM_SOURCES};tccpe.c"
|
||||
"" "" ""
|
||||
)
|
||||
make_tcc("i386" i386 TCC_BUILD_I386
|
||||
make_tcc("i386" i386-linux-gnu TCC_BUILD_I386
|
||||
TCC_TARGET_I386
|
||||
"${I386_SOURCES}"
|
||||
tiny_libmaker_32 "${LIBTCC1_I386_SOURCES}" ""
|
||||
)
|
||||
make_tcc("x86_64" x86_64 TCC_BUILD_X64
|
||||
make_tcc("x86_64" x86_64-linux-gnu TCC_BUILD_X64
|
||||
TCC_TARGET_X86_64
|
||||
"${X86_64_SOURCES}"
|
||||
tiny_libmaker_64 "lib/alloca86_64.S" ""
|
||||
)
|
||||
set(ARM_DEFINITIONS TCC_TARGET_ARM TCC_ARM_VERSION=${TCC_ARM_VERSION})
|
||||
make_tcc("ARM" arm TCC_BUILD_ARM
|
||||
"${ARM_DEFINITIONS};WITHOUT_LIBTCC"
|
||||
"${ARM_SOURCES}"
|
||||
"" "" ""
|
||||
)
|
||||
make_tcc("" arm-eabihf TCC_BUILD_ARM_EABIHF
|
||||
make_tcc("" arm-linux-gnueabihf TCC_BUILD_ARM_EABIHF
|
||||
"${ARM_DEFINITIONS};TCC_ARM_EABI;TCC_ARM_HARDFLOAT"
|
||||
"${ARM_SOURCES}"
|
||||
"" "" ""
|
||||
)
|
||||
make_tcc("" arm-eabi TCC_BUILD_ARM_EABI
|
||||
make_tcc("" arm-linux-gnueabi TCC_BUILD_ARM_EABI
|
||||
"${ARM_DEFINITIONS};TCC_ARM_EABI"
|
||||
"${ARM_SOURCES}"
|
||||
"" "" ""
|
||||
)
|
||||
make_tcc("" arm-fpa TCC_BUILD_ARM_FPA
|
||||
make_tcc("" arm-linux-fpa TCC_BUILD_ARM_FPA
|
||||
"${ARM_DEFINITIONS}"
|
||||
"${ARM_SOURCES}"
|
||||
"" "" ""
|
||||
)
|
||||
make_tcc("" arm-fpa-ld TCC_BUILD_ARM_FPA_LD
|
||||
make_tcc("" arm-linux-fpa-ld TCC_BUILD_ARM_FPA_LD
|
||||
"${ARM_DEFINITIONS};LDOUBLE_SIZE=12"
|
||||
"${ARM_SOURCES}"
|
||||
"" "" ""
|
||||
)
|
||||
make_tcc("" arm-vfp TCC_BUILD_ARM_VFP
|
||||
make_tcc("" arm-linux-gnu TCC_BUILD_ARM_VFP
|
||||
"${ARM_DEFINITIONS};TCC_ARM_VFP"
|
||||
"${ARM_SOURCES}"
|
||||
"" "" ""
|
||||
|
34
Makefile
34
Makefile
@ -75,18 +75,30 @@ NATIVE_DEFINES += $(NATIVE_DEFINES_yes)
|
||||
ifeq ($(TOP),.)
|
||||
|
||||
PROGS=tcc$(EXESUF)
|
||||
I386_CROSS = i386-tcc$(EXESUF)
|
||||
WIN32_CROSS = i386-win32-tcc$(EXESUF)
|
||||
WIN64_CROSS = x86_64-win32-tcc$(EXESUF)
|
||||
WINCE_CROSS = arm-win32-tcc$(EXESUF)
|
||||
X64_CROSS = x86_64-tcc$(EXESUF)
|
||||
ARM_FPA_CROSS = arm-fpa-tcc$(EXESUF)
|
||||
ARM_FPA_LD_CROSS = arm-fpa-ld-tcc$(EXESUF)
|
||||
ARM_VFP_CROSS = arm-vfp-tcc$(EXESUF)
|
||||
ARM_EABI_CROSS = arm-eabi-tcc$(EXESUF)
|
||||
I386_CROSS = i386-linux-gnu-tcc$(EXESUF)
|
||||
WIN32_CROSS = i386-w64-mingw32-tcc$(EXESUF)
|
||||
WIN64_CROSS = x86_64-w64-mingw32-tcc$(EXESUF)
|
||||
WINCE_CROSS = arm-wince-mingw32ce-tcc$(EXESUF)
|
||||
X64_CROSS = x86_64-linux-gnu-tcc$(EXESUF)
|
||||
ARM_FPA_CROSS = arm-linux-fpa-tcc$(EXESUF)
|
||||
ARM_FPA_LD_CROSS = arm-linux-fpa-ld-tcc$(EXESUF)
|
||||
ARM_VFP_CROSS = arm-linux-gnu-tcc$(EXESUF)
|
||||
ARM_EABI_CROSS = arm-linux-gnueabi-tcc$(EXESUF)
|
||||
ARM_EABIHF_CROSS = arm-linux-gnueabihf-tcc$(EXESUF)
|
||||
ARM_CROSS = $(ARM_FPA_CROSS) $(ARM_FPA_LD_CROSS) $(ARM_VFP_CROSS) $(ARM_EABI_CROSS)
|
||||
C67_CROSS = c67-tcc$(EXESUF)
|
||||
|
||||
# Legacy symlinks for cross compilers
|
||||
$(I386_CROSS)_LINK = i386-tcc$(EXESUF)
|
||||
$(WIN32_CROSS)_LINK = i386-win32-tcc$(EXESUF)
|
||||
$(WIN64_CROSS)_LINK = x86_64-win32-tcc$(EXESUF)
|
||||
$(WINCE_CROSS)_LINK = arm-win32-tcc$(EXESUF)
|
||||
$(X64_CROSS)_LINK = x86_64-tcc$(EXESUF)
|
||||
$(ARM_FPA_CROSS)_LINK = arm-fpa-tcc$(EXESUF)
|
||||
$(ARM_FPA_LD_CROSS)_LINK = arm-fpa-ld-tcc$(EXESUF)
|
||||
$(ARM_VFP_CROSS)_LINK = arm-vfp-tcc$(EXESUF)
|
||||
$(ARM_EABI_CROSS)_LINK = arm-eabi-tcc$(EXESUF)
|
||||
|
||||
CORE_FILES = tcc.c libtcc.c tccpp.c tccgen.c tccelf.c tccasm.c tccrun.c
|
||||
CORE_FILES += tcc.h config.h libtcc.h tcctok.h
|
||||
I386_FILES = $(CORE_FILES) i386-gen.c i386-asm.c i386-asm.h i386-tok.h
|
||||
@ -124,6 +136,7 @@ NATIVE_FILES=$(ARM_FILES)
|
||||
PROGS_CROSS=$(I386_CROSS) $(X64_CROSS) $(WIN32_CROSS) $(WIN64_CROSS) $(C67_CROSS)
|
||||
LIBTCC1=libtcc1.a
|
||||
endif
|
||||
PROGS_CROSS_LINK=$(foreach PROG_CROSS,$(PROGS_CROSS),$($(PROG_CROSS)_LINK))
|
||||
|
||||
ifeq ($(TARGETOS),Darwin)
|
||||
PROGS+=tiny_libmaker$(EXESUF)
|
||||
@ -150,6 +163,7 @@ tcc$(EXESUF): tcc.o $(LIBTCC)
|
||||
# Cross Tiny C Compilers
|
||||
%-tcc$(EXESUF): tcc.c
|
||||
$(CC) -o $@ $< -DONE_SOURCE $(DEFINES) $(CPPFLAGS) $(CFLAGS) $(LIBS) $(LDFLAGS)
|
||||
$(if $($@_LINK),ln -sf $@ $($@_LINK))
|
||||
|
||||
# profiling version
|
||||
tcc_p$(EXESUF): $(NATIVE_FILES)
|
||||
@ -237,7 +251,7 @@ ifndef CONFIG_WIN32
|
||||
install: $(PROGS) $(TCCLIBS) $(TCCDOCS)
|
||||
mkdir -p "$(bindir)"
|
||||
ifeq ($(CC),tcc)
|
||||
$(INSTALL) -m755 $(PROGS) "$(bindir)"
|
||||
$(INSTALL) -m755 $(PROGS) $(PROGS_CROSS_LINK) "$(bindir)"
|
||||
else
|
||||
$(INSTALLBIN) -m755 $(PROGS) "$(bindir)"
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user