@@ -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)