Эх сурвалжийг харах

Initial changes to build x86_64 natively. Build needs testing and, very likely, some adjusting.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/x86_64/BOOK@8229 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Jeremy Huntwork 18 жил өмнө
parent
commit
1218687d10

+ 9 - 0
chapter01/changelog.xml

@@ -36,6 +36,15 @@
     </listitem>
 -->
 
+    <listitem>
+      <para>2007-07-23</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Initial changes to build x86_64 natively.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
     <listitem>
       <para>2007-07-17</para>
       <itemizedlist>

+ 2 - 2
chapter03/packages.xml

@@ -230,14 +230,14 @@
       </listitem>
     </varlistentry>
 
-    <varlistentry>
+<!--    <varlistentry>
       <term>GRUB (&grub-version;) - <token>&grub-size;</token>:</term>
       <listitem>
         <para>Home page: <ulink url="&grub-home;"/></para>
         <para>Download: <ulink url="&grub-url;"/></para>
         <para>MD5 sum: <literal>&grub-md5;</literal></para>
       </listitem>
-    </varlistentry>
+    </varlistentry> -->
 
     <varlistentry>
       <term>Gzip (&gzip-version;) - <token>&gzip-size;</token>:</term>

+ 13 - 5
chapter03/patches.xml

@@ -91,10 +91,18 @@
     </varlistentry>
 
     <varlistentry>
-      <term>GCC Specs Patch - <token>&gcc-specs-patch-size;</token>:</term>
+      <term>GCC 64-bit Specs Patch - <token>&gcc-pure64-specs-patch-size;</token>:</term>
       <listitem>
-        <para>Download: <ulink url="&patches-root;&gcc-specs-patch;"/></para>
-        <para>MD5 sum: <literal>&gcc-specs-patch-md5;</literal></para>
+        <para>Download: <ulink url="&patches-root;&gcc-pure64-specs-patch;"/></para>
+        <para>MD5 sum: <literal>&gcc-pure64-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>
 
@@ -122,13 +130,13 @@
       </listitem>
     </varlistentry>
 
-    <varlistentry>
+<!--    <varlistentry>
       <term>GRUB Disk Geometry Patch - <token>&grub-geometry-patch-size;</token>:</term>
       <listitem>
         <para>Download: <ulink url="&patches-root;&grub-geometry-patch;"/></para>
         <para>MD5 sum: <literal>&grub-geometry-patch-md5;</literal></para>
       </listitem>
-    </varlistentry>
+    </varlistentry> -->
 
     <varlistentry>
       <term>Inetutils No-Server-Man-Pages Patch - <token>&inetutils-man_pages-patch-size;</token>:</term>

+ 2 - 2
chapter05/adjusting.xml

@@ -48,7 +48,7 @@ ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld</userinput></screen>
   </important>
 
 <!-- Ampersands are needed to allow copy and paste -->
-<screen><userinput>gcc -dumpspecs | sed 's@^/lib/ld-linux.so.2@/tools&amp;@g' \
+<screen><userinput>gcc -dumpspecs | sed 's@/lib/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
@@ -84,7 +84,7 @@ readelf -l a.out | grep ': /tools'</userinput></screen>
     and the output of the last command will be of the form:</para>
 
 <screen><computeroutput>[Requesting program interpreter:
-    /tools/lib/ld-linux.so.2]</computeroutput></screen>
+    /tools/lib/ld-linux-x86-64.so.2]</computeroutput></screen>
 
     <para>Note that <filename class="directory">/tools/lib</filename>
     appears as the prefix of the dynamic linker.</para>

+ 8 - 1
chapter05/binutils-pass1.xml

@@ -60,7 +60,7 @@ cd ../binutils-build</userinput></screen>
     <para>Now prepare Binutils for compilation:</para>
 
 <screen><userinput>CC="gcc -B/usr/bin/" ../binutils-&binutils-version;/configure \
-    --prefix=/tools --disable-nls</userinput></screen>
+    --prefix=/tools --disable-nls --disable-multilib</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure options:</title>
@@ -93,6 +93,13 @@ cd ../binutils-build</userinput></screen>
         </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>

+ 2 - 1
chapter05/binutils-pass2.xml

@@ -45,7 +45,8 @@ cd ../binutils-build</userinput></screen>
     <para>Prepare Binutils for compilation:</para>
 
 <screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools \
