diff root-filesystem.sh @ 721:f0ede6d6c952

Do canadian cross static toolchains properly, via buildall.sh.
author Rob Landley <rob@landley.net>
date Sun, 26 Apr 2009 15:30:26 -0500
parents ff2cd7c539b2
children db5cb617339a
line wrap: on
line diff
--- a/root-filesystem.sh	Sun Apr 26 14:19:21 2009 -0500
+++ b/root-filesystem.sh	Sun Apr 26 15:30:26 2009 -0500
@@ -60,6 +60,17 @@
        RUNTIME_PREFIX="$UCLIBC_DLPREFIX/" DEVEL_PREFIX="$UCLIBC_DLPREFIX/" \
        UCLIBC_LDSO_NAME=ld-uClibc -j $CPUS $i || dienow
 done
+
+# There's no way to specify a prefix for the uClibc utils; rename them by hand.
+
+if [ ! -z "$PROGRAM_PREFIX" ]
+then
+  for i in ldd readelf
+  do
+    mv "${TOOLS}"/bin/{"$i","${PROGRAM_PREFIX}$i"} || dienow
+  done
+fi
+
 cd ..
 
 cleanup uClibc
@@ -82,7 +93,6 @@
 
 else
 
-[ "$FROM_ARCH" != "$ARCH" ] && PROGRAM_PREFIX="${ARCH}-"
 [ -z "$BUILD_STATIC" ] || STATIC_FLAGS='--static'
 
 # Build and install native binutils
@@ -133,7 +143,7 @@
 ln -s lib "$TOOLS/lib64" &&
 make -j $CPUS install-gcc &&
 rm "$TOOLS/lib64" &&
-ln -s gcc "${TOOLS}/bin/cc" &&
+ln -s "${PROGRAM_PREFIX}gcc" "${TOOLS}/bin/${PROGRAM_PREFIX}cc" &&
 # Now we need to beat libsupc++ out of gcc (which uClibc++ needs to build).
 # But don't want to build the whole of libstdc++-v3 because
 # A) we're using uClibc++ instead,  B) the build breaks.