comparison root-filesystem.sh @ 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
comparison
equal deleted inserted replaced
905:023b577fb865 906:5e0cbc73da55
47 mkdir -p "$STAGE_DIR/bin" || dienow 47 mkdir -p "$STAGE_DIR/bin" || dienow
48 fi 48 fi
49 49
50 # Build C Library 50 # Build C Library
51 51
52 [ -z "$C_LIBRARY" ] && C_LIBRARY=uClibc 52 STAGE_DIR="$ROOT_TOPDIR" build_section linux-headers
53 53 STAGE_DIR="$ROOT_TOPDIR" build_section uClibc
54 STAGE_DIR="$ROOT_TOPDIR" build_section $C_LIBRARY
55 54
56 if [ "$NATIVE_TOOLCHAIN" == "none" ] 55 if [ "$NATIVE_TOOLCHAIN" == "none" ]
57 then 56 then
58 # If we're not installing a compiler, delete the headers, static libs, 57 # If we're not installing a compiler, delete the headers, static libs,
59 # and example source code. 58 # and example source code.
80 # Tell future packages to link against the libraries in the new root filesystem, 79 # Tell future packages to link against the libraries in the new root filesystem,
81 # rather than the ones in the cross compiler directory. 80 # rather than the ones in the cross compiler directory.
82 81
83 export "$(echo $ARCH | sed 's/-/_/g')"_WRAPPER_TOPDIR="$ROOT_TOPDIR" 82 export "$(echo $ARCH | sed 's/-/_/g')"_WRAPPER_TOPDIR="$ROOT_TOPDIR"
84 83
85 # Build and install uClibc++ 84 STAGE_DIR="$ROOT_TOPDIR" build_section uClibc++
86
87 setupfor uClibc++
88 CROSS= make defconfig &&
89 sed -r -i 's/(UCLIBCXX_HAS_(TLS|LONG_DOUBLE))=y/# \1 is not set/' .config &&
90 sed -r -i '/UCLIBCXX_RUNTIME_PREFIX=/s/".*"/""/' .config &&
91 CROSS= make oldconfig &&
92 CROSS="$ARCH"- make &&
93 CROSS= make install PREFIX="$ROOT_TOPDIR/c++" &&
94
95 # Move libraries somewhere useful.
96
97 mv "$ROOT_TOPDIR"/c++/lib/* "$ROOT_TOPDIR"/lib &&
98 rm -rf "$ROOT_TOPDIR"/c++/{lib,bin} &&
99 ln -s libuClibc++.so "$ROOT_TOPDIR"/lib/libstdc++.so &&
100 ln -s libuClibc++.a "$ROOT_TOPDIR"/lib/libstdc++.a
101
102 cleanup
103 85
104 fi # End of NATIVE_TOOLCHAIN build 86 fi # End of NATIVE_TOOLCHAIN build
105 87
106 if [ "$NATIVE_TOOLCHAIN" != "only" ] 88 if [ "$NATIVE_TOOLCHAIN" != "only" ]
107 then 89 then
108 90
109 # Copy qemu setup script and so on. 91 # Copy qemu setup script and so on.
110 92
111 cp -r "${SOURCES}/native/." "$ROOT_TOPDIR/" && 93 cp -r "${SOURCES}/native/." "$ROOT_TOPDIR/" &&
112 cp "$SRCDIR"/MANIFEST "$ROOT_TOPDIR/src" && 94 cp "$SRCDIR"/MANIFEST "$ROOT_TOPDIR/src" || dienow
113 cp "${WORK}/config-${C_LIBRARY}" "$ROOT_TOPDIR/src/config-${C_LIBRARY}" || dienow
114 95
115 STAGE_DIR="$ROOT_TOPDIR"/bin build_section busybox 96 STAGE_DIR="$ROOT_TOPDIR"/bin build_section busybox
116 cp "$WORK"/config-busybox "$ROOT_TOPDIR"/src || dienow 97 cp "$WORK"/config-busybox "$ROOT_TOPDIR"/src || dienow
117 98
118 # Build and install make 99 # Build and install make