summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-05-15 20:45:18 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-05-15 20:45:18 (GMT)
commit7007cc858faf22ecb9321add5af8a0676cf26404 (patch)
tree155617f9f48f5713b9bb2f41479dca1c3a62727e /scripts/functions
parentec169f9cc756f73cf55fa76537e819a1336314c2 (diff)
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(-)
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions13
1 files changed, 11 insertions, 2 deletions
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
}