changeset 1532:a2e491cd0800

Fix source/target confusion that bites Fedora host = target builds. The gcc build exports an LD_LIBRARY_PATH full of target libraries and then calls /bin/sh in the configure stage. If you configure before building, this doesn't cause a problem because the libraries aren't there yet, but c++ has dependencies that trigger a C build before running configuration even if you reorder the steps. On ubuntu this doesn't cause a problem because /bin/sh doesn't link against anything in this LD_LIBRARY PATH, and when building a different architecture the foreign binaries are ignored by the dynamic linker. But on Fedora when host == target /bin/sh links against which is in LD_LIBRARY_PATH linked against which isn't installed on the host, and the attempt to run the shell dies saying it can't find uClibc. The fix is to override the make variable SHELL = sh so it calls ash out of build/host.
author Rob Landley <>
date Thu, 16 Aug 2012 21:59:27 -0500
parents 3b7e8d600c19
children db5d13f2474f
files sources/sections/
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sources/sections/	Fri Jul 27 08:56:55 2012 -0500
+++ b/sources/sections/	Thu Aug 16 21:59:27 2012 -0500
@@ -90,7 +90,7 @@
   # builds.  (The simple cross compiler still needs basic C++ support to build
   # the C++ libraries with, though.)
-  make -j $CPUS configure-target-libstdc++-v3 &&
+  make -j $CPUS configure-target-libstdc++-v3 SHELL=sh &&
   cd "$CROSS_TARGET"/libstdc++-v3/libsupc++ &&
   make -j $CPUS &&
   mv .libs/libsupc++.a "$STAGE_DIR"/cc/lib &&