# HG changeset patch # User "Yann E. MORIN" # Date 1210884318 0 # Node ID 4968462088aa1a220659d3730bf5122d163b37e4 # Parent f4145eeecb1dda31528db0f04f3ca3615fd21d90 Introduce a new option to overide components' config.{gues,sub} with the one provided with crosstool-NG. Fix typoes in a comment. /trunk/scripts/functions | 13 11 2 0 +++++++++++-- /trunk/config/global/download_extract.in | 20 20 0 0 ++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff -r f4145eeecb1d -r 4968462088aa config/global/download_extract.in --- a/config/global/download_extract.in Thu May 15 20:42:45 2008 +0000 +++ b/config/global/download_extract.in Thu May 15 20:45:18 2008 +0000 @@ -209,6 +209,26 @@ Usefull if you suspect a previous extract did not complete (eg. broken tarball), or you added a new set of patches for this component. +config OVERIDE_CONFIG_GUESS_SUB + bool + prompt "Override config.{guess,sub}" + default y + help + Override tools' versions of config.guess and config.sub with the ones + from crosstool-NG. This means that all instances of config.guess and + config.sub in gcc, binutils, glibc, etc... will be replaced. + + Most of the time, the versions of those scripts found in packages are old + versions, thus lacking some target definitions. This is the case for + uClibc-based tuples in old versions of gcc and gdb, for example. + + Also, doing so will guarantee that all components have the same tuples + definitions for your target, and not diverging ones. + + You can update the ones provided with crosstool-NG by first running: + ct-ng updatetools + in the directory where you want to run crosstool-NG prior to the build. + config ONLY_EXTRACT bool prompt "Stop after extracting tarballs" diff -r f4145eeecb1d -r 4968462088aa scripts/functions --- a/scripts/functions Thu May 15 20:42:45 2008 +0000 +++ b/scripts/functions Thu May 15 20:45:18 2008 +0000 @@ -441,8 +441,8 @@ CT_DoLog EXTRA "Patching \"${file}\"" if [ "${libc_addon}" = "y" ]; then - # Some addons tarball directly contian the correct addon directory, - # while others have the addon directory named ofter the tarball. + # Some addon tarballs directly contain the correct addon directory, + # while others have the addon directory named after the tarball. # Fix that by always using the short name (eg: linuxthreads, ports, etc...) addon_short_name=`echo "${file}" |sed -r -e 's/^[^-]+-//; s/-[^-]+$//;'` [ -d "${addon_short_name}" ] || ln -s "${file}" "${addon_short_name}" @@ -467,6 +467,15 @@ fi done + if [ "${CT_OVERIDE_CONFIG_GUESS_SUB}" = "y" ]; then + CT_DoLog ALL "Overiding config.guess and config.sub" + for cfg in config_guess config_sub; do + eval ${cfg}="${CT_LIB_DIR}/tools/${cfg/_/.}" + [ -e "${CT_TOP_DIR}/tools/${cfg/_/.}" ] && eval ${cfg}="${CT_TOP_DIR}/tools/${cfg/_/.}" + find . -type f -name "${cfg/_/.}" -exec cp -v "${!cfg}" {} \; |CT_DoLog ALL + done + fi + CT_Popd }