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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
fi
AC_SUBST(TARGET)
AC_SUBST(TCC4TCL_TARGET)
AC_SUBST(TCC_EXTRA_CFLAGS)

dnl -- If cross-compiling, specify a "--cross-prefix" and define the CPU
if test "${host}" != "${build}"; then
	cross_prefix="`echo "${AR}" | sed 's@ .*$@@;s@-ar$@@'`"
	if test -z "${cross_prefix}"; then
		cross_prefix="`echo "${CC}" | sed 's@ .*$@@;s@-[[^-]]*$@@'`"
	fi
	if test -z "${cross_prefix}"; then
		cross_prefix="${host_alias}"
	fi

	TCC_CONFIGURE_OPTS="${TCC_CONFIGURE_OPTS} --cross-prefix=${cross_prefix}- --cpu=${host_cpu} --os=${host_os}"
fi







|

|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
fi
AC_SUBST(TARGET)
AC_SUBST(TCC4TCL_TARGET)
AC_SUBST(TCC_EXTRA_CFLAGS)

dnl -- If cross-compiling, specify a "--cross-prefix" and define the CPU
if test "${host}" != "${build}"; then
	cross_prefix="`echo "${AR}" | sed 's@ .*$@@;s@^ar$@@;s@-ar$@@'`"
	if test -z "${cross_prefix}"; then
		cross_prefix="`echo "${CC}" | sed 's@ .*$@@;s@^[[^-]]*$@@;s@-[[^-]]*$@@'`"
	fi
	if test -z "${cross_prefix}"; then
		cross_prefix="${host_alias}"
	fi

	TCC_CONFIGURE_OPTS="${TCC_CONFIGURE_OPTS} --cross-prefix=${cross_prefix}- --cpu=${host_cpu} --os=${host_os}"
fi