Author: jhuntwork
Date: 2007-07-24 15:15:16 -0600 (Tue, 24 Jul 2007)
New Revision: 8241

Modified:
   branches/x86_64/BOOK/chapter03/patches.xml
   branches/x86_64/BOOK/chapter04/creatingtoolsdir.xml
   branches/x86_64/BOOK/chapter05/adjusting.xml
   branches/x86_64/BOOK/chapter05/binutils-pass1.xml
   branches/x86_64/BOOK/chapter05/binutils-pass2.xml
   branches/x86_64/BOOK/chapter05/gcc-pass1.xml
   branches/x86_64/BOOK/chapter05/gcc-pass2.xml
   branches/x86_64/BOOK/chapter06/binutils.xml
   branches/x86_64/BOOK/chapter06/gcc.xml
   branches/x86_64/BOOK/chapter06/glibc.xml
   branches/x86_64/BOOK/chapter06/readjusting.xml
   branches/x86_64/BOOK/patches.ent
Log:
Bring the x86_64 build to working order.

Modified: branches/x86_64/BOOK/chapter03/patches.xml
===================================================================
--- branches/x86_64/BOOK/chapter03/patches.xml  2007-07-24 19:39:41 UTC (rev 
8240)
+++ branches/x86_64/BOOK/chapter03/patches.xml  2007-07-24 21:15:16 UTC (rev 
8241)
@@ -91,22 +91,14 @@
     </varlistentry>
 
     <varlistentry>
-      <term>GCC 64-bit Specs Patch - 
<token>&gcc-pure64-specs-patch-size;</token>:</term>
+      <term>GCC Specs Patch - <token>&gcc-specs-patch-size;</token>:</term>
       <listitem>
-        <para>Download: <ulink 
url="&patches-root;&gcc-pure64-specs-patch;"/></para>
-        <para>MD5 sum: <literal>&gcc-pure64-specs-patch-md5;</literal></para>
+        <para>Download: <ulink url="&patches-root;&gcc-specs-patch;"/></para>
+        <para>MD5 sum: <literal>&gcc-specs-patch-md5;</literal></para>
       </listitem>
     </varlistentry>
 
     <varlistentry>
-      <term>GCC Pure64 Patch - <token>&gcc-pure64-patch-size;</token>:</term>
-      <listitem>
-        <para>Download: <ulink url="&patches-root;&gcc-pure64-patch;"/></para>
-        <para>MD5 sum: <literal>&gcc-pure64-patch-md5;</literal></para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
       <term>Glibc Branch Update Patch - 
<token>&glibc-branch_update-patch-size;</token>:</term>
       <listitem>
         <para>Download: <ulink 
url="&patches-root;&glibc-branch_update-patch;"/></para>

Modified: branches/x86_64/BOOK/chapter04/creatingtoolsdir.xml
===================================================================
--- branches/x86_64/BOOK/chapter04/creatingtoolsdir.xml 2007-07-24 19:39:41 UTC 
(rev 8240)
+++ branches/x86_64/BOOK/chapter04/creatingtoolsdir.xml 2007-07-24 21:15:16 UTC 
(rev 8241)
@@ -45,4 +45,10 @@
   (when we are still using some tools from the host) and in the next (when
   we are <quote>chrooted</quote> to the LFS partition).</para>
 
+  <para>Set up a lib dir and appropriate symlink for 64-bit usability.</para>
+
+<screen><userinput>mkdir -v /tools/lib
+ln -sv lib /tools/lib64</userinput></screen>
+  
+
 </sect1>

Modified: branches/x86_64/BOOK/chapter05/adjusting.xml
===================================================================
--- branches/x86_64/BOOK/chapter05/adjusting.xml        2007-07-24 19:39:41 UTC 
(rev 8240)
+++ branches/x86_64/BOOK/chapter05/adjusting.xml        2007-07-24 21:15:16 UTC 
(rev 8241)
@@ -48,7 +48,7 @@
   </important>
 
 <!-- Ampersands are needed to allow copy and paste -->
