From dd13f93ea65bf09bc13a372f87b9075df3a9d5f3 Mon Sep 17 00:00:00 2001 From: Denis Benato Date: Sat, 7 Dec 2024 17:04:58 +0100 Subject: [PATCH] Build libgcc without reconfiguring gcc --- build.sh | 64 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/build.sh b/build.sh index 338a1ed..719f4fc 100755 --- a/build.sh +++ b/build.sh @@ -194,17 +194,17 @@ if [ ! -f "$STEPS_DIR/gcc-step1" ]; then fi # From now on use -#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" -## 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" +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" +# 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 # build glibc @@ -309,27 +309,27 @@ if [ ! -f "$STEPS_DIR/gcc-step2" ]; then cd build # ../configure is already done - "../configure" \ - --target=$LFS_TGT \ - --host=$(../config.guess) \ - --build=$(../config.guess) \ - --prefix=$LFS_TOOLS \ - --with-glibc-version=2.40 \ - --with-sysroot=$LFS \ - --enable-default-pie \ - --enable-default-ssp \ - --disable-nls \ - --disable-multilib \ - --disable-libatomic \ - --disable-libgomp \ - --disable-libquadmath \ - --disable-libquadmath-support \ - --disable-libssp \ - --disable-libvtv \ - --disable-libstdcxx \ - --disable-decimal-float \ - --disable-libsanitizer \ - --enable-languages=c + #"../configure" \ + # --target=$LFS_TGT \ + # --host=$(../config.guess) \ + # --build=$(../config.guess) \ + # --prefix=$LFS_TOOLS \ + # --with-glibc-version=2.40 \ + # --with-sysroot=$LFS \ + # --enable-default-pie \ + # --enable-default-ssp \ + # --disable-nls \ + # --disable-multilib \ + # --disable-libatomic \ + # --disable-libgomp \ + # --disable-libquadmath \ + # --disable-libquadmath-support \ + # --disable-libssp \ + # --disable-libvtv \ + # --disable-libstdcxx \ + # --disable-decimal-float \ + # --disable-libsanitizer \ + # --enable-languages=c # Repeat this #make -j 32 all-gcc