A native tcc for MSYS (Windows) must be i386-win-tcc.exe and not i386-tcc.exe
i386-tcc.exe is a compiler for i386 Linux. A HOST_OS variable in Makefile is introduced and used to select a native compiler (which one to name as tcc.exe)
This commit is contained in:
parent
25b2779c3d
commit
87ec08ecc8
2 changed files with 17 additions and 1 deletions
13
Makefile
13
Makefile
|
@ -89,6 +89,18 @@ $(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)
|
||||
|
||||
ifeq ($(HOST_OS),Windows)
|
||||
ifeq ($(ARCH),i386)
|
||||
PROGS:=$($(WIN32_CROSS)_LINK)
|
||||
$($(WIN32_CROSS)_LINK)_TCC = yes
|
||||
endif
|
||||
ifeq ($(ARCH),x86-64)
|
||||
PROGS:=$($(WIN64_CROSS)_LINK)
|
||||
$($(WIN64_CROSS)_LINK)_TCC = yes
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HOST_OS),Linux)
|
||||
ifeq ($(ARCH),i386)
|
||||
PROGS:=$($(I386_CROSS)_LINK)
|
||||
$($(I386_CROSS)_LINK)_TCC = yes
|
||||
|
@ -97,6 +109,7 @@ ifeq ($(ARCH),x86-64)
|
|||
PROGS:=$($(X64_CROSS)_LINK)
|
||||
$($(X64_CROSS)_LINK)_TCC = yes
|
||||
endif
|
||||
endif
|
||||
|
||||
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
|
||||
|
|
5
configure
vendored
5
configure
vendored
|
@ -47,11 +47,12 @@ tcc_elfinterp=""
|
|||
tcc_lddir=
|
||||
confvars=
|
||||
cpu=
|
||||
host_os=Linux
|
||||
|
||||
# OS specific
|
||||
targetos=`uname -s`
|
||||
case $targetos in
|
||||
MINGW32*) mingw32=yes;;
|
||||
MINGW32*) mingw32=yes; host_os=Windows; ;;
|
||||
DragonFly) noldl=yes;;
|
||||
OpenBSD) noldl=yes;;
|
||||
FreeBSD) noldl=yes;;
|
||||
|
@ -407,6 +408,7 @@ echo "cross compilers $build_cross"
|
|||
if test "$build_cross" = "no"; then
|
||||
echo "Target CPU $cpu"
|
||||
fi
|
||||
echo "Host OS $host_os"
|
||||
echo "Target OS $targetos"
|
||||
echo "Big Endian $bigendian"
|
||||
echo "gprof enabled $gprof"
|
||||
|
@ -435,6 +437,7 @@ CFLAGS=$CFLAGS
|
|||
LDFLAGS=$LDFLAGS
|
||||
LIBSUF=$LIBSUF
|
||||
EXESUF=$EXESUF
|
||||
HOST_OS=$host_os
|
||||
EOF
|
||||
if test "$mingw32" = "yes"; then
|
||||
cat >>config.mak <<EOF
|
||||
|
|
Loading…
Reference in a new issue