-<screen><userinput>gcc -dumpspecs | sed 
's@/lib/ld-linux-x86-64.so.2@/tools&amp;@g' \
+<screen><userinput>gcc -dumpspecs | sed 
's@/lib64/ld-linux-x86-64.so.2@/tools&amp;@g' \
   > `dirname $(gcc -print-libgcc-file-name)`/specs</userinput></screen>
 
   <para>During the build process, GCC runs a script

Modified: branches/x86_64/BOOK/chapter05/binutils-pass1.xml
===================================================================
--- branches/x86_64/BOOK/chapter05/binutils-pass1.xml   2007-07-24 19:39:41 UTC 
(rev 8240)
+++ branches/x86_64/BOOK/chapter05/binutils-pass1.xml   2007-07-24 21:15:16 UTC 
(rev 8241)
@@ -60,7 +60,7 @@
     <para>Now prepare Binutils for compilation:</para>
 
 <screen><userinput>CC="gcc -B/usr/bin/" 
../binutils-&binutils-version;/configure \
-    --prefix=/tools --disable-nls --disable-multilib</userinput></screen>
+    --prefix=/tools --disable-nls</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure options:</title>
@@ -93,13 +93,6 @@
         </listitem>
       </varlistentry>
 
-      <varlistentry>
-        <term><parameter>--disable-multilib</parameter></term>
-        <listitem>
-          <para>We currently only want to build support for 64-bit 
libraries.</para>
-        </listitem>
-      </varlistentry>
-
     </variablelist>
 
     <para>Continue with compiling the package:</para>

Modified: branches/x86_64/BOOK/chapter05/binutils-pass2.xml
===================================================================
--- branches/x86_64/BOOK/chapter05/binutils-pass2.xml   2007-07-24 19:39:41 UTC 
(rev 8240)
+++ branches/x86_64/BOOK/chapter05/binutils-pass2.xml   2007-07-24 21:15:16 UTC 
(rev 8241)
@@ -45,8 +45,7 @@
     <para>Prepare Binutils for compilation:</para>
 
 <screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools \
-    --disable-nls --with-lib-path=/tools/lib \
-    --disable-multilib</userinput></screen>
+    --disable-nls --with-lib-path=/tools/lib</userinput></screen>
 
     <variablelist>
       <title>The meaning of the new configure options:</title>

Modified: branches/x86_64/BOOK/chapter05/gcc-pass1.xml
===================================================================
--- branches/x86_64/BOOK/chapter05/gcc-pass1.xml        2007-07-24 19:39:41 UTC 
(rev 8240)
+++ branches/x86_64/BOOK/chapter05/gcc-pass1.xml        2007-07-24 21:15:16 UTC 
(rev 8241)
@@ -37,11 +37,6 @@
   <sect2 role="installation">
     <title>Installation of GCC</title>
 
-    <para>Apply a small patch that changes the default location for
-    64-bit libraries:</para>
-
-<screen><userinput>patch -Np1 -i ../&gcc-pure64-patch;</userinput></screen>
-
     <para>The GCC documentation recommends building GCC outside of the
     source directory in a dedicated build directory:</para>
 

Modified: branches/x86_64/BOOK/chapter05/gcc-pass2.xml
===================================================================
--- branches/x86_64/BOOK/chapter05/gcc-pass2.xml        2007-07-24 19:39:41 UTC 
(rev 8240)
+++ branches/x86_64/BOOK/chapter05/gcc-pass2.xml        2007-07-24 21:15:16 UTC 
(rev 8241)
@@ -88,7 +88,7 @@
     dynamic linker (typically <filename
     class="libraryfile">ld-linux-x86-64.so.2</filename>):</para>
 
-<screen><userinput>patch -Np1 -i 
../&gcc-pure64-specs-patch;</userinput></screen>
+<screen><userinput>patch -Np1 -i ../&gcc-specs-patch;</userinput></screen>
 
     <para>The above patch also removes <filename
     class="directory">/usr/include</filename> from GCC's include search path.
