diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index db57d9500..9a7347a56 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -94,6 +94,11 @@ +September 17th, 2003 [greg]: Chapters 5 and 6 - Locking in +Glibc and Re-adjusting the toolchain: Do "make -C ld install" instead of "make +-C ld install-data-local" to install a whole new linker instead of just the +new ldscripts. + September 16th, 2003 [greg]: Chapters 5 and 6 - Locking in Glibc and Re-adjusting the toolchain: Added sanity checks. diff --git a/chapter05/lockingglibc.xml b/chapter05/lockingglibc.xml index 285de303c..e2214119e 100644 --- a/chapter05/lockingglibc.xml +++ b/chapter05/lockingglibc.xml @@ -4,23 +4,20 @@ Now that the temporary C libraries have been installed, we want all the tools compiled in the rest of this chapter to be linked against these -libraries. To accomplish this, we need to adjust the linker's scripts and the -compiler's specs file. +libraries. To accomplish this, we need to adjust the linker and the compiler's +specs file. -First install the adjusted linker scripts by running the following from -within the binutils-build -directory: +First install the adjusted linker by running the following from within +the binutils-build directory: -make -C ld install-data-local +make -C ld install -These scripts were adjusted a little while back, at the end of the first -pass of Binutils, and contain no mention of /lib, -/usr/lib or /usr/local/lib. -From this point onwards everything will link only -against the libraries in /tools/lib. +The linker was adjusted a little while back, at the end of the first +pass of Binutils. From this point onwards everything will link only + against the libraries in /tools/lib. -Now that the scripts are adjusted, you have to remove the Binutils -build and source directories. +Now that the adjusted linker is installed, you have to remove the +Binutils build and source directories. The next thing to do is to amend our GCC specs file so that it points to the new dynamic linker. A simple sed will accomplish this: diff --git a/chapter06/adjustingtoolchain.xml b/chapter06/adjustingtoolchain.xml index 522727785..55415a9e8 100644 --- a/chapter06/adjustingtoolchain.xml +++ b/chapter06/adjustingtoolchain.xml @@ -7,18 +7,16 @@ our toolchain. We'll adjust it so that it will link any newly compiled program against the new C libraries. Basically, this is the reverse of what we did in the "Locking in" stage in the beginning of the previous chapter. -The first thing to do is to adjust the linker scripts. For this we -retained the source and build directories from the second pass over Binutils. -Install the adjusted linker scripts by running the following from within the +The first thing to do is to adjust the linker. For this we retained the +source and build directories from the second pass over Binutils. Install the +adjusted linker by running the following from within the binutils-build directory: -make -C ld install-data-local +make -C ld install -The linker scripts now contain -no mention of /tools/lib anymore. -From now on every compiled program will link only -against the libraries in /usr/lib and -/lib. +From now on every compiled program will link only +against the libraries in /usr/lib and /lib +. You can now remove the Binutils source and build directories. @@ -34,14 +32,8 @@ mv newspecfile $SPECFILE unset SPECFILE Again, cutting and pasting the above is recommended. And just like -before, it is a good idea to check the linker scripts and the specs file to -ensure the intended changes were actually made. - -Note that the linker scripts will still contain a reference to -/tools/i686-pc-linux-gnu/lib. This -is unavoidable, but luckily does not present a problem. There are no -libraries in that location as all the temporary tools libraries are -located in /tools/lib. +before, it is a good idea to check the specs file to ensure the intended +changes were actually made. It is imperative at this point to stop and ensure that the basic functionality of the adjusted toolchain is working as expected. We are diff --git a/chapter06/glibc-inst.xml b/chapter06/glibc-inst.xml index 099dc4dc9..56c5d92b6 100644 --- a/chapter06/glibc-inst.xml +++ b/chapter06/glibc-inst.xml @@ -4,10 +4,10 @@ Glibc installation The Glibc build system is very well self-contained and will install -perfectly, even though our compiler specs file and linker scripts are still -pointing at /tools. We cannot adjust the specs and -ldscripts before the Glibc install, because the Glibc autoconf tests would then -give bogus results and thus defeat our goal of achieving a clean build. +perfectly, even though our compiler specs file and linker are still pointing +at /tools. We cannot adjust the specs and linker before +the Glibc install, because the Glibc autoconf tests would then give bogus +results and thus defeat our goal of achieving a clean build. The testsuite for Glibc in this chapter is considered critical. Do not skip it under any circumstances. diff --git a/index.xml b/index.xml index d14edb74d..815df3c32 100644 --- a/index.xml +++ b/index.xml @@ -3,8 +3,8 @@ "/usr/share/docbook/docbookx.dtd" [ - - + +