# HG changeset patch # User Rob Landley # Date 1238586024 18000 # Node ID aad5da0c7454349a1f4c7c34ec4fc7bf921430a4 # Parent 78cbd428d60e8113bc426fce54ac08d26fbf61be Add NATIVE_RETROFIT_CXX to add uClibc++ to the cross compiler tarball. diff -r 78cbd428d60e -r aad5da0c7454 build-static-toolchains.sh --- 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) diff -r 78cbd428d60e -r aad5da0c7454 config --- 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 diff -r 78cbd428d60e -r aad5da0c7454 mini-native.sh --- 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"