Index: Makefile.in ================================================================== --- Makefile.in +++ Makefile.in @@ -20,11 +20,11 @@ TCLCONFIGPATH = @TCLCONFIGPATH@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ tcllibdir = $(shell if echo "$(libdir)" | grep '^UNSPECIFIED' >/dev/null; then echo $(TCL_PACKAGE_PATH); else echo "$(libdir)"; fi) PACKAGE_INSTALL_DIR = $(tcllibdir)/$(PACKAGE_NAME)-$(PACKAGE_VERSION) -TCC_CONFIGURE_OPTS = --extra-cflags='$(CPPFLAGS) $(CFLAGS) -DCONFIG_TCC_STATIC=1' --with-tcl=$(TCLCONFIGPATH) --sysincludepaths='{B}/include:{B}/include/1:{B}/include/2:{B}/include/3:{B}/include/4:{B}/include/5:{B}/include/6:{B}/include/7:{B}/include/8:{B}/include/9' --libpaths='{B}/lib' @TCC_CONFIGURE_OPTS@ +TCC_CONFIGURE_OPTS = --cc='$(CC)' --extra-cflags='$(CPPFLAGS) $(CFLAGS) -DCONFIG_TCC_STATIC=1' --with-tcl=$(TCLCONFIGPATH) --sysincludepaths='{B}/include:{B}/include/1:{B}/include/2:{B}/include/3:{B}/include/4:{B}/include/5:{B}/include/6:{B}/include/7:{B}/include/8:{B}/include/9' --libpaths='{B}/lib' @TCC_CONFIGURE_OPTS@ INSTALL_HEADERS = tcl.h assert.h ctype.h errno.h float.h limits.h locale.h math.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h time.h wctype.h srcdir = @srcdir@ host_os = @host_os@ @SET_MAKE@ Index: build/tcc-patches/0.9.26/tcc-0.9.26-crosscompilefixes.diff ================================================================== --- build/tcc-patches/0.9.26/tcc-0.9.26-crosscompilefixes.diff +++ build/tcc-patches/0.9.26/tcc-0.9.26-crosscompilefixes.diff @@ -1,8 +1,8 @@ diff -uNr tcc-0.9.26.orig/configure tcc-0.9.26-1crosscompilefixes/configure --- tcc-0.9.26.orig/configure 2013-02-15 08:24:00.000000000 -0600 -+++ tcc-0.9.26-1crosscompilefixes/configure 2014-05-02 01:27:11.267140003 -0500 ++++ tcc-0.9.26-1crosscompilefixes/configure 2014-05-18 15:45:41.137516999 -0500 @@ -46,16 +46,8 @@ tcc_lddir= confvars= -cpu=`uname -m` @@ -74,11 +74,11 @@ + --os=*) targetos=`echo $opt | cut -d '=' -f 2-` + ;; --enable-gprof) gprof="yes" ;; --enable-mingw32) mingw32="yes" ; cross_prefix="i686-pc-mingw32-" ; cpu=x86 -@@ -181,6 +134,55 @@ +@@ -181,6 +134,66 @@ esac done +# OS specific +case $targetos in @@ -89,13 +89,24 @@ +esac + +case "$cpu" in + i386|i486|i586|i686|i86pc|BePC|i686-AT386) + cpu="x86" ++ case " ${cc} ${CFLAGS} " in ++ *' -m64 '*) ++ cpu="x86-64" ++ ;; ++ esac ++ + ;; + x86_64) + cpu="x86-64" ++ case " ${cc} ${CFLAGS} " in ++ *' -m32 '*) ++ cpu="x86" ++ ;; ++ esac + ;; + arm*) + case "$cpu" in + arm|armv4l) + cpuver=4 @@ -130,19 +141,27 @@ +esac + # Checking for CFLAGS if test -z "$CFLAGS"; then CFLAGS="-Wall -g -O2" -@@ -270,6 +272,8 @@ +@@ -270,6 +283,8 @@ --disable-static make libtcc.so instead of libtcc.a --disable-rpath disable use of -rpath with the above --with-libgcc use /lib/libgcc_s.so.1 instead of libtcc.a + --cpu=... Specify CPU + --os=... Specify OS --enable-mingw32 build windows version on linux with mingw32 --enable-cygwin build windows version on windows with cygwin --enable-cross build cross compilers +@@ -283,7 +298,6 @@ + exit 1 + fi + +-cc="${cross_prefix}${cc}" + ar="${cross_prefix}${ar}" + strip="${cross_prefix}${strip}" + diff -uNr tcc-0.9.26.orig/lib/Makefile tcc-0.9.26-1crosscompilefixes/lib/Makefile --- tcc-0.9.26.orig/lib/Makefile 2013-02-15 08:24:00.000000000 -0600 +++ tcc-0.9.26-1crosscompilefixes/lib/Makefile 2014-05-16 23:59:18.019016999 -0500 @@ -25,6 +25,12 @@ XCC = $(CC)