comparison root-filesystem.sh @ 721:f0ede6d6c952

Do canadian cross static toolchains properly, via buildall.sh.
author Rob Landley <rob@landley.net>
date Sun, 26 Apr 2009 15:30:26 -0500
parents ff2cd7c539b2
children db5cb617339a
comparison
equal deleted inserted replaced
720:74850275fe41 721:f0ede6d6c952
58 make CROSS="${ARCH}-" KERNEL_HEADERS="${TOOLS}/include" \ 58 make CROSS="${ARCH}-" KERNEL_HEADERS="${TOOLS}/include" \
59 PREFIX="${UCLIBC_TOPDIR}/" $VERBOSITY \ 59 PREFIX="${UCLIBC_TOPDIR}/" $VERBOSITY \
60 RUNTIME_PREFIX="$UCLIBC_DLPREFIX/" DEVEL_PREFIX="$UCLIBC_DLPREFIX/" \ 60 RUNTIME_PREFIX="$UCLIBC_DLPREFIX/" DEVEL_PREFIX="$UCLIBC_DLPREFIX/" \
61 UCLIBC_LDSO_NAME=ld-uClibc -j $CPUS $i || dienow 61 UCLIBC_LDSO_NAME=ld-uClibc -j $CPUS $i || dienow
62 done 62 done
63
64 # There's no way to specify a prefix for the uClibc utils; rename them by hand.
65
66 if [ ! -z "$PROGRAM_PREFIX" ]
67 then
68 for i in ldd readelf
69 do
70 mv "${TOOLS}"/bin/{"$i","${PROGRAM_PREFIX}$i"} || dienow
71 done
72 fi
73
63 cd .. 74 cd ..
64 75
65 cleanup uClibc 76 cleanup uClibc
66 77
67 if [ "$NATIVE_TOOLCHAIN" == "none" ] 78 if [ "$NATIVE_TOOLCHAIN" == "none" ]
80 # so do nothing here. 91 # so do nothing here.
81 echo 92 echo
82 93
83 else 94 else
84 95
85 [ "$FROM_ARCH" != "$ARCH" ] && PROGRAM_PREFIX="${ARCH}-"
86 [ -z "$BUILD_STATIC" ] || STATIC_FLAGS='--static' 96 [ -z "$BUILD_STATIC" ] || STATIC_FLAGS='--static'
87 97
88 # Build and install native binutils 98 # Build and install native binutils
89 99
90 setupfor binutils build-binutils 100 setupfor binutils build-binutils
131 make -j $CPUS all-gcc LDFLAGS="$STATIC_FLAGS" && 141 make -j $CPUS all-gcc LDFLAGS="$STATIC_FLAGS" &&
132 # Work around gcc bug; we disabled multilib but it doesn't always notice. 142 # Work around gcc bug; we disabled multilib but it doesn't always notice.
133 ln -s lib "$TOOLS/lib64" && 143 ln -s lib "$TOOLS/lib64" &&
134 make -j $CPUS install-gcc && 144 make -j $CPUS install-gcc &&
135 rm "$TOOLS/lib64" && 145 rm "$TOOLS/lib64" &&
136 ln -s gcc "${TOOLS}/bin/cc" && 146 ln -s "${PROGRAM_PREFIX}gcc" "${TOOLS}/bin/${PROGRAM_PREFIX}cc" &&
137 # Now we need to beat libsupc++ out of gcc (which uClibc++ needs to build). 147 # Now we need to beat libsupc++ out of gcc (which uClibc++ needs to build).
138 # But don't want to build the whole of libstdc++-v3 because 148 # But don't want to build the whole of libstdc++-v3 because
139 # A) we're using uClibc++ instead, B) the build breaks. 149 # A) we're using uClibc++ instead, B) the build breaks.
140 make -j $CPUS configure-target-libstdc++-v3 && 150 make -j $CPUS configure-target-libstdc++-v3 &&
141 cd "$CROSS_TARGET"/libstdc++-v3/libsupc++ && 151 cd "$CROSS_TARGET"/libstdc++-v3/libsupc++ &&