@@ -102,6 +102,13 @@
       build. Do not forget to apply it.</para>
     </important>
 
+    <para>Usetting the multlib spec for GCC ensures that it
+    won't attempt to link against libraries on the host:</para>
+
+<screen><userinput>cp gcc/config/i386/t-linux64{,.tmp}
+sed '/MULTILIB_OSDIRNAMES/d' gcc/config/i386/t-linux64.tmp \
+  > gcc/config/i386/t-linux64</userinput></screen>
+
     <para>Create a separate build directory again:</para>
 
 <screen><userinput>mkdir -v ../gcc-build
@@ -199,11 +206,6 @@
 
 <screen><userinput>make install</userinput></screen>
 
-    <para>Since we're not building a multilib system, let's move some
-       installed libraries to a more generic location:</para>
-<screen><userinput>cp -va /tools/lib64/* /tools/lib
-rm -rvf /tools/lib64</userinput></screen>
-
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude";
     href="adjusting.xml"
     xpointer="xpointer(/sect1/caution[1])"/>

Modified: branches/x86_64/BOOK/chapter06/binutils.xml
===================================================================
--- branches/x86_64/BOOK/chapter06/binutils.xml 2007-07-24 19:39:41 UTC (rev 
8240)
+++ branches/x86_64/BOOK/chapter06/binutils.xml 2007-07-24 21:15:16 UTC (rev 
8241)
@@ -59,7 +59,7 @@
     <para>Prepare Binutils for compilation:</para>
 
 <screen><userinput>../binutils-&binutils-version;/configure --prefix=/usr \
-    --enable-shared --disable-multilib</userinput></screen>
+    --enable-shared</userinput></screen>
 
     <para>Compile the package:</para>
 

Modified: branches/x86_64/BOOK/chapter06/gcc.xml
===================================================================
--- branches/x86_64/BOOK/chapter06/gcc.xml      2007-07-24 19:39:41 UTC (rev 
8240)
+++ branches/x86_64/BOOK/chapter06/gcc.xml      2007-07-24 21:15:16 UTC (rev 
8241)
@@ -35,11 +35,6 @@
   <sect2 role="installation">
     <title>Installation of GCC</title>
 
-    <para>The following patch tells GCC to link to <filename class="directory">
-    /lib</filename> instead of <filename 
class="directory">/lib64</filename>.</para>
-
-<screen><userinput>patch -Np1 -i ../&gcc-pure64-patch;</userinput></screen>
-
     <para>Apply a <command>sed</command> substitution that will suppress the
     installation of <filename class="libraryfile">libiberty.a</filename>. The
     version of <filename class="libraryfile">libiberty.a</filename> provided by
@@ -190,7 +185,11 @@
     href="readjusting.xml"
     xpointer="xpointer(//[EMAIL PROTECTED]'k'])"/>
 
-<screen><computeroutput>SEARCH_DIR("/usr/x86_64-unknown-linux-gnu/lib")
+<screen><computeroutput>SEARCH_DIR("/usr/x86_64-unknown-linux-gnu/lib64")
+SEARCH_DIR("/usr/local/lib64")
+SEARCH_DIR("/lib64")
+SEARCH_DIR("/usr/lib64")
+SEARCH_DIR("/usr/x86_64-unknown-linux-gnu/lib")
 SEARCH_DIR("/usr/local/lib")
 SEARCH_DIR("/lib")
 SEARCH_DIR("/usr/lib");</computeroutput></screen>

Modified: branches/x86_64/BOOK/chapter06/glibc.xml
===================================================================
--- branches/x86_64/BOOK/chapter06/glibc.xml    2007-07-24 19:39:41 UTC (rev 
8240)
+++ branches/x86_64/BOOK/chapter06/glibc.xml    2007-07-24 21:15:16 UTC (rev 
8241)
@@ -101,16 +101,11 @@
 <screen><userinput>mkdir -v ../glibc-build
 cd ../glibc-build</userinput></screen>
 
-    <para>Tell Glibc to install its libraries in a more generic 
location:</para>
-
-<screen><userinput>echo "slibdir=/lib" &gt; configparms</userinput></screen>
-
     <para>Prepare Glibc for compilation:</para>
 
 <screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \
     --disable-profile --enable-add-ons \
-    --enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc \
-    --libdir=/usr/lib</userinput></screen>
+    --enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc</userinput></screen>
 
     <variablelist>
       <title>The meaning of the new configure options:</title>

Modified: branches/x86_64/BOOK/chapter06/readjusting.xml
===================================================================
--- branches/x86_64/BOOK/chapter06/readjusting.xml      2007-07-24 19:39:41 UTC 
(rev 8240)
+++ branches/x86_64/BOOK/chapter06/readjusting.xml      2007-07-24 21:15:16 UTC 
(rev 8241)
@@ -46,7 +46,7 @@
   </important>
 
 <screen><userinput>gcc -dumpspecs | sed \
-    -e 's@/tools/lib/ld-linux-x86-64.so.2@/lib/[EMAIL PROTECTED]' \
+    -e 's@/tools/lib64/ld-linux-x86-64.so.2@/lib64/[EMAIL PROTECTED]' \
     -e '/\*startfile_prefix_spec:/{n;[EMAIL PROTECTED]@/usr/lib/ @}' \
     -e '/\*cpp:/{n;[EMAIL PROTECTED]@ -isystem /usr/[EMAIL PROTECTED]' &gt; \
     `dirname $(gcc --print-libgcc-file-name)`/specs</userinput></screen>
@@ -105,12 +105,12 @@
 
   <para os="l">Next make sure that we're using the correct libc:</para>
 
-<screen os="m"><userinput>grep "/lib/libc.so.6 " dummy.log</userinput></screen>
+<screen os="m"><userinput>grep "/lib64/libc.so.6 " 
dummy.log</userinput></screen>
 
   <para os="n">If everything is working correctly, there should be no errors,
   and the output of the last command will be:</para>
 
-<screen os="o"><computeroutput>attempt to open /lib/libc.so.6 
succeeded</computeroutput></screen>
+<screen os="o"><computeroutput>attempt to open /lib64/libc.so.6 
succeeded</computeroutput></screen>
 
   <para os="p">Lastly, make sure GCC is using the correct dynamic 
linker:</para>
 

Modified: branches/x86_64/BOOK/patches.ent
===================================================================
--- branches/x86_64/BOOK/patches.ent    2007-07-24 19:39:41 UTC (rev 8240)
+++ branches/x86_64/BOOK/patches.ent    2007-07-24 21:15:16 UTC (rev 8241)
@@ -43,14 +43,10 @@
 <!ENTITY gawk-segfault-patch-md5 "7679530d88bf3eb56c42eb6aba342ddb">
 <!ENTITY gawk-segfault-patch-size "1.3 KB">
 
-<!ENTITY gcc-pure64-patch "gcc-&gcc-version;-pure64-1.patch">
-<!ENTITY gcc-pure64-patch-md5 "cea9bf46663392d627de81e2456698e3">
-<!ENTITY gcc-pure64-patch-size "6.7 KB">
+<!ENTITY gcc-specs-patch "gcc-&gcc-version;-specs-1.patch">
+<!ENTITY gcc-specs-patch-md5 "a17be8ccfb978e73f382be5093dd8abd">
+<!ENTITY gcc-specs-patch-size "14.8 KB">
 
-<!ENTITY gcc-pure64-specs-patch "gcc-&gcc-version;-pure64_specs-2.patch">
-<!ENTITY gcc-pure64-specs-patch-md5 "95b4541d7fa0e9a11f23af6db8b303d8">
-<!ENTITY gcc-pure64-specs-patch-size "17 KB">
-
 <!ENTITY glibc-branch_update-patch 
"glibc-&glibc-version;-branch_update-3.patch">
 <!ENTITY glibc-branch_update-patch-md5 "cbad3863a39eed9e52af083c5035f283">
 <!ENTITY glibc-branch_update-patch-size "2,538 KB">

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to