-    --disable-nls --with-lib-path=/tools/lib</userinput></screen>
+    --disable-nls --with-lib-path=/tools/lib \
+    --disable-multilib</userinput></screen>
 
     <variablelist>
       <title>The meaning of the new configure options:</title>

+ 13 - 1
chapter05/gcc-pass1.xml

@@ -37,6 +37,11 @@
   <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>
 
@@ -47,7 +52,7 @@ cd ../gcc-build</userinput></screen>
 
 <screen><userinput>CC="gcc -B/usr/bin/" ../gcc-&gcc-version;/configure --prefix=/tools \
     --with-local-prefix=/tools --disable-nls --enable-shared \
-    --enable-languages=c</userinput></screen>
+    --enable-languages=c --disable-multilib</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure options:</title>
@@ -93,6 +98,13 @@ cd ../gcc-build</userinput></screen>
         </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>

+ 8 - 3
chapter05/gcc-pass2.xml

@@ -86,9 +86,9 @@ sed 's/^XCFLAGS =$/&amp; -fomit-frame-pointer/' gcc/Makefile.in.tmp \
 
     <para>Apply the following patch to change the location of GCC's default
     dynamic linker (typically <filename
-    class="libraryfile">ld-linux.so.2</filename>):</para>
+    class="libraryfile">ld-linux-x86-64.so.2</filename>):</para>
 
-<screen><userinput>patch -Np1 -i ../&gcc-specs-patch;</userinput></screen>
+<screen><userinput>patch -Np1 -i ../&gcc-pure64-specs-patch;</userinput></screen>
 
     <para>The above patch also removes <filename
     class="directory">/usr/include</filename> from GCC's include search path.
@@ -116,7 +116,7 @@ cd ../gcc-build</userinput></screen>
     --with-local-prefix=/tools --enable-clocale=gnu \
     --enable-shared --enable-threads=posix \
     --enable-__cxa_atexit --enable-languages=c,c++ \
-    --disable-libstdcxx-pch</userinput></screen>
+    --disable-libstdcxx-pch --disable-multilib</userinput></screen>
 
     <variablelist>
       <title>The meaning of the new configure options:</title>
@@ -199,6 +199,11 @@ cd ../gcc-build</userinput></screen>
 
 <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])"/>

+ 1 - 1
chapter06/chapter06.xml

@@ -44,7 +44,7 @@
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="file.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="findutils.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="flex.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="grub.xml"/>
+<!--  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="grub.xml"/> -->
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gawk.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gettext.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="grep.xml"/>

+ 2 - 0
chapter06/creatingdirs.xml

@@ -24,6 +24,8 @@ mkdir -pv /usr/{,local/}share/man/man{1..8}
 for dir in /usr /usr/local; do
   ln -sv share/{man,doc,info} $dir
 done
+ln -sv lib /lib64
+ln -sv lib /usr/lib64
 mkdir -v /var/{lock,log,mail,run,spool}
 mkdir -pv /var/{opt,cache,lib/{misc,locate},local}</userinput></screen>
 

+ 1 - 1
chapter06/glibc.xml

@@ -79,7 +79,7 @@ mv glibc-libidn-&glibc-version; libidn</userinput></screen>
     to check the Glibc we have just installed with the following:</para>
 
 <screen><userinput>sed -i \
-'s|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.2 -o|' \
+'s|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux-x86-64.so.2 -o|' \
         scripts/test-installation.pl</userinput></screen>
 
     <para>Apply a patch to obtain various fixes that the upstream maintainers

+ 2 - 2
general.ent

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!ENTITY version "SVN-20070714">
-<!ENTITY releasedate "July 14, 2007">
+<!ENTITY version "SVN-x86_64-20070723">
+<!ENTITY releasedate "July 23, 2007">
 <!ENTITY milestone "6.3">
 <!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->
 

+ 6 - 4
patches.ent

@@ -43,11 +43,13 @@
 <!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-1.patch">
+<!ENTITY gcc-pure64-specs-patch-md5 "99e0ae890fce0614be210e83f0a5b975">
+<!ENTITY gcc-pure64-specs-patch-size "15 KB">
 
 <!ENTITY glibc-branch_update-patch "glibc-&glibc-version;-branch_update-3.patch">
 <!ENTITY glibc-branch_update-patch-md5 "cbad3863a39eed9e52af083c5035f283">