Author: jhuntwork
Date: 2007-10-05 17:16:17 -0600 (Fri, 05 Oct 2007)
New Revision: 8402
Modified:
branches/jh/BOOK/chapter05/adjusting.xml
branches/jh/BOOK/chapter05/glibc.xml
branches/jh/BOOK/chapter06/glibc.xml
Log:
Opted for case syntax for testing the architecture in Glibc
Modified: branches/jh/BOOK/chapter05/adjusting.xml
===================================================================
--- branches/jh/BOOK/chapter05/adjusting.xml 2007-10-05 19:21:39 UTC (rev
8401)
+++ branches/jh/BOOK/chapter05/adjusting.xml 2007-10-05 23:16:17 UTC (rev
8402)
@@ -32,23 +32,19 @@
<para>The next task is to point GCC to the new dynamic linker. This is done
by
dumping GCC's <quote>specs</quote> file to a location where GCC will look
for it
by default. A simple <command>sed</command> substitution then alters the
- dynamic linker that GCC will use.</para>
+ dynamic linker that GCC will use. The principle here is to find all
references
+ to the dynamic linker file in <filename class="directory">/lib</filename>
+ or possibly <filename class="directory">/lib64</filename> if the host system
+ is 64-bit capable, and adjust them to point to the new location in
+ <filename class="directory">/tools</filename>.</para>
<para>For the sake of accuracy, it is recommended to use a copy-and-paste
method when issuing the following command. Be sure to visually inspect the
- specs file and verify that all occurrences of
<quote>/lib/ld-linux.so.2</quote>
- have been replaced with <quote>/tools/lib/ld-linux.so.2</quote>:</para>
+ specs file to verify that it has properly adjusted all references to the
+ dynamic linker location. Refer to <xref
+ linkend="ch-tools-toolchaintechnotes" role=","/> for the default name
+ of the dynamic linker, if necessary.</para>
- <important>
- <para>If working on a platform where the name of the dynamic linker is
- something other than <filename
class="libraryfile">ld-linux.so.2</filename>,
- replace <quote>ld-linux.so.2</quote> with the name of the platform's
- dynamic linker in the following commands. Refer to <xref
- linkend="ch-tools-toolchaintechnotes" role=","/> if necessary.
Additionally,
- note that on 64-bit machines the linker may actually be expected in the
- <filename class="directory">/lib64</filename> directory.</para>
- </important>
-
<!-- Ampersands are needed to allow copy and paste -->
<screen><userinput>gcc -dumpspecs | sed 's@/lib\(64\)\?/ld@/tools&@g' \
> `dirname $(gcc -print-libgcc-file-name)`/specs</userinput></screen>
Modified: branches/jh/BOOK/chapter05/glibc.xml
===================================================================
--- branches/jh/BOOK/chapter05/glibc.xml 2007-10-05 19:21:39 UTC (rev
8401)
+++ branches/jh/BOOK/chapter05/glibc.xml 2007-10-05 23:16:17 UTC (rev
8402)
@@ -59,9 +59,9 @@
-mtune=native flag is also necessary to reset a reasonable value for -mtune
that is changed when setting -march.</para>
-<screen><userinput remap="configure">if [ uname -m | grep -q i[4-7]86 ]; do
- echo "CFLAGS += -march=i486" > configparms
-done</userinput></screen>
+<screen><userinput remap="configure">case `uname -m` in
+ i?86) echo "CFLAGS += -march=i486 -mtune=native" > configparms ;;
+esac</userinput></screen>
<para>Next, prepare Glibc for compilation:</para>
Modified: branches/jh/BOOK/chapter06/glibc.xml
===================================================================
--- branches/jh/BOOK/chapter06/glibc.xml 2007-10-05 19:21:39 UTC (rev
8401)
+++ branches/jh/BOOK/chapter06/glibc.xml 2007-10-05 23:16:17 UTC (rev
8402)
@@ -106,8 +106,8 @@
<para>Again, add the needed compiler flags to CFLAGS for x86
machines:</para>
-<screen><userinput remap="configure">if [ uname -m | grep -q i[4-7]86 ]; do
- echo "CFLAGS += -march=i486" > configparms
+<screen><userinput remap="configure">case `uname -m` in
+ i?86) echo "CFLAGS += -march=i486 -mtune=native" > configparms ;;
done</userinput></screen>
<para>Prepare Glibc for compilation:</para>
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page