Selaa lähdekoodia

Remove the -m64 sections from binutils and gcc pass 1. Tests show the 32-bit binaries produce the wanted 64-bit code.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/jh/BOOK@8365 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Jeremy Huntwork 18 vuotta sitten
vanhempi
commit
4759793f90
6 muutettua tiedostoa jossa 23 lisäystä ja 38 poistoa
  1. 10 0
      chapter01/changelog.xml
  2. 3 19
      chapter05/binutils-pass1.xml
  3. 4 9
      chapter05/gcc-pass1.xml
  4. 2 4
      chapter05/gcc-pass2.xml
  5. 2 4
      chapter06/gcc.xml
  6. 2 2
      general.ent

+ 10 - 0
chapter01/changelog.xml

@@ -36,6 +36,16 @@
     </listitem>
 -->
 
+    <listitem>
+      <para>2007-09-03</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Remove -m64 from binutils and gcc pass 1. Tests show that the 32-bit binary
+	  versions still produce the wanted 64-bit code.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
     <listitem>
       <para>2007-08-31</para>
       <itemizedlist>

+ 3 - 19
chapter05/binutils-pass1.xml

@@ -57,38 +57,22 @@ cd ../binutils-build</userinput></screen>
       &amp;&amp; make install; }</userinput>.</para>
     </note>
 
-    <para>Test to see if the host is a 64-bit capable machine and set a variable
-    if it is.</para>
-
-<screen><userinput>test $(uname -m | grep 64) &amp;&amp; M64="-m64"</userinput></screen>
-
     <para>Now prepare Binutils for compilation:</para>
 
-<screen><userinput>CC="gcc -B/usr/bin/ $M64" ../binutils-&binutils-version;/configure \
-    --prefix=/tools --disable-nls --disable-werror
-unset M64</userinput></screen>
+<screen><userinput>CC="gcc -B/usr/bin/" ../binutils-&binutils-version;/configure \
+    --prefix=/tools --disable-nls --disable-werror</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure options:</title>
 
       <varlistentry>
-        <term><envar>CC="gcc -B/usr/bin/ $M64"</envar></term>
+        <term><envar>CC="gcc -B/usr/bin/"</envar></term>
         <listitem>
           <para>This forces <command>gcc</command> to prefer the linker from
           the host in <filename class="directory">/usr/bin</filename>. This
           is necessary on some hosts where the new <command>ld</command>
           built here is not compatible with the host's <command>gcc</command>.
           </para>
-	  <para>Also, if the cpu-type is 64-bit capable, the variable <envar>$M64</envar>
-	  will contain the parameter <parameter>-m64</parameter>. Otherwise, the
-	  variable is empty. The parameter forces <command>gcc</command> to build
-	  64-bit binaries. Using that parameter here and for the next package
-	  ensures creation of a linker, assembler and compiler that will in turn
-	  create only 64-bit binaries. This is necessary since currently this book
-	  does not support the creation of multilib systems, i.e., those with both
-	  32-bit and 64-bit libraries. This will only make a difference on hosts that
-	  are themselves multilib and employ a compiler that creates 32-bit binaries
-	  by default.</para>
         </listitem>
       </varlistentry>
 

+ 4 - 9
chapter05/gcc-pass1.xml

@@ -43,22 +43,17 @@
 <screen><userinput>mkdir -v ../gcc-build
 cd ../gcc-build</userinput></screen>
 
-    <para>Test to see if the host is a multilib capable machine and set a variable 
-    if it is. This ensures that only 64-bit binaries are built if using such a host.
-    Also, the --with-arch flag is only necessary for x86 machines.</para>
+    <para>Set the --with-arch flag if the machine is x86:</para>
 
-<screen><userinput>case $(uname -m) in
-  i?86) WITHARCH="--with-arch=i486" ;;
-  x86_64) M64="-m64" ;;
-esac</userinput></screen>
+<screen><userinput>test $(uname -m | grep i?86) &amp;&amp; WITHARCH="--with-arch=i486"</userinput></screen>
 
     <para>Prepare GCC for compilation:</para>
 
-<screen><userinput>CC="gcc -B/usr/bin/ $M64" ../gcc-&gcc-version;/configure --prefix=/tools \
+<screen><userinput>CC="gcc -B/usr/bin/" ../gcc-&gcc-version;/configure --prefix=/tools \
     --with-local-prefix=/tools --disable-nls --disable-shared \
     --enable-languages=c --disable-multilib \
     $WITHARCH
-unset M64 WITHARCH</userinput></screen>
+unset WITHARCH</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure options:</title>

+ 2 - 4
chapter05/gcc-pass2.xml

@@ -134,11 +134,9 @@ cd ../gcc-build</userinput></screen>
     <para>Before starting to build GCC, remember to unset any environment
     variables that override the default optimization flags.</para>
 
-    <para>The --with-arch flag is only necessary for x86 machines.</para>
+    <para>Set the --with-arch flag if the machine is x86:</para>
 
-<screen><userinput>case $(uname -m) in
-  i?86) WITHARCH="--with-arch=i486" ;;
-esac</userinput></screen>
+<screen><userinput>test $(uname -m | grep i?86) &amp;&amp; WITHARCH="--with-arch=i486"</userinput></screen>
 
     <para>Now prepare GCC for compilation:</para>
 

+ 2 - 4
chapter06/gcc.xml

@@ -72,11 +72,9 @@
 <screen><userinput>mkdir -v ../gcc-build
 cd ../gcc-build</userinput></screen>
 
-    <para>The --with-arch flag is only necessary for x86 machines.</para>
+    <para>Set the --with-arch flag if the machine is x86:</para>
 
-<screen><userinput>case $(uname -m) in
-  i?86) WITHARCH="--with-arch=i486" ;;
-esac</userinput></screen>
+<screen><userinput>test $(uname -m | grep i?86) &amp;&amp; WITHARCH="--with-arch=i486"</userinput></screen>
 
     <para>Prepare GCC for compilation:</para>
 

+ 2 - 2
general.ent

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!ENTITY version "SVN-JH-20070831">
-<!ENTITY releasedate "August 31, 2007">
+<!ENTITY version "SVN-JH-20070903">
+<!ENTITY releasedate "September 03, 2007">
 <!ENTITY milestone "7.0">
 <!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->