diff --git a/chapter06/gcc-pass2.xml b/chapter06/gcc-pass2.xml index 89b2bc33e..98dd9c875 100644 --- a/chapter06/gcc-pass2.xml +++ b/chapter06/gcc-pass2.xml @@ -63,12 +63,6 @@ mv -v mpc-&mpc-version; mpc ;; esac - Override the build rules of the libgcc and libstdc++ headers to - allow building these libraries with POSIX threads support: - -sed '/thread_header =/s/@.*@/gthr-posix.h/' \ - -i libgcc/Makefile.in libstdc++-v3/include/Makefile.in - Create a separate build directory again: mkdir -v build @@ -96,24 +90,12 @@ cd build --disable-libssp \ --disable-libvtv \ --enable-languages=c,c++ \ - LDFLAGS_FOR_TARGET=-L$PWD/$LFS_TGT/libgcc + LDFLAGS_FOR_TARGET=-L$PWD/$LFS_TGT/libgcc \ + target_configargs=gcc_cv_target_thread_file=posix The meaning of the new configure options: - - --with-build-sysroot=$LFS - - Normally, using --host ensures that - a cross-compiler is used for building GCC, and that compiler knows - that it has to look for headers and libraries in $LFS. However, the build system for GCC - uses additional tools which are not aware of this location. This - switch is needed so those tools will find the needed files in - $LFS, and not on the host. - - - --target=$LFS_TGT @@ -130,6 +112,30 @@ cd build + + --with-build-sysroot=$LFS + + Normally, using --host ensures that + a cross-compiler is used for building GCC, and that compiler knows + that it has to look for headers and libraries in $LFS. However, the build system for GCC + uses additional tools which are not aware of this location. This + switch is needed so those tools will find the needed files in + $LFS, and not on the host. + + + + + --disable-libsanitizer + + Disable GCC sanitizer runtime libraries. They are not + needed for the temporary installation. In + it was implied by + --disable-libstdcxx, and now we can + explicitly pass it. + + + LDFLAGS_FOR_TARGET=... @@ -143,13 +149,13 @@ cd build - --disable-libsanitizer + target_configargs=gcc_cv_target_thread_file=posix - Disable GCC sanitizer runtime libraries. They are not - needed for the temporary installation. In - it was implied by - --disable-libstdcxx, and now we can - explicitly pass it. + Build the target libraries libgcc and libstdc++ with POSIX + thread support enabled. The default is following the + configuration of the compiler used for building the target library + (in this case, which was + configured with none thread support).