# HG changeset patch # User "Yann E. MORIN" # Date 1186515638 0 # Node ID a7ba1352aee1c57e6cba636ce85df70aa0079433 # Parent e585ed10bd5bbfc5fc189a2d6d304b5c3db71dac Introduce new config option: CT_TARGET_ALIAS_SED_EXPR This option is used as a sed expression to pass onto CT_TARGET to create an alias. diff -r e585ed10bd5b -r a7ba1352aee1 config/toolchain.in --- a/config/toolchain.in Tue Aug 07 18:05:41 2007 +0000 +++ b/config/toolchain.in Tue Aug 07 19:40:38 2007 +0000 @@ -81,12 +81,31 @@ Keep the default (unkown) if you don't know better. +config TARGET_ALIAS_SED_EXPR + string + prompt "Target sed transform" + default "" + help + Normaly, you'd call your toolchain components (especially gcc) by + prefixing the target triplet followed by a dash and the component name + (eg. armeb-unknown-linux-uclibc-gcc). + + You can enter here a sed expression to be applied to ${CT_TARGET} to + create an alias for your toolchain. + + For example, "s/${CT_TARGET_VENDOR}/foobar/" (without the double quotes) + will create the armeb-foobar-linux-uclibc alias to the above-mentioned + toolchain. + + You shouldn't need to enter anything here, unless you plan to manually + call the tools (autotools-based ./configure will use the standard name). + config TARGET_ALIAS string prompt "Target alias" default "" help - Normaly, you'd call your toolchain component (especially gcc) by + Normaly, you'd call your toolchain components (especially gcc) by prefixing the target triplet followed by a dash and the component name (eg. armeb-unknown-linux-uclibc-gcc). diff -r e585ed10bd5b -r a7ba1352aee1 scripts/crosstool.sh --- a/scripts/crosstool.sh Tue Aug 07 18:05:41 2007 +0000 +++ b/scripts/crosstool.sh Tue Aug 07 19:40:38 2007 +0000 @@ -436,16 +436,22 @@ chmod 755 "${CT_PREFIX_DIR}/bin/${CT_TARGET}-populate" # Create the aliases to the target tools - if [ -n "${CT_TARGET_ALIAS}" ]; then - CT_DoLog EXTRA "Creating symlinks from \"${CT_TARGET}-*\" to \"${CT_TARGET_ALIAS}-*\"" - CT_Pushd "${CT_PREFIX_DIR}/bin" - for t in "${CT_TARGET}-"*; do + CT_DoStep EXTRA "Creating toolchain aliases" + CT_Pushd "${CT_PREFIX_DIR}/bin" + for t in "${CT_TARGET}-"*; do + if [ -n "${CT_TARGET_ALIAS}" ]; then _t="`echo \"$t\" |sed -r -e 's/^'\"${CT_TARGET}\"'-/'\"${CT_TARGET_ALIAS}\"'-/;'`" CT_DoLog DEBUG "Linking \"${_t}\" -> \"${t}\"" - ln -sv "${t}" "${_t}" 2>&1 |CT_DoLog DEBUG - done - CT_Popd - fi + ln -sv "${t}" "${_t}" 2>&1 |CT_DoLog ALL + fi + if [ -n "${CT_TARGET_ALIAS_SED_EXPR}" ]; then + _t="`echo \"$t\" |sed -r -e \"${CT_TARGET_ALIAS_SED_EXPR}\"`" + CT_DoLog DEBUG "Linking \"${_t}\" -> \"${t}\"" + ln -sv "${t}" "${_t}" 2>&1 |CT_DoLog ALL + fi + done + CT_Popd + CT_EndStep # Remove the generated documentation files if [ "${CT_REMOVE_DOCS}" = "y" ]; then