Check-in [ea645d2a50]
Overview
Comment:Added more cross-compiling support
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:ea645d2a5006cbfd78d5dec2bcf0115acffabbe4
User & Date: rkeene on 2014-05-02 06:29:30
Other Links: manifest | tags
Context
2014-05-02
06:41
Windows fixups check-in: b25d0baade user: rkeene tags: trunk
06:29
Added more cross-compiling support check-in: ea645d2a50 user: rkeene tags: trunk
05:39
Minor cleanup check-in: d2385ff774 user: rkeene tags: trunk
Changes

Added build/tcc-patches/0.9.26/tcc-0.9.26-crosscompilefixes.diff version [403c9c4668].

            1  +diff -uNr tcc-0.9.26.orig/configure tcc-0.9.26-1crosscompilefixes/configure
            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
            4  +@@ -46,16 +46,8 @@
            5  + tcc_lddir=
            6  + confvars=
            7  + 
            8  +-cpu=`uname -m`
            9  +-
           10  +-# OS specific
           11  + targetos=`uname -s`
           12  +-case $targetos in
           13  +-  MINGW32*)  mingw32=yes;;
           14  +-  DragonFly) noldl=yes;;
           15  +-  OpenBSD)   noldl=yes;;
           16  +-  *) ;;
           17  +-esac
           18  ++cpu=`uname -m`
           19  + 
           20  + # find source path
           21  + # XXX: we assume an absolute path is given when launching configure, 
           22  +@@ -68,47 +60,6 @@
           23  +     source_path_used="no"
           24  + fi
           25  + 
           26  +-case "$cpu" in
           27  +-  i386|i486|i586|i686|i86pc|BePC|i686-AT386)
           28  +-    cpu="x86"
           29  +-  ;;
           30  +-  x86_64)
           31  +-    cpu="x86-64"
           32  +-  ;;
           33  +-  arm*)
           34  +-    case "$cpu" in
           35  +-      arm|armv4l)
           36  +-        cpuver=4
           37  +-      ;;
           38  +-      armv5tel|armv5tejl)
           39  +-        cpuver=5
           40  +-      ;;
           41  +-      armv6j|armv6l)
           42  +-        cpuver=6
           43  +-      ;;
           44  +-      armv7a|armv7l)
           45  +-        cpuver=7
           46  +-      ;;
           47  +-    esac
           48  +-    cpu="armv4l"
           49  +-  ;;
           50  +-  alpha)
           51  +-    cpu="alpha"
           52  +-  ;;
           53  +-  "Power Macintosh"|ppc|ppc64)
           54  +-    cpu="powerpc"
           55  +-  ;;
           56  +-  mips)
           57  +-    cpu="mips"
           58  +-  ;;
           59  +-  s390)
           60  +-    cpu="s390"
           61  +-  ;;
           62  +-  *)
           63  +-    cpu="unknown"
           64  +-  ;;
           65  +-esac
           66  +-
           67  + for opt do
           68  +   eval opt=\"$opt\"
           69  +   case "$opt" in
           70  +@@ -156,6 +107,8 @@
           71  +   ;;
           72  +   --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
           73  +   ;;
           74  ++  --os=*) targetos=`echo $opt | cut -d '=' -f 2-`
           75  ++  ;;
           76  +   --enable-gprof) gprof="yes"
           77  +   ;;
           78  +   --enable-mingw32) mingw32="yes" ; cross_prefix="i686-pc-mingw32-" ; cpu=x86
           79  +@@ -181,6 +134,55 @@
           80  +   esac
           81  + done
           82  + 
           83  ++# OS specific
           84  ++case $targetos in
           85  ++  MINGW32*|mingw32*)  mingw32=yes;;
           86  ++  DragonFly) noldl=yes;;
           87  ++  OpenBSD)   noldl=yes;;
           88  ++  *) ;;
           89  ++esac
           90  ++
           91  ++case "$cpu" in
           92  ++  i386|i486|i586|i686|i86pc|BePC|i686-AT386)
           93  ++    cpu="x86"
           94  ++  ;;
           95  ++  x86_64)
           96  ++    cpu="x86-64"
           97  ++  ;;
           98  ++  arm*)
           99  ++    case "$cpu" in
          100  ++      arm|armv4l)
          101  ++        cpuver=4
          102  ++      ;;
          103  ++      armv5tel|armv5tejl)
          104  ++        cpuver=5
          105  ++      ;;
          106  ++      armv6j|armv6l)
          107  ++        cpuver=6
          108  ++      ;;
          109  ++      armv7a|armv7l)
          110  ++        cpuver=7
          111  ++      ;;
          112  ++    esac
          113  ++    cpu="armv4l"
          114  ++  ;;
          115  ++  alpha)
          116  ++    cpu="alpha"
          117  ++  ;;
          118  ++  "Power Macintosh"|ppc|ppc64)
          119  ++    cpu="powerpc"
          120  ++  ;;
          121  ++  mips)
          122  ++    cpu="mips"
          123  ++  ;;
          124  ++  s390)
          125  ++    cpu="s390"
          126  ++  ;;
          127  ++  *)
          128  ++    cpu="unknown"
          129  ++  ;;
          130  ++esac
          131  ++
          132  + # Checking for CFLAGS
          133  + if test -z "$CFLAGS"; then
          134  +     CFLAGS="-Wall -g -O2"
          135  +@@ -270,6 +272,8 @@
          136  +   --disable-static         make libtcc.so instead of libtcc.a
          137  +   --disable-rpath          disable use of -rpath with the above
          138  +   --with-libgcc            use /lib/libgcc_s.so.1 instead of libtcc.a
          139  ++  --cpu=...                Specify CPU
          140  ++  --os=...                 Specify OS
          141  +   --enable-mingw32         build windows version on linux with mingw32
          142  +   --enable-cygwin          build windows version on windows with cygwin
          143  +   --enable-cross           build cross compilers

