Check-in [ade7e2c795]
Overview
SHA1:ade7e2c7953c35ec1ac2f7833f625b8e7184f545
Date: 2016-03-28 14:48:29
User: rkeene
Comment:Updated to try harder to determine the cross-tools prefix
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2016-03-28
14:53
[722e4d134f] tcc4tcl 0.26 (user: rkeene, tags: trunk, 0.26)
14:48
[ade7e2c795] Updated to try harder to determine the cross-tools prefix (user: rkeene, tags: trunk)
14:42
[f0f28f847f] Updated to not keep backup files when patching (user: rkeene, tags: trunk)
Changes

Modified configure.ac from [823490a303] to [a18fba2c9f].

    26     26   	TCC4TCL_TARGET=shared
    27     27   ])
    28     28   
    29     29   dnl Configure TCC build options
    30     30   AC_SUBST(TCC_CONFIGURE_OPTS)
    31     31   TCC_CONFIGURE_OPTS=""
    32     32   
    33         -dnl -- If cross-compiling, specify a "--cross-prefix" and define the CPU
    34         -if test "${host}" != "${build}"; then
    35         -	TCC_CONFIGURE_OPTS="${TCC_CONFIGURE_OPTS} --cross-prefix=${host_alias}- --cpu=${host_cpu} --os=${host_os}"
    36         -fi
    37         -
    38     33   if test "${TCC4TCL_TARGET}" = "shared"; then
    39     34   	dnl Determine how to make shared objects
    40     35   	DC_GET_SHOBJFLAGS
    41     36   
    42     37   	dnl Only export symbols we wish to expose
    43     38   	TARGET="tcc4tcl.${SHOBJEXT}"
    44     39   else
................................................................................
    48     43   	AC_CHECK_TOOL([AR], [ar])
    49     44   
    50     45   	TARGET="tcc4tcl-static.a"
    51     46   fi
    52     47   AC_SUBST(TARGET)
    53     48   AC_SUBST(TCC4TCL_TARGET)
    54     49   AC_SUBST(TCC_EXTRA_CFLAGS)
           50  +
           51  +dnl -- If cross-compiling, specify a "--cross-prefix" and define the CPU
           52  +if test "${host}" != "${build}"; then
           53  +	cross_prefix="`echo "${AR}" | sed 's@ .*$@@;s@-ar$@@'`"
           54  +	if test -z "${cross_prefix}"; then
           55  +		cross_prefix="`echo "${CC}" | sed 's@ .*$@@;s@-[[^-]]*$@@'`"
           56  +	fi
           57  +	if test -z "${cross_prefix}"; then
           58  +		cross_prefix="${host_alias}"
           59  +	fi
           60  +
           61  +	TCC_CONFIGURE_OPTS="${TCC_CONFIGURE_OPTS} --cross-prefix=${cross_prefix}- --cpu=${host_cpu} --os=${host_os}"
           62  +fi
    55     63   
    56     64   no_dlopen='0'
    57     65   AC_ARG_WITH([dlopen], AS_HELP_STRING([--without-dlopen], [do not define dlopen/dlclose/dlerror]), [
    58     66   	if test "$withval" = "no"; then
    59     67   		no_dlopen='1'
    60     68   	else
    61     69   		no_dlopen='0'