Check-in [8112d63e73]
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: 8112d63e73ccffb577e4acdb67c0eb3cc8dce898
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     18   PACKAGE_NAME = @PACKAGE_NAME@
    19     19   PACKAGE_VERSION = @PACKAGE_VERSION@
    20     20   
    21     21   TCLCONFIGPATH = @TCLCONFIGPATH@
    22     22   TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@
    23     23   tcllibdir = $(shell if echo "$(libdir)" | grep '^UNSPECIFIED' >/dev/null; then echo $(TCL_PACKAGE_PATH); else echo "$(libdir)"; fi)
    24     24   PACKAGE_INSTALL_DIR = $(tcllibdir)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
    25         -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@
           25  +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@
    26     26   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
    27     27   srcdir = @srcdir@
    28     28   host_os = @host_os@
    29     29   @SET_MAKE@
    30     30   
    31     31   all: $(TARGET)
    32     32   

Modified build/tcc-patches/0.9.26/tcc-0.9.26-crosscompilefixes.diff from [f12a7b0ba6] to [b603edb09a].

     1      1   diff -uNr tcc-0.9.26.orig/configure tcc-0.9.26-1crosscompilefixes/configure
     2      2   --- tcc-0.9.26.orig/configure	2013-02-15 08:24:00.000000000 -0600
     3         -+++ tcc-0.9.26-1crosscompilefixes/configure	2014-05-02 01:27:11.267140003 -0500
            3  ++++ tcc-0.9.26-1crosscompilefixes/configure	2014-05-18 15:45:41.137516999 -0500
     4      4   @@ -46,16 +46,8 @@
     5      5    tcc_lddir=
     6      6    confvars=
     7      7    
     8      8   -cpu=`uname -m`
     9      9   -
    10     10   -# OS specific
................................................................................
    72     72      --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
    73     73      ;;
    74     74   +  --os=*) targetos=`echo $opt | cut -d '=' -f 2-`
    75     75   +  ;;
    76     76      --enable-gprof) gprof="yes"
    77     77      ;;
    78     78      --enable-mingw32) mingw32="yes" ; cross_prefix="i686-pc-mingw32-" ; cpu=x86
    79         -@@ -181,6 +134,55 @@
           79  +@@ -181,6 +134,66 @@
    80     80      esac
    81     81    done
    82     82    
    83     83   +# OS specific
    84     84   +case $targetos in
    85     85   +  MINGW32*|mingw32*)  mingw32=yes;;
    86     86   +  DragonFly) noldl=yes;;
................................................................................
    87     87   +  OpenBSD)   noldl=yes;;
    88     88   +  *) ;;
    89     89   +esac
    90     90   +
    91     91   +case "$cpu" in
    92     92   +  i386|i486|i586|i686|i86pc|BePC|i686-AT386)
    93     93   +    cpu="x86"
           94  ++    case " ${cc} ${CFLAGS} " in
           95  ++      *' -m64 '*)
           96  ++        cpu="x86-64"
           97  ++        ;;
           98  ++    esac
           99  ++
    94    100   +  ;;
    95    101   +  x86_64)
    96    102   +    cpu="x86-64"
          103  ++    case " ${cc} ${CFLAGS} " in
          104  ++      *' -m32 '*)
          105  ++        cpu="x86"
          106  ++        ;;
          107  ++    esac
    97    108   +  ;;
    98    109   +  arm*)
    99    110   +    case "$cpu" in
   100    111   +      arm|armv4l)
   101    112   +        cpuver=4
   102    113   +      ;;
   103    114   +      armv5tel|armv5tejl)
................................................................................
   128    139   +    cpu="unknown"
   129    140   +  ;;
   130    141   +esac
   131    142   +
   132    143    # Checking for CFLAGS
   133    144    if test -z "$CFLAGS"; then
   134    145        CFLAGS="-Wall -g -O2"
   135         -@@ -270,6 +272,8 @@
          146  +@@ -270,6 +283,8 @@
   136    147      --disable-static         make libtcc.so instead of libtcc.a
   137    148      --disable-rpath          disable use of -rpath with the above
   138    149      --with-libgcc            use /lib/libgcc_s.so.1 instead of libtcc.a
   139    150   +  --cpu=...                Specify CPU
   140    151   +  --os=...                 Specify OS
   141    152      --enable-mingw32         build windows version on linux with mingw32
   142    153      --enable-cygwin          build windows version on windows with cygwin
   143    154      --enable-cross           build cross compilers
          155  +@@ -283,7 +298,6 @@
          156  + exit 1
          157  + fi
          158  + 
          159  +-cc="${cross_prefix}${cc}"
          160  + ar="${cross_prefix}${ar}"
          161  + strip="${cross_prefix}${strip}"
          162  + 
   144    163   diff -uNr tcc-0.9.26.orig/lib/Makefile tcc-0.9.26-1crosscompilefixes/lib/Makefile
   145    164   --- tcc-0.9.26.orig/lib/Makefile	2013-02-15 08:24:00.000000000 -0600
   146    165   +++ tcc-0.9.26-1crosscompilefixes/lib/Makefile	2014-05-16 23:59:18.019016999 -0500
   147    166   @@ -25,6 +25,12 @@
   148    167       XCC = $(CC)
   149    168      endif
   150    169     endif