Overview
Comment: | Updated to pass compiler information to TCC and support basic multilib (-m32/-m64) compilers |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
8112d63e73ccffb577e4acdb67c0eb3c |
User & Date: | rkeene on 2014-05-18 20:46:57 |
Other Links: | manifest | tags |
Context
2014-05-18
| ||
21:05 | Win64 build fixes check-in: e89c02337a user: rkeene tags: trunk | |
20:46 | Updated to pass compiler information to TCC and support basic multilib (-m32/-m64) compilers check-in: 8112d63e73 user: rkeene tags: trunk | |
02:21 | tcc4tcl 0.10 check-in: ef02f1b927 user: rkeene tags: trunk, 0.10 | |
Changes
Modified Makefile.in from [d1e42a6427] to [d4f614c5a5].
︙ | ︙ | |||
18 19 20 21 22 23 24 | PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ 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) | | | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ 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 = --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@ all: $(TARGET) |
︙ | ︙ |
Modified build/tcc-patches/0.9.26/tcc-0.9.26-crosscompilefixes.diff from [f12a7b0ba6] to [b603edb09a].
1 2 | 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 | | | 1 2 3 4 5 6 7 8 9 10 | 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-18 15:45:41.137516999 -0500 @@ -46,16 +46,8 @@ tcc_lddir= confvars= -cpu=`uname -m` - -# OS specific |
︙ | ︙ | |||
72 73 74 75 76 77 78 | --cpu=*) cpu=`echo $opt | cut -d '=' -f 2` ;; + --os=*) targetos=`echo $opt | cut -d '=' -f 2-` + ;; --enable-gprof) gprof="yes" ;; --enable-mingw32) mingw32="yes" ; cross_prefix="i686-pc-mingw32-" ; cpu=x86 | | > > > > > > > > > > > | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | --cpu=*) cpu=`echo $opt | cut -d '=' -f 2` ;; + --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,66 @@ esac done +# OS specific +case $targetos in + MINGW32*|mingw32*) mingw32=yes;; + DragonFly) noldl=yes;; + OpenBSD) noldl=yes;; + *) ;; +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 + ;; + armv5tel|armv5tejl) |
︙ | ︙ | |||
128 129 130 131 132 133 134 | + cpu="unknown" + ;; +esac + # Checking for CFLAGS if test -z "$CFLAGS"; then CFLAGS="-Wall -g -O2" | | > > > > > > > > | 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | + cpu="unknown" + ;; +esac + # Checking for CFLAGS if test -z "$CFLAGS"; then CFLAGS="-Wall -g -O2" @@ -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) endif endif |
︙ | ︙ |