瀏覽代碼

Use --with-arch on GCC instead of -march on Glibc

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/jh/BOOK@8330 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Jeremy Huntwork 18 年之前
父節點
當前提交
0d2c43f1fa
共有 7 個文件被更改,包括 20 次插入19 次删除
  1. 3 0
      chapter01/changelog.xml
  2. 10 1
      chapter05/gcc-pass1.xml
  3. 2 1
      chapter05/gcc-pass2.xml
  4. 1 7
      chapter05/glibc.xml
  5. 1 1
      chapter06/gcc.xml
  6. 1 7
      chapter06/glibc.xml
  7. 2 2
      general.ent

+ 3 - 0
chapter01/changelog.xml

@@ -39,6 +39,9 @@
     <listitem>
       <para>2007-08-20</para>
       <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Use --with-arch=i486 on GCC instead of -march=i486 with Glibc.</para>
+        </listitem>
         <listitem>
           <para>[bryan] - Fix typo in acknowledgements.</para>
         </listitem>

+ 10 - 1
chapter05/gcc-pass1.xml

@@ -47,7 +47,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 --disable-shared \
-    --enable-languages=c --disable-multilib</userinput></screen>
+    --enable-languages=c --disable-multilib --with-arch=i486</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure options:</title>
@@ -96,6 +96,15 @@ cd ../gcc-build</userinput></screen>
         </listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><parameter>--with-arch=i486</parameter></term>
+        <listitem>
+    	  <para>On x86 machines Glibc needs to be built for a minimum architecture
+	  of <quote>i486</quote>. Setting this for the GCC build ensures that the
+	  entire system is built consistently.</para>
+        </listitem>
+      </varlistentry>
+
     </variablelist>
 
     <para>Continue with compiling the package:</para>

+ 2 - 1
chapter05/gcc-pass2.xml

@@ -140,7 +140,8 @@ 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 --disable-multilib</userinput></screen>
+    --disable-libstdcxx-pch --disable-multilib \
+    --with-arch=i486</userinput></screen>
 
     <variablelist>
       <title>The meaning of the new configure options:</title>

+ 1 - 7
chapter05/glibc.xml

@@ -43,15 +43,9 @@
 <screen><userinput>mkdir -v ../glibc-build
 cd ../glibc-build</userinput></screen>
 
-    <para>On x86 machines Glibc needs to be built with the compliler
-    flag <quote>-march</quote> set to at least <quote>i486</quote>:</para>
-
-<screen><userinput>test $(uname -m | grep i[456]86) &amp;&amp; MARCH="-march=i486"</userinput></screen>
-
     <para>Next, prepare Glibc for compilation:</para>
 
-<screen><userinput>CC="gcc $MARCH" \
-    ../glibc-&glibc-version;/configure --prefix=/tools \
+<screen><userinput>../glibc-&glibc-version;/configure --prefix=/tools \
     --disable-profile --enable-add-ons \
     --enable-kernel=2.6.0 --with-binutils=/tools/bin \
     --without-gd --with-headers=/tools/include \

+ 1 - 1
chapter06/gcc.xml

@@ -78,7 +78,7 @@ cd ../gcc-build</userinput></screen>
     --libexecdir=/usr/lib --enable-shared \
     --enable-threads=posix --enable-__cxa_atexit \
     --enable-clocale=gnu --enable-languages=c,c++ \
-    --disable-multilib</userinput></screen>
+    --disable-multilib --with-arch=i486</userinput></screen>
 
     <para>Compile the package:</para>
 

+ 1 - 7
chapter06/glibc.xml

@@ -98,15 +98,9 @@ unset DL</userinput></screen>
 <screen><userinput>mkdir -v ../glibc-build
 cd ../glibc-build</userinput></screen>
 
-    <para>On x86 machines Glibc needs to be built with the compliler
-    flag <quote>-march</quote> set to at least <quote>i486</quote>:</para>
-
-<screen><userinput>test $(uname -m | grep i[456]86) &amp;&amp; MARCH="-march=i486"</userinput></screen>
-
     <para>Prepare Glibc for compilation:</para>
 
-<screen><userinput>CC="gcc $MARCH" \
-    ../glibc-&glibc-version;/configure --prefix=/usr \
+<screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \
     --disable-profile --enable-add-ons \
     --enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc</userinput></screen>
 

+ 2 - 2
general.ent

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