changeset 689:aad5da0c7454

Add NATIVE_RETROFIT_CXX to add uClibc++ to the cross compiler tarball.
author Rob Landley <rob@landley.net>
date Wed, 01 Apr 2009 06:40:24 -0500
parents 78cbd428d60e
children ef758aacab0b
files build-static-toolchains.sh config mini-native.sh
diffstat 3 files changed, 19 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/build-static-toolchains.sh	Wed Apr 01 05:13:46 2009 -0500
+++ b/build-static-toolchains.sh	Wed Apr 01 06:40:24 2009 -0500
@@ -46,6 +46,7 @@
   KERNEL_EXTRA="ro" ./run-from-build.sh "$STATIC_HOST" << EOF
           #
 export USE_UNSTABLE=$USE_UNSTABLE
+export NATIVE_RETROFIT_CXX=1
 export CROSS_BUILD_STATIC=1
 rm -rf /home/firmware
 mkdir -p /home/firmware &&
@@ -54,7 +55,7 @@
 mkdir -p build/logs || exit 1
 for i in $STATIC_TARGETS
 do
-  ./cross-compiler.sh \$i
+  ./cross-compiler.sh \$i && ./mini-native.sh \$i
 done
 (cd build; tar c cross-compiler-*.tar.bz2) | netcat 10.0.2.2 \
   $(mkdir -p build/static; cd build/static; ../host/netcat -s 127.0.0.1 -l tar xv)
--- a/config	Wed Apr 01 05:13:46 2009 -0500
+++ b/config	Wed Apr 01 06:40:24 2009 -0500
@@ -98,3 +98,10 @@
   export NATIVE_COLOR="$BACKGROUND_COLOR\e[35m"
   export PACKAGE_COLOR="$BACKGROUND_COLOR\e[36m"
 fi
+
+# Install the uClibc++ files into the cross-compiler directory and create a
+# new tarball.  This is insanely ugly and a layering violation, but building
+# uClibc++ in the cross compiler stage is actually worse.  Compromise by
+# making it a config option.
+
+# export NATIVE_RETROFIT_CXX=1
--- a/mini-native.sh	Wed Apr 01 05:13:46 2009 -0500
+++ b/mini-native.sh	Wed Apr 01 06:40:24 2009 -0500
@@ -307,5 +307,15 @@
 
 create_stage_tarball mini-native
 
+if [ ! -z "$NATIVE_RETROFIT_CXX" ]
+then
+  [ -z "$NATIVE_TOOLSDIR" ] && SUBDIR=usr || SUBDIR=tools
+
+  (cd "${BUILD}/mini-native-$ARCH"/$SUBDIR && tar c c++ lib/*c++* || dienow) | \
+    (tar xC "${BUILD}/cross-compiler-$ARCH" || dienow)
+
+  create_stage_tarball cross-compiler
+fi
+
 # Color back to normal
 echo -e "\e[0mBuild complete"