diff --git a/build.sh b/build.sh index 9a462d4..57540fb 100755 --- a/build.sh +++ b/build.sh @@ -427,6 +427,22 @@ if [ ! -f "$STEPS_DIR/gcc-step3" ]; then touch "$STEPS_DIR/gcc-step3" fi +# Use the new toolchain +export BUILD_CC=gcc +export CC="$LFS_TGT-gcc" +export CXX="$LFS_TGT-g++" +export AS="$LFS_TGT-as" +export LD="$LFS_TGT-ld" +export AR="$LFS_TGT-ar" +export RANLIB="$LFS_TGT-ranlib" +export STRIP="$LFS_TGT-strip" +export OBJDUMP="$LFS_TGT-objdump" +# remove hardening options for building libraries +export CFLAGS="-U_FORTIFY_SOURCE -O2" +export CPPFLAGS="-U_FORTIFY_SOURCE -O2" +export LD_LIBRARY_PATH_old="$LD_LIBRARY_PATH" +unset LD_LIBRARY_PATH + # test the cross toolchain which -- $LFS_TGT-as || echo $LFS_TGT-as is not in the PATH @@ -497,4 +513,34 @@ if [ ! -f "$STEPS_DIR/attr" ]; then touch "$STEPS_DIR/attr" fi +#"$LFS_TGT-strip" --strip-unneeded $LFS/bin/* + +# build libcap2 +#if [ ! -f "$STEPS_DIR/libcap2" ]; then +# if [ ! -d "$LFS_BUILD/libcap2" ]; then +# tar -xzf "$BASE_DIR/sources/libcap-2.73.tar.gz" +# mv "libcap2" "$LFS_BUILD/libcap2" +# fi +# cd "$LFS_BUILD/libcap2" +# +# mkdir -vp build +# cd build +# +# echo "rootsbindir=/usr/sbin" > configparms +# +# "../configure" \ +# --prefix=/usr \ +# --disable-static \ +# --target=$LFS_TGT \ +# --host=$(build-aux/config.guess) \ +# --build=$(build-aux/config.guess) \ +# +# make -j 32 +# make DESTDIR=$LFS install +# +# cd "$BASE_DIR" +# +# touch "$STEPS_DIR/libcap2" +#fi + # Right now I have no idea if g++ will build crap. \ No newline at end of file