Jelajahi Sumber

Use -mtune=native for glibc. We don't want our libc optimized for 486.
It should be optimized for the local machine.


git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8541 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Jeremy Huntwork 17 tahun lalu
induk
melakukan
1c6f1c1e41
3 mengubah file dengan 10 tambahan dan 3 penghapusan
  1. 5 0
      chapter01/changelog.xml
  2. 4 2
      chapter05/glibc.xml
  3. 1 1
      chapter06/glibc.xml

+ 5 - 0
chapter01/changelog.xml

@@ -39,6 +39,11 @@
     <listitem>
     <listitem>
       <para>2008-04-23</para>
       <para>2008-04-23</para>
       <itemizedlist>
       <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Use -mtune=native for glibc. We don't
+	  want our libc optimized for 486. It should be optimized
+	  for the local machine.</para>
+        </listitem>
         <listitem>
         <listitem>
           <para>[jhuntwork] - Updated Autoconf to 2.62.</para>
           <para>[jhuntwork] - Updated Autoconf to 2.62.</para>
         </listitem>
         </listitem>

+ 4 - 2
chapter05/glibc.xml

@@ -55,9 +55,11 @@ cd ../glibc-build</userinput></screen>
     the flag is best placed inside the build variable <quote>CFLAGS</quote>.
     the flag is best placed inside the build variable <quote>CFLAGS</quote>.
     Instead of overriding completely what Glibc's internal build system uses
     Instead of overriding completely what Glibc's internal build system uses
     for CFLAGS, append the new flag to the existing contents of CFLAGS by
     for CFLAGS, append the new flag to the existing contents of CFLAGS by
-    making use of the special file <filename>configparms</filename>:</para>
+    making use of the special file <filename>configparms</filename>. The
+    -mtune=native flag is also necessary to reset a reasonable value for -mtune
+    that is changed when setting -march.</para>
 
 
-<screen><userinput remap="configure">echo "CFLAGS += -march=i486" &gt; configparms</userinput></screen>
+<screen><userinput remap="configure">echo "CFLAGS += -march=i486 -mtune=native" &gt; configparms</userinput></screen>
 
 
     <para>Next, prepare Glibc for compilation:</para>
     <para>Next, prepare Glibc for compilation:</para>
 
 

+ 1 - 1
chapter06/glibc.xml

@@ -104,7 +104,7 @@ cd ../glibc-build</userinput></screen>
 
 
     <para>Again, add the needed compiler flag to CFLAGS:</para>
     <para>Again, add the needed compiler flag to CFLAGS:</para>
 
 
-<screen><userinput remap="configure">echo "CFLAGS += -march=i486" &gt; configparms</userinput></screen>
+<screen><userinput remap="configure">echo "CFLAGS += -march=i486 -mtune=native" &gt; configparms</userinput></screen>
 
 
     <para>Prepare Glibc for compilation:</para>
     <para>Prepare Glibc for compilation:</para>