From 174d1bf948e00b20db2bfc162dda6ef18c1d2bbc Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Tue, 15 Feb 2022 15:29:35 +0800 Subject: libstdc++ pass 1: rephrase the explanation for --with-gxx-include-dir I just received a private mail from some guy obviously puzzled by this switch. Expand the explanation a little to make it more clear. --- chapter05/libstdc++.xml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/chapter05/libstdc++.xml b/chapter05/libstdc++.xml index 750868591..91f2b6b19 100644 --- a/chapter05/libstdc++.xml +++ b/chapter05/libstdc++.xml @@ -92,11 +92,21 @@ cd build --with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version; - This is the location where the C++ compiler should search for the - standard include files. In a normal build, this information + This specifies the installation directory for include files. + Because libstdc++ is the standard C++ library for LFS, this + directory should match the location where the C++ compiler + ($LFS_TGT-g++) would search for the + standard C++ include files. In a normal build, this information is automatically passed to the libstdc++ configure options from the top level directory. In our case, this information - must be explicitly given. + must be explicitly given. + The C++ compiler will prepend the sysroot path + $LFS (specified building + GCC pass 1) to the include file search path, so it will actually + search in + $LFS/tools/$LFS_TGT/include/c++/&gcc-version;. The combination of the DESTDIR + variable (in the make install command below) + and this switch ensures to install the headers there. -- cgit v1.2.3-54-g00ecf