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
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