Check-in [5dde744f4b]
Overview
Comment:Better sanitization of "AR" and "CC" when trying to figure out the cross-prefix
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 5dde744f4bf460a070d26281d4016db1a6848f59
User & Date: rkeene on 2016-03-30 03:20:48
Other Links: manifest | tags
Context
2016-12-09
04:36
Updated configure system to latest version of macros check-in: a72b70810b user: rkeene tags: trunk
2016-03-30
03:20
Better sanitization of "AR" and "CC" when trying to figure out the cross-prefix check-in: 5dde744f4b user: rkeene tags: trunk
2016-03-28
14:57
Ticket [cc1af09637]: Add additional subcommands to error message check-in: 7edb5d1dd6 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