[lfs-book] r10561 - in trunk/BOOK: . chapter01 chapter03 chapter05 chapter06

bdubbs at higgs.linuxfromscratch.org bdubbs at higgs.linuxfromscratch.org
Sun May 11 14:58:56 PDT 2014


Author: bdubbs
Date: Sun May 11 14:58:56 2014
New Revision: 10561

Log:
Add a patch to binutils to enable LTO with gcc-4.9.0. 
Remove omit-frame-pointer in gcc-pass2 and Chapter 6 gcc.

Modified:
   trunk/BOOK/chapter01/changelog.xml
   trunk/BOOK/chapter01/whatsnew.xml
   trunk/BOOK/chapter03/patches.xml
   trunk/BOOK/chapter05/gcc-pass2.xml
   trunk/BOOK/chapter06/binutils.xml
   trunk/BOOK/chapter06/gcc.xml
   trunk/BOOK/general.ent
   trunk/BOOK/patches.ent

Modified: trunk/BOOK/chapter01/changelog.xml
==============================================================================
--- trunk/BOOK/chapter01/changelog.xml	Sun May 11 08:02:47 2014	(r10560)
+++ trunk/BOOK/chapter01/changelog.xml	Sun May 11 14:58:56 2014	(r10561)
@@ -39,14 +39,19 @@
       <para>2014-05-11</para>
       <itemizedlist>
         <listitem>
+          <para>[bdubbs] - Add a patch to binutils to enable LTO 
+          with gcc-4.9.0. Fixes
+          <ulink url="&lfs-ticket-root;3569">#3569</ulink>.</para>
+        </listitem>
+        <listitem>
           <para>[bdubbs] - Update bootscripts for eudev.</para>
         </listitem>
         <listitem>
           <para>[bdubbs] - Add gcc patch for upstream changes.</para>
         </listitem>
         <listitem>
-          <para>[bdubbs] - Change explanation for using 
-          omit-frame-pointer in gcc-pass2. Fixes
+          <para>[bdubbs] - Remove omit-frame-pointer in gcc-pass2
+          and Chapter 6 gcc. Fixes
           <ulink url="&lfs-ticket-root;3562">#3562</ulink>.</para>
         </listitem>
       </itemizedlist>

Modified: trunk/BOOK/chapter01/whatsnew.xml
==============================================================================
--- trunk/BOOK/chapter01/whatsnew.xml	Sun May 11 08:02:47 2014	(r10560)
+++ trunk/BOOK/chapter01/whatsnew.xml	Sun May 11 14:58:56 2014	(r10561)
@@ -239,6 +239,9 @@
       <para>&bc-memory-leak-patch;</para>
     </listitem>
     <listitem>
+      <para>&binutils-lto-patch;</para>
+    </listitem>
+    <listitem>
       <para>&coreutils-shuf-segfault-patch;</para>
     </listitem>
     <!--<listitem>

Modified: trunk/BOOK/chapter03/patches.xml
==============================================================================
--- trunk/BOOK/chapter03/patches.xml	Sun May 11 08:02:47 2014	(r10560)
+++ trunk/BOOK/chapter03/patches.xml	Sun May 11 14:58:56 2014	(r10561)
@@ -35,6 +35,14 @@
     </varlistentry>
 
     <varlistentry>
+      <term>Binutils LTO Patch - <token>&binutils-lto-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&binutils-lto-patch;"/></para>
+        <para>MD5 sum: <literal>&binutils-lto-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Bzip2 Documentation Patch - <token>&bzip2-docs-patch-size;</token>:</term>
       <listitem>
         <para>Download: <ulink url="&patches-root;&bzip2-docs-patch;"/></para>

