r1143 - in trunk/BOOK: . chapter01 chapter05

robert at linuxfromscratch.org robert at linuxfromscratch.org
Fri Jun 8 00:49:32 PDT 2007


Author: robert
Date: 2007-06-08 01:49:32 -0600 (Fri, 08 Jun 2007)
New Revision: 1143

Modified:
   trunk/BOOK/chapter01/changelog.xml
   trunk/BOOK/chapter05/embryo-toolchain.xml
   trunk/BOOK/chapter05/introduction.xml
   trunk/BOOK/general.ent
Log:
Added -fpic back to embryo toolchain

Modified: trunk/BOOK/chapter01/changelog.xml
===================================================================
--- trunk/BOOK/chapter01/changelog.xml	2007-06-07 19:00:55 UTC (rev 1142)
+++ trunk/BOOK/chapter01/changelog.xml	2007-06-08 07:49:32 UTC (rev 1143)
@@ -49,6 +49,15 @@
 -->
 
     <listitem>
+      <para>June 8th, 2007</para>
+      <itemizedlist>
+        <listitem>
+          <para>[robert]: Added -fpic back to embryo toolchain.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
       <para>June 6th, 2007</para>
       <itemizedlist>
         <listitem>

Modified: trunk/BOOK/chapter05/embryo-toolchain.xml
===================================================================
--- trunk/BOOK/chapter05/embryo-toolchain.xml	2007-06-07 19:00:55 UTC (rev 1142)
+++ trunk/BOOK/chapter05/embryo-toolchain.xml	2007-06-08 07:49:32 UTC (rev 1143)
@@ -59,6 +59,22 @@
     <filename class="directory">include</filename> directory, for
     binutils-&binutils-version; to compile correctly.</para>
 
+    <para role="aslr">There is a circular dependency issue when we will build
+    libc's utilities as Position Independent Executables (PIE's). The
+    start-files from this toolchain are used when building libc, and the second
+    toolchain we build in this chapter uses files from libc which were linked
+    to files from this toolchain. The smoothest way of dealing with this is to
+    add the <option>-fPIC</option> to this GCC's specs file, and during the
+    bootstrap we will begin to escape from a non-position-independent-code
+    toolchain. The libc in this chapter will also be built with
+    <option>-fPIC</option>, and we will have sucessfully built a purely PIC
+    toolchain which can in turn build a purely PIC final system. Add
+    <option>-fPIC</option> to the GCC specs file with the following command:</para>
+
+<screen role="aslr"><userinput>cp -vi gcc/config/i386/linux.h{,.orig}
+sed 's/^\(#define CC1_SPEC.*\)\("\)$/\1 %{fno-pic|fpic|fPIC:;:-fPIC}\2/' \
+    gcc/config/i386/linux.h.orig > gcc/config/i386/linux.h</userinput></screen>
+
     <para>The GCC and Binutils documentation recommends building outside
     of the source directory in a dedicated build directory:</para>
 

Modified: trunk/BOOK/chapter05/introduction.xml
===================================================================
--- trunk/BOOK/chapter05/introduction.xml	2007-06-07 19:00:55 UTC (rev 1142)
+++ trunk/BOOK/chapter05/introduction.xml	2007-06-08 07:49:32 UTC (rev 1143)
@@ -80,7 +80,7 @@
   <para>Check one last time that the <envar>HLFS</envar> environment
   variable is set up properly:</para>
 
-<screen rolr="nodump"><userinput>echo $HLFS</userinput></screen>
+<screen role="nodump"><userinput>echo $HLFS</userinput></screen>
 
   <para>Make sure the output shows the path to the HLFS partition's mount
   point, which is <filename class="directory">/mnt/hlfs</filename>, using

Modified: trunk/BOOK/general.ent
===================================================================
--- trunk/BOOK/general.ent	2007-06-07 19:00:55 UTC (rev 1142)
+++ trunk/BOOK/general.ent	2007-06-08 07:49:32 UTC (rev 1143)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!ENTITY version "SVN-20070606">
-<!ENTITY releasedate "June 6th, 2007">
+<!ENTITY version "SVN-20070608">
+<!ENTITY releasedate "June 8th, 2007">
 <!ENTITY milestone "1.1">
 
 <!ENTITY lfs-root "http://www.linuxfromscratch.org/">




More information about the hlfs-book mailing list