Modified configure.ac from [cc0f388ad8] to [8b39413dfe].

    17     17   	else
    18     18   		TCC4TCL_TARGET=shared
    19     19   	fi
    20     20   ], [
    21     21   	TCC4TCL_TARGET=shared
    22     22   ])
    23     23   
           24  +dnl Configure TCC build options
           25  +AC_SUBST(TCC_CONFIGURE_OPTS)
    24     26   TCC_CONFIGURE_OPTS=""
           27  +
           28  +dnl -- If cross-compiling, specify a "--cross-prefix" and define the CPU
           29  +if test "${host}" != "${build}"; then
           30  +	TCC_CONFIGURE_OPTS="${TCC_CONFIGURE_OPTS} --cross-prefix=${host_alias}- --cpu=${host_cpu} --os=${host_os}"
           31  +fi
           32  +
    25     33   if test "${TCC4TCL_TARGET}" = "shared"; then
    26     34   	dnl Determine how to make shared objects
    27     35   	DC_GET_SHOBJFLAGS
    28     36   
    29     37   	dnl Only export symbols we wish to expose
    30     38   	DC_SETVERSIONSCRIPT([tcltcc.syms], [tcltcc.vers])
    31     39   	DC_FIND_STRIP_AND_REMOVESYMS([tcltcc.syms])
................................................................................
    32     40   
    33     41   	TARGET="tcltcc.${SHOBJEXT}"
    34     42   else
    35     43   	TARGET="tcltcc-static.a"
    36     44   fi
    37     45   AC_SUBST(TARGET)
    38     46   AC_SUBST(TCC4TCL_TARGET)
    39         -AC_SUBST(TCC_CONFIGURE_OPTS)
    40     47   
    41     48   dnl Find out if we have the functions needed to open shared objects
    42     49   AC_SEARCH_LIBS(dlopen, dl,, [
    43     50           AC_SEARCH_LIBS(shl_load, dld dl)
    44     51   ])
    45     52   AC_CHECK_FUNCS(dlopen shl_load)
    46     53