diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml
index e7c05bb18..d9f12bb3a 100644
--- a/chapter01/changelog.xml
+++ b/chapter01/changelog.xml
@@ -36,15 +36,25 @@
-->
+
+ January 30, 2006
+
+
+ [jhuntwork] - Adjust binutils-pass1 so we don't need to hang on to its
+ source directories. Also use 'gcc -dumpmachine' instead of the MACHTYPE var.
+
+
+
+
January 29, 2006
- [jhuntwork] - Restore the use of *startfile_prefix_spec.
+ [jhuntwork] - Restore the use of *startfile_prefix_spec.
[jhuntwork] - Remove a spurious -i from the perl command when
- readjusting the toolchain. Thanks Dan Nicholson.
+ readjusting the toolchain. Thanks Dan Nicholson.
diff --git a/chapter05/adjusting.xml b/chapter05/adjusting.xml
index b48a17128..f512b6cf4 100644
--- a/chapter05/adjusting.xml
+++ b/chapter05/adjusting.xml
@@ -15,27 +15,20 @@
these libraries. In order to accomplish this, the linker and the
compiler's specs file need to be adjusted.
- The linker, adjusted at the end of the first pass of Binutils,
- is installed by running the following command from within the
- binutils-build directory:
+ The linker, adjusted at the end of the first pass of Binutils, needs
+ to be renamed so that it can be properly found and used. First, backup the
+ original linker, then replace it with the adjusted linker. We'll also
+ create a link to its counterpart in
+ /tools/$(gcc -dumpmachine)/bin
-make -C ld install
+mv -v /tools/bin/{ld,ld-old}
+mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
+mv -v /tools/bin/{ld-new,ld}
+ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
From this point onwards, everything will link only against the
libraries in /tools/lib.
-
- If the earlier warning to retain the Binutils source and
- build directories from the first pass was missed, ignore the above
- command. This results in a small chance that the subsequent testing
- programs will link against libraries on the host. This is not ideal,
- but it is not a major problem. The situation is corrected when the
- second pass of Binutils is installed later.
-
-
- Now that the adjusted linker is installed, the Binutils build and source
- directories should be removed.
-
The next task is to point GCC to the new dynamic linker. This is done by
dumping GCC's specs
file to a location where GCC will look for it
by default. A simple sed substitution then alters the
diff --git a/chapter05/binutils-pass1.xml b/chapter05/binutils-pass1.xml
index 4435cfca0..a395c3dfe 100644
--- a/chapter05/binutils-pass1.xml
+++ b/chapter05/binutils-pass1.xml
@@ -105,7 +105,8 @@ cd ../binutils-build
later on:
make -C ld clean
-make -C ld LIB_PATH=/tools/lib
+make -C ld LDFLAGS="-s" LIB_PATH=/tools/lib
+cp -v ld/ld-new /tools/bin
The meaning of the make parameters:
@@ -120,10 +121,12 @@ make -C ld LIB_PATH=/tools/lib
- -C ld LIB_PATH=/tools/lib
+ -C ld LDFLAGS="-s" LIB_PATH=/tools/lib
This option rebuilds everything in the ld subdirectory. Specifying the
+ class="directory">ld subdirectory. The
+ LDFLAGS variable will build a static version of
+ ld. Specifying the
LIB_PATH Makefile variable on the command line
allows us to override the default value and point it to the
temporary tools location. The value of this variable specifies
@@ -134,12 +137,6 @@ make -C ld LIB_PATH=/tools/lib
-
- Do not remove the Binutils build and source
- directories yet. These will be needed again in their current state later
- in this chapter.
-
-
diff --git a/chapter06/readjusting.xml b/chapter06/readjusting.xml
index 4466b004c..4f77514b3 100644
--- a/chapter06/readjusting.xml
+++ b/chapter06/readjusting.xml
@@ -21,12 +21,12 @@ directories.
First, backup the /tools linker, and
replace it with the adjusted linker we made in chapter 5. We'll also create a
-link to its counterpart in /tools/$MACHTYPE/bin
+link to its counterpart in /tools/$(gcc -dumpmachine)/bin
mv -v /tools/bin/{ld,ld-old}
-mv -v /tools/$MACHTYPE/bin/{ld,ld-old}
+mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
mv -v /tools/bin/{ld-new,ld}
-ln -sv /tools/bin/ld /tools/$MACHTYPE/bin/ld
+ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
Next, amend the GCC specs file so that it points to the new
dynamic linker, and so that GCC knows where to find its start files.
diff --git a/general.ent b/general.ent
index 68c88c8b4..a86cc7279 100644
--- a/general.ent
+++ b/general.ent
@@ -1,6 +1,6 @@
-
-
+
+