From 7007cc858faf22ecb9321add5af8a0676cf26404 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Thu, 15 May 2008 20:45:18 +0000 Subject: 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 --git a/config/global/download_extract.in b/config/global/download_extract.in index d638ab0..2ddc523 100644 --- a/config/global/download_extract.in +++ b/config/global/download_extract.in @@ -209,6 +209,26 @@ config FORCE_EXTRACT 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 --git a/scripts/functions b/scripts/functions index 547fb66..2779c4c 100644 --- a/scripts/functions +++ b/scripts/functions @@ -441,8 +441,8 @@ CT_ExtractAndPatch() { 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 @@ CT_ExtractAndPatch() { 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 } -- cgit v0.10.2-6-g49f6