r8365 - in branches/jh/BOOK: . chapter01 chapter05 chapter06

jhuntwork at linuxfromscratch.org jhuntwork at linuxfromscratch.org
Sun Sep 2 22:07:19 PDT 2007


Author: jhuntwork
Date: 2007-09-02 23:07:19 -0600 (Sun, 02 Sep 2007)
New Revision: 8365

Modified:
   branches/jh/BOOK/chapter01/changelog.xml
   branches/jh/BOOK/chapter05/binutils-pass1.xml
   branches/jh/BOOK/chapter05/gcc-pass1.xml
   branches/jh/BOOK/chapter05/gcc-pass2.xml
   branches/jh/BOOK/chapter06/gcc.xml
   branches/jh/BOOK/general.ent
Log:
Remove the -m64 sections from binutils and gcc pass 1. Tests show the 32-bit binaries produce the wanted 64-bit code.

Modified: branches/jh/BOOK/chapter01/changelog.xml
===================================================================
--- branches/jh/BOOK/chapter01/changelog.xml	2007-09-01 03:11:54 UTC (rev 8364)
+++ branches/jh/BOOK/chapter01/changelog.xml	2007-09-03 05:07:19 UTC (rev 8365)
@@ -37,6 +37,16 @@
 -->
 
     <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>
         <listitem>

Modified: branches/jh/BOOK/chapter05/binutils-pass1.xml
===================================================================
--- branches/jh/BOOK/chapter05/binutils-pass1.xml	2007-09-01 03:11:54 UTC (rev 8364)
+++ branches/jh/BOOK/chapter05/binutils-pass1.xml	2007-09-03 05:07:19 UTC (rev 8365)
@@ -57,38 +57,22 @@
       && 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) && 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>
 

Modified: branches/jh/BOOK/chapter05/gcc-pass1.xml
===================================================================
--- branches/jh/BOOK/chapter05/gcc-pass1.xml	2007-09-01 03:11:54 UTC (rev 8364)
+++ branches/jh/BOOK/chapter05/gcc-pass1.xml	2007-09-03 05:07:19 UTC (rev 8365)
@@ -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) && 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>

Modified: branches/jh/BOOK/chapter05/gcc-pass2.xml
===================================================================
--- branches/jh/BOOK/chapter05/gcc-pass2.xml	2007-09-01 03:11:54 UTC (rev 8364)
+++ branches/jh/BOOK/chapter05/gcc-pass2.xml	2007-09-03 05:07:19 UTC (rev 8365)
@@ -134,11 +134,9 @@
     <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) && WITHARCH="--with-arch=i486"</userinput></screen>
 
     <para>Now prepare GCC for compilation:</para>
 

Modified: branches/jh/BOOK/chapter06/gcc.xml
===================================================================
--- branches/jh/BOOK/chapter06/gcc.xml	2007-09-01 03:11:54 UTC (rev 8364)
+++ branches/jh/BOOK/chapter06/gcc.xml	2007-09-03 05:07:19 UTC (rev 8365)
@@ -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) && WITHARCH="--with-arch=i486"</userinput></screen>
 
     <para>Prepare GCC for compilation:</para>
 

Modified: branches/jh/BOOK/general.ent
===================================================================
--- branches/jh/BOOK/general.ent	2007-09-01 03:11:54 UTC (rev 8364)
+++ branches/jh/BOOK/general.ent	2007-09-03 05:07:19 UTC (rev 8365)
@@ -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}]" -->
 




More information about the lfs-book mailing list