Modified: trunk/BOOK/chapter05/gcc-pass2.xml
==============================================================================
--- trunk/BOOK/chapter05/gcc-pass2.xml	Sun May 11 08:02:47 2014	(r10560)
+++ trunk/BOOK/chapter05/gcc-pass2.xml	Sun May 11 14:58:56 2014	(r10561)
@@ -57,15 +57,15 @@
 
 <screen><userinput remap="pre">cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
   `dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/include-fixed/limits.h</userinput></screen>
-
+<!--
     <para>For x86 machines, the limited number of registers is a bottleneck
-    for the system.  Free one up by not using a fram pointer that is not
+    for the system.  Free one up by not using a frame pointer that is not
     needed:</para>
 
 <screen><userinput remap="pre">case `uname -m` in
   i?86) sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in ;;
 esac</userinput></screen>
-
+-->
     <para>Once again, change the location of GCC's default dynamic linker to
     use the one installed in <filename
     class="directory">/tools</filename>.</para>

Modified: trunk/BOOK/chapter06/binutils.xml
==============================================================================
--- trunk/BOOK/chapter06/binutils.xml	Sun May 11 08:02:47 2014	(r10560)
+++ trunk/BOOK/chapter06/binutils.xml	Sun May 11 14:58:56 2014	(r10561)
@@ -64,6 +64,11 @@
 <screen><userinput remap="pre">rm -fv etc/standards.info
 sed -i.bak '/^INFO/s/standards.info //' etc/Makefile.in</userinput></screen>
 
+    <para>Add an upstream patch to use gcc's link time optimization (LTO) 
+    the default:</para>
+
+<screen><userinput remap="pre">patch -Np1 -i ../&binutils-lto-patch;</userinput></screen>
+
     <para>The Binutils documentation recommends building Binutils outside of the
     source directory in a dedicated build directory:</para>
 
@@ -114,15 +119,9 @@
     <para>Install the package:</para>
 
 <screen><userinput remap="install">make tooldir=/usr install</userinput></screen>
-<!--
-    <para>Install the <filename class="headerfile">libiberty</filename> header
-    file that is needed by some packages:</para>
 
-<screen><userinput remap="install">cp -v ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen>
--->
   </sect2>
 
-
   <sect2 id="contents-binutils" role="content">
     <title>Contents of Binutils</title>
 

Modified: trunk/BOOK/chapter06/gcc.xml
==============================================================================
--- trunk/BOOK/chapter06/gcc.xml	Sun May 11 08:02:47 2014	(r10560)
+++ trunk/BOOK/chapter06/gcc.xml	Sun May 11 14:58:56 2014	(r10561)
@@ -45,7 +45,7 @@
     programs to fail:</para>
 
 <screen><userinput remap="pre">patch -Np1 -i ../&gcc-upstream-patch;</userinput></screen>
-
+<!--
     <para>As in <xref linkend="ch-tools-gcc-pass2"/>, apply the following
     <command>sed</command> to force the build to use the
     <option>-fomit-frame-pointer</option> compiler flag in order to ensure
@@ -54,7 +54,7 @@
 <screen><userinput remap="pre">case `uname -m` in
   i?86) sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in ;;
 esac</userinput></screen>
-
+-->
     <para>The GCC documentation recommends building GCC outside of the source
     directory in a dedicated build directory:</para>
 
@@ -150,6 +150,14 @@
 
 <screen><userinput remap="install">ln -sv gcc /usr/bin/cc</userinput></screen>
 
+    <para>Add a compatibility symlink to enable building programs with
+    Link Time Optimization (LTO):</para> 
+
+<screen><userinput remap="install">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</userinput></screen>
+
     <para>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:</para>

Modified: trunk/BOOK/general.ent
==============================================================================
--- trunk/BOOK/general.ent	Sun May 11 08:02:47 2014	(r10560)
+++ trunk/BOOK/general.ent	Sun May 11 14:58:56 2014	(r10561)
@@ -1,6 +1,6 @@
-<!ENTITY version         "SVN-20140510">
+<!ENTITY version         "SVN-20140511">
 <!ENTITY short-version   "svn">  <!-- Used in dbus chapter, change to x.y for release -->
-<!ENTITY releasedate     "May 10, 2014">
+<!ENTITY releasedate     "May 11, 2014">
 <!ENTITY copyrightdate   "1999-2014"><!-- jhalfs needs a literal dash, not – -->
 <!ENTITY milestone       "8.0">
 <!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->

Modified: trunk/BOOK/patches.ent
==============================================================================
--- trunk/BOOK/patches.ent	Sun May 11 08:02:47 2014	(r10560)
+++ trunk/BOOK/patches.ent	Sun May 11 14:58:56 2014	(r10561)
@@ -6,6 +6,10 @@
 <!ENTITY bash-fixes-patch-md5 "749b4b520708300b64f8166ba2b1b4a0">
 <!ENTITY bash-fixes-patch-size "14 KB">
 
+<!ENTITY binutils-lto-patch "binutils-&binutils-version;-load_gcc_lto_plugin_by_default-1.patch">
+<!ENTITY binutils-lto-patch-md5 "48e4e96a60bfed41804aaecf4944f5d9">
+<!ENTITY binutils-lto-patch-size "2.0 KB">
+
 <!ENTITY bc-memory-leak-patch "bc-&bc-version;-memory_leak-1.patch">
 <!ENTITY bc-memory-leak-patch-md5 "877e81fba316fe487ec23501059d54b8">
 <!ENTITY bc-memory-leak-patch-size "1.4 KB">


More information about the lfs-book mailing list