summaryrefslogtreecommitdiff
path: root/scripts/crosstool-NG.sh.in
diff options
context:
space:
mode:
authorJohannes Stezenbach <js@sig21.net>2010-07-29 17:30:37 (GMT)
committerJohannes Stezenbach <js@sig21.net>2010-07-29 17:30:37 (GMT)
commit264bcd36c17ea1da7eb73c3340b8bef280a88fbc (patch)
tree879c2c4398c3332aa335816092513a68ffe13a15 /scripts/crosstool-NG.sh.in
parentbe3403255195976273c6bf3806fb9e615a23a95b (diff)
scripts: remove . from $PATH
Add CT_SanitizePath function which removes entries referring to ., /tmp and non-existing directories from $PATH, and call it early in the build script. If . is in PATH, gcc-4.4.4 build breaks: [ALL ] checking what assembler to use... /tmp/build/targets/arm-unknown-linux-uclibcgnueabi/build/gcc-core-static/arm-unknown-linux-uclibcgnueabi/bin/as ... [ALL ] config.status: creating as i.e. "as" is supposed to be the arm-unknown-linux-uclibcgnueabi cross assembler, but config.status creates a local "as" script which is calling the host assembler. Signed-off-by: Johannes Stezenbach <js@sig21.net> [Yann E. MORIN: style fixes + explanations] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> (transplanted from 20dd8cef1c8adff0aa3e78ae6d7acfbc45ed5a83)
Diffstat (limited to 'scripts/crosstool-NG.sh.in')
-rw-r--r--scripts/crosstool-NG.sh.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in
index 379f170..0540329 100644
--- a/scripts/crosstool-NG.sh.in
+++ b/scripts/crosstool-NG.sh.in
@@ -28,6 +28,9 @@
# Overide the locale early, in case we ever translate crosstool-NG messages
[ -z "${CT_NO_OVERIDE_LC_MESSAGES}" ] && export LC_ALL=C
+# remove . from PATH since it can cause gcc build failures
+CT_SanitizePath
+
# Some sanity checks in the environment and needed tools
CT_DoLog INFO "Performing some trivial sanity checks"
CT_TestAndAbort "Don't set LD_LIBRARY_PATH. It screws up the build." -n "${LD_LIBRARY_PATH}"