Files
lfs/chapter06
Xi Ruoyao 47f35a8df3 gcc-pass2: add CXX_FOR_TARGET="$LFS_TGT-gcc -nostdinc++"
In gcc-pass2 the C++ std module fails to build, similar to the issue
we've fixed for gcc-pass1 at commit 2be87ced88.  Here it's even more
complicated than gcc-pass1: the problem is the libstdc++ fenv.h
has #include_next <fenv.h> and expects the directive to find glibc
fenv.h, but with CXX_FOR_TARGET=$LFS_TGT-g++ (the default) the compiler
finds it's own (installed at ch.05 libstdc++) fenv.h, then
this #include_next directive finds fenv.h in the gcc-pass2 build, and
because of the _GLIBCXX_FENV_H include guard gcc-pass2 fenv.h won't pull
the glibc header anymore.  Then the build will report errors like
"cannot find fenv_t" etc.

To resolve the issue, pass CXX_FOR_TARGET="$LFS_TGT-gcc -nostdinc++"
like what the top-level build system does for a native build.
2026-08-01 04:14:04 +08:00
..
2025-02-02 20:02:39 -06:00
2026-07-31 11:22:04 -05:00
2024-01-18 20:53:23 +01:00
2024-01-18 20:53:23 +01:00