diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml
index d83a3156c..2acc8b345 100644
--- a/chapter01/changelog.xml
+++ b/chapter01/changelog.xml
@@ -38,6 +38,11 @@
2014-05-11
+
+ [bdubbs] - Add a patch to binutils to enable LTO
+ with gcc-4.9.0. Fixes
+ #3569.
+
[bdubbs] - Update bootscripts for eudev.
@@ -45,8 +50,8 @@
[bdubbs] - Add gcc patch for upstream changes.
- [bdubbs] - Change explanation for using
- omit-frame-pointer in gcc-pass2. Fixes
+ [bdubbs] - Remove omit-frame-pointer in gcc-pass2
+ and Chapter 6 gcc. Fixes
#3562.
diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml
index 734811852..0c0e6c336 100644
--- a/chapter01/whatsnew.xml
+++ b/chapter01/whatsnew.xml
@@ -238,6 +238,9 @@
&bc-memory-leak-patch;
+
+ &binutils-lto-patch;
+
&coreutils-shuf-segfault-patch;
diff --git a/chapter03/patches.xml b/chapter03/patches.xml
index 260f09a87..27c23a6f2 100644
--- a/chapter03/patches.xml
+++ b/chapter03/patches.xml
@@ -34,6 +34,14 @@
+
+ Binutils LTO Patch - &binutils-lto-patch-size;:
+
+ Download:
+ MD5 sum: &binutils-lto-patch-md5;
+
+
+
Bzip2 Documentation Patch - &bzip2-docs-patch-size;:
diff --git a/chapter05/gcc-pass2.xml b/chapter05/gcc-pass2.xml
index ce24a3867..27c411306 100644
--- a/chapter05/gcc-pass2.xml
+++ b/chapter05/gcc-pass2.xml
@@ -57,15 +57,15 @@
cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
`dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/include-fixed/limits.h
-
+
Once again, change the location of GCC's default dynamic linker to
use the one installed in /tools.
diff --git a/chapter06/binutils.xml b/chapter06/binutils.xml
index ae8aff092..8daeb5616 100644
--- a/chapter06/binutils.xml
+++ b/chapter06/binutils.xml
@@ -64,6 +64,11 @@ Ask your system administrator to create more.
rm -fv etc/standards.info
sed -i.bak '/^INFO/s/standards.info //' etc/Makefile.in
+ Add an upstream patch to use gcc's link time optimization (LTO)
+ the default:
+
+patch -Np1 -i ../&binutils-lto-patch;
+
The Binutils documentation recommends building Binutils outside of the
source directory in a dedicated build directory:
@@ -114,15 +119,9 @@ cd ../binutils-build
Install the package:
make tooldir=/usr install
-
-
Contents of Binutils
diff --git a/chapter06/gcc.xml b/chapter06/gcc.xml
index 7c92ccf28..c1434e7e3 100644
--- a/chapter06/gcc.xml
+++ b/chapter06/gcc.xml
@@ -45,7 +45,7 @@
programs to fail:
patch -Np1 -i ../&gcc-upstream-patch;
-
+
The GCC documentation recommends building GCC outside of the source
directory in a dedicated build directory:
@@ -150,6 +150,14 @@ cd ../gcc-build
ln -sv gcc /usr/bin/cc
+ Add a compatibility symlink to enable building programs with
+ Link Time Optimization (LTO):
+
+install -dm755 /usr/lib/bfd-plugins
+pushd /usr/lib/bfd-plugins
+ln -sfv ../../libexec/gcc/x86_64-unknown-linux-gnu/&gcc-version;/liblto_plugin.so
+popd
+
Now that our final toolchain is in place, it is important to again ensure
that compiling and linking will work as expected. We do this by performing
the same sanity checks as we did earlier in the chapter:
diff --git a/general.ent b/general.ent
index b11a284a4..7c4afa17f 100644
--- a/general.ent
+++ b/general.ent
@@ -1,6 +1,6 @@
-
+
-
+
diff --git a/patches.ent b/patches.ent
index 20cb11d5a..32d66f6f0 100644
--- a/patches.ent
+++ b/patches.ent
@@ -6,6 +6,10 @@
+
+
+
+