changeset 906:5e0cbc73da55

Split out linux-headers, uClibc, and uClibc++ as their own sections.
author Rob Landley <rob@landley.net>
date Sat, 28 Nov 2009 23:23:24 -0600
parents 023b577fb865
children 890aa372ee30
files config cross-compiler.sh root-filesystem.sh sources/sections/linux-headers.sh sources/sections/uClibc++.sh sources/sections/uClibc.sh
diffstat 6 files changed, 39 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- a/config	Sat Nov 28 18:10:43 2009 -0600
+++ b/config	Sat Nov 28 23:23:24 2009 -0600
@@ -125,6 +125,3 @@
 # to this to add extra debug info to their binaries.  (Use with SKIP_STRIP)
 
 # export CFLAGS="-g"
-
-# Define the C library used here. Default is uClibc
-# export C_LIBRARY=uClibc
--- a/cross-compiler.sh	Sat Nov 28 18:10:43 2009 -0600
+++ b/cross-compiler.sh	Sat Nov 28 23:23:24 2009 -0600
@@ -27,9 +27,8 @@
 
 # Build C Library
 
-[ -z "$C_LIBRARY" ] && C_LIBRARY=uClibc
-
-HOST_UTILS=1 build_section $C_LIBRARY
+build_section linux-headers
+HOST_UTILS=1 build_section uClibc
 
 cat > "${STAGE_DIR}"/README << EOF &&
 Cross compiler for $ARCH
--- a/root-filesystem.sh	Sat Nov 28 18:10:43 2009 -0600
+++ b/root-filesystem.sh	Sat Nov 28 23:23:24 2009 -0600
@@ -49,9 +49,8 @@
 
 # Build C Library
 
-[ -z "$C_LIBRARY" ] && C_LIBRARY=uClibc
-
-STAGE_DIR="$ROOT_TOPDIR" build_section $C_LIBRARY
+STAGE_DIR="$ROOT_TOPDIR" build_section linux-headers
+STAGE_DIR="$ROOT_TOPDIR" build_section uClibc
 
 if [ "$NATIVE_TOOLCHAIN" == "none" ]
 then
@@ -82,24 +81,7 @@
 
 export "$(echo $ARCH | sed 's/-/_/g')"_WRAPPER_TOPDIR="$ROOT_TOPDIR"
 
-# Build and install uClibc++
-
-setupfor uClibc++
-CROSS= make defconfig &&
-sed -r -i 's/(UCLIBCXX_HAS_(TLS|LONG_DOUBLE))=y/# \1 is not set/' .config &&
-sed -r -i '/UCLIBCXX_RUNTIME_PREFIX=/s/".*"/""/' .config &&
-CROSS= make oldconfig &&
-CROSS="$ARCH"- make &&
-CROSS= make install PREFIX="$ROOT_TOPDIR/c++" &&
-
-# Move libraries somewhere useful.
-
-mv "$ROOT_TOPDIR"/c++/lib/* "$ROOT_TOPDIR"/lib &&
-rm -rf "$ROOT_TOPDIR"/c++/{lib,bin} &&
-ln -s libuClibc++.so "$ROOT_TOPDIR"/lib/libstdc++.so &&
-ln -s libuClibc++.a "$ROOT_TOPDIR"/lib/libstdc++.a
-
-cleanup
+STAGE_DIR="$ROOT_TOPDIR" build_section uClibc++
 
 fi # End of NATIVE_TOOLCHAIN build
 
@@ -109,8 +91,7 @@
 # Copy qemu setup script and so on.
 
 cp -r "${SOURCES}/native/." "$ROOT_TOPDIR/" &&
-cp "$SRCDIR"/MANIFEST "$ROOT_TOPDIR/src" &&
-cp "${WORK}/config-${C_LIBRARY}" "$ROOT_TOPDIR/src/config-${C_LIBRARY}" || dienow
+cp "$SRCDIR"/MANIFEST "$ROOT_TOPDIR/src" || dienow
 
 STAGE_DIR="$ROOT_TOPDIR"/bin build_section busybox
 cp "$WORK"/config-busybox "$ROOT_TOPDIR"/src || dienow
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/sections/linux-headers.sh	Sat Nov 28 23:23:24 2009 -0600
@@ -0,0 +1,10 @@
+# Install Linux kernel headers.
+
+setupfor linux
+
+# Install Linux kernel headers (for use by uClibc).
+make -j $CPUS headers_install ARCH="${KARCH}" INSTALL_HDR_PATH="$STAGE_DIR" &&
+# This makes some very old package builds happy.
+ln -s ../sys/user.h "$STAGE_DIR/include/asm/page.h"
+
+cleanup
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/sections/uClibc++.sh	Sat Nov 28 23:23:24 2009 -0600
@@ -0,0 +1,18 @@
+# Build and install uClibc++
+
+setupfor uClibc++
+CROSS= make defconfig &&
+sed -r -i 's/(UCLIBCXX_HAS_(TLS|LONG_DOUBLE))=y/# \1 is not set/' .config &&
+sed -r -i '/UCLIBCXX_RUNTIME_PREFIX=/s/".*"/""/' .config &&
+CROSS= make oldconfig &&
+CROSS="$ARCH"- make &&
+CROSS= make install PREFIX="$ROOT_TOPDIR/c++" &&
+
+# Move libraries somewhere useful.
+
+mv "$ROOT_TOPDIR"/c++/lib/* "$ROOT_TOPDIR"/lib &&
+rm -rf "$ROOT_TOPDIR"/c++/{lib,bin} &&
+ln -s libuClibc++.so "$ROOT_TOPDIR"/lib/libstdc++.so &&
+ln -s libuClibc++.a "$ROOT_TOPDIR"/lib/libstdc++.a
+
+cleanup
--- a/sources/sections/uClibc.sh	Sat Nov 28 18:10:43 2009 -0600
+++ b/sources/sections/uClibc.sh	Sat Nov 28 23:23:24 2009 -0600
@@ -1,14 +1,3 @@
-# Install Linux kernel headers.
-
-setupfor linux
-
-# Install Linux kernel headers (for use by uClibc).
-make -j $CPUS headers_install ARCH="${KARCH}" INSTALL_HDR_PATH="$STAGE_DIR" &&
-# This makes some very old package builds happy.
-ln -s ../sys/user.h "$STAGE_DIR/include/asm/page.h"
-
-cleanup
-
 # Build and install uClibc
 
 make_uClibc()
@@ -34,6 +23,11 @@
 
 make_uClibc install
 
+if [ -d "$ROOT_TOPDIR/src" ]
+then
+  cp "${WORK}/config-uClibc" "$ROOT_TOPDIR/src/config-uClibc" || dienow
+fi
+
 # Do we need host or target versions of ldd and such?
 
 if [ ! -z "$HOST_UTILS" ]