Check-in [5dde744f4b]
Overview
SHA1:5dde744f4bf460a070d26281d4016db1a6848f59
Date: 2016-03-30 03:20:48
User: rkeene
Comment:Better sanitization of "AR" and "CC" when trying to figure out the cross-prefix
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2016-12-09
04:36
[a72b70810b] Updated configure system to latest version of macros (user: rkeene, tags: trunk)
2016-03-30
03:20
[5dde744f4b] Better sanitization of "AR" and "CC" when trying to figure out the cross-prefix (user: rkeene, tags: trunk)
2016-03-28
14:57
[7edb5d1dd6] Ticket [cc1af09637]: Add additional subcommands to error message (user: rkeene, tags: trunk)
Changes

Modified configure.ac from [a18fba2c9f] to [09c35b571c].

    46     46   fi
    47     47   AC_SUBST(TARGET)
    48     48   AC_SUBST(TCC4TCL_TARGET)
    49     49   AC_SUBST(TCC_EXTRA_CFLAGS)
    50     50   
    51     51   dnl -- If cross-compiling, specify a "--cross-prefix" and define the CPU
    52     52   if test "${host}" != "${build}"; then
    53         -	cross_prefix="`echo "${AR}" | sed 's@ .*$@@;s@-ar$@@'`"
           53  +	cross_prefix="`echo "${AR}" | sed 's@ .*$@@;s@^ar$@@;s@-ar$@@'`"
    54     54   	if test -z "${cross_prefix}"; then
    55         -		cross_prefix="`echo "${CC}" | sed 's@ .*$@@;s@-[[^-]]*$@@'`"
           55  +		cross_prefix="`echo "${CC}" | sed 's@ .*$@@;s@^[[^-]]*$@@;s@-[[^-]]*$@@'`"
    56     56   	fi
    57     57   	if test -z "${cross_prefix}"; then
    58     58   		cross_prefix="${host_alias}"
    59     59   	fi
    60     60   
    61     61   	TCC_CONFIGURE_OPTS="${TCC_CONFIGURE_OPTS} --cross-prefix=${cross_prefix}- --cpu=${host_cpu} --os=${host_os}"
    62     62   fi