changeset 1062:abc8ddd4d9f0

Don't have root-filesystem.sh suck in the native-compiler.sh output, have build.sh collate those instead before calling system-image.sh. (That way the root-filesystem.sh tarball does't include the native compiler output.)
author Rob Landley <rob@landley.net>
date Wed, 05 May 2010 22:14:47 -0500
parents c3cb63262c40
children 3a4fccf92f58
files build.sh root-filesystem.sh
diffstat 2 files changed, 23 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/build.sh	Wed May 05 21:13:04 2010 -0500
+++ b/build.sh	Wed May 05 22:14:47 2010 -0500
@@ -100,6 +100,20 @@
   time ./root-filesystem.sh "$ARCH" || exit 1
 fi
 
+# Install the native compiler into the root filesystem (if any).
+
+if [ -d "$BUILD/native-compiler-$ARCH" ]
+then
+  # Remove shared libraries copied from cross compiler.
+
+  rm -rf "$BUILD/root-filesystem-$ARCH/usr/lib" 2>/dev/null
+
+  # Copy native compiler
+
+  cp -a "$BUILD/native-compiler-$ARCH/." "$BUILD/root-filesystem-$ARCH/" ||
+    dienow
+fi
+
 if not_already system-image
 then
   time ./system-image.sh $1 || exit 1
--- a/root-filesystem.sh	Wed May 05 21:13:04 2010 -0500
+++ b/root-filesystem.sh	Wed May 05 22:14:47 2010 -0500
@@ -49,34 +49,18 @@
   "${ARCH}-cc" "${SOURCES}/toys/hello.c" -Os $CFLAGS -static -o "$STAGE_DIR/bin/hello-static" || dienow
 fi
 
-# If a native compiler exists for this target, grab it
-
-if [ -d "$BUILD/native-compiler-$ARCH" ]
-then
-  # Copy native compiler
-
-  cp -a "$BUILD/native-compiler-$ARCH/." "$STAGE_DIR/" || dienow
-else
-  # Do we need shared libraries?
+# Do we need shared libraries?
 
-  if [ ! -z "$BUILD_STATIC" ] && [ "$BUILD_STATIC" != none ]
-  then
-    echo Copying compiler libraries...
-    mkdir -p "$STAGE_DIR/lib" || dienow
-    (path_search \
-       "$("$ARCH-cc" --print-search-dirs | sed -n 's/^libraries: =*//p')" \
-        "*.so*" 'cp -H "$DIR/$FILE" "$STAGE_DIR/lib/$FILE"' \
-        || dienow) | dotprogress
-  fi
-
-  # Since we're not installing a compiler, delete the example source code.  
-  rm -rf "$STAGE_DIR/src/*.c*" || dienow
+if [ ! -z "$BUILD_STATIC" ] && [ "$BUILD_STATIC" != none ]
+then
+  echo Copying compiler libraries...
+  mkdir -p "$STAGE_DIR/lib" || dienow
+  (path_search \
+     "$("$ARCH-cc" --print-search-dirs | sed -n 's/^libraries: =*//p')" \
+      "*.so*" 'cp -H "$DIR/$FILE" "$STAGE_DIR/lib/$FILE"' \
+      || dienow) | dotprogress
 fi
 
-# This is allowed to fail if there are no configs.
-
-mv "$STAGE_DIR/config-"* "$STAGE_DIR/src" 2>/dev/null
-
 # Clean up and package the result
 
 if [ -z "$SKIP_STRIP" ]