From be2dd91303d31589ebc30f8fa780e96775ff8bce Mon Sep 17 00:00:00 2001 From: Jeremy Utley Date: Sun, 31 Aug 2003 21:45:06 +0000 Subject: Simplified the glibc-lockin for chapter 5, and added some verbiage on fixincludes git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@2708 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter01/changelog.xml | 5 +++++ chapter05/gcc-pass2-inst.xml | 11 +++++++++++ chapter05/lockingglibc.xml | 18 +++++++----------- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 48cd84910..7dc2104b5 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -82,6 +82,11 @@ +August 31, 2003 [jeremy] - Added in Greg's new +instructions for GCC 3.3.1 wrt the fixincludes process. Also added +extra verbiage to the lockin and GCC pass 2 pages on the fixincludes +process. + August 31, 2003 [jeremy] - Added user nobody to passwd and group files, so coreutils tests will pass. diff --git a/chapter05/gcc-pass2-inst.xml b/chapter05/gcc-pass2-inst.xml index a3a58e0ee..f014658d7 100644 --- a/chapter05/gcc-pass2-inst.xml +++ b/chapter05/gcc-pass2-inst.xml @@ -12,6 +12,17 @@ subdir. patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes-2.patch patch -Np1 -i ../gcc-&gcc-specs-version;.patch +The first patch disables the GCC "fixincludes" script. We mentioned this +briefly earlier, but a slightly more in-depth explanation of the fixincludes +process is warranted here. Under normal circumstances, the GCC fixincludes +script scans your system for header files that need to be fixed. It might find +that the Glibc header files on your host system need to be fixed, fix them and +put them in the GCC private include directory. Then, later on in Chapter 6, +after we've installed the newer Glibc, this private include directory would be +searched before the system include directory, resulting in GCC finding the +fixed headers from the host system, which would most likely not match the Glibc +version actually used for the LFS system. + The last patch changes GCC's default location of the dynamic linker, a simple substitution of "/lib/ld-linux.so.2" with "/stage1/lib/ld-linux.so.2" in config/i386/linux.h. Patching now rather than adjusting diff --git a/chapter05/lockingglibc.xml b/chapter05/lockingglibc.xml index 18cc6d826..694e529b3 100644 --- a/chapter05/lockingglibc.xml +++ b/chapter05/lockingglibc.xml @@ -35,17 +35,13 @@ unset SPECFILE it all in. Or you can edit the specs file by hand if you want to: just replace "/lib/ld-linux.so.2" with "/stage1/lib/ld-linux.so.2". -Also, because we allowed GCC's "Fixincludes" script to modify our host's -header files (and this was necessary because of improper use of the __thread -keyword in some older software), we want to get rid of those modified header -files, and replace them with pristine ones. - -GCCDIR=/stage1/lib/gcc-lib/*/* -rm -rf $GCCDIR/include/* -cp $GCCDIR/install-tools/include/* $GCCDIR/include -cp $GCCDIR/install-tools/gsyslimits.h \ - $GCCDIR/include/syslimits.h -unset GCCDIR +Lastly, there is a possibility that some include files from the host +system have found their way into gcc's private include dir. This can happen +because of GCC's "fixincludes" process which part of the GCC build. We'll +explain more about this further on in this chapter. For now, run the +following commands to eliminate this possibility. + +rm -f /stage1/lib/gcc-lib/*/*/include/{pthread.h,bits/sigthread.h} This completes the installation of the self-contained toolchain, which can now be used to build the rest of the temporary tools. -- cgit v1.2.3-54-g00ecf