Author: jhuntwork
Date: 2007-07-23 16:04:42 -0600 (Mon, 23 Jul 2007)
New Revision: 8232
Modified:
branches/x86_64/BOOK/chapter05/adjusting.xml
branches/x86_64/BOOK/chapter05/toolchaintechnotes.xml
branches/x86_64/BOOK/chapter06/binutils.xml
branches/x86_64/BOOK/chapter06/gcc.xml
branches/x86_64/BOOK/chapter06/glibc.xml
branches/x86_64/BOOK/chapter06/readjusting.xml
branches/x86_64/BOOK/patches.ent
Log:
Some adjustments that were missed the first time:
- Changed instances of dynamic linker name
- Changed instances of target triplet
- Update gcc pure64_specs patch
- Use gcc pure64 patch in final gcc
- Use --disable-multilib in final gcc and binutils
- Explicitly tell Glibc to use /lib and /usr/lib, instead
of defaults of /lib64 and /usr/lib64
Modified: branches/x86_64/BOOK/chapter05/adjusting.xml
===================================================================
--- branches/x86_64/BOOK/chapter05/adjusting.xml 2007-07-23 19:59:28 UTC
(rev 8231)
+++ branches/x86_64/BOOK/chapter05/adjusting.xml 2007-07-23 22:04:42 UTC
(rev 8232)
@@ -36,13 +36,13 @@
<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 and verify that all occurrences of
<quote>/lib/ld-linux-x86-64.so.2</quote>
+ have been replaced with
<quote>/tools/lib/ld-linux-x86-64.so.2</quote>:</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
+ something other than <filename
class="libraryfile">ld-linux-x86-64.so.2</filename>,
+ replace <quote>ld-linux-x86-64.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.</para>
</important>
Modified: branches/x86_64/BOOK/chapter05/toolchaintechnotes.xml
===================================================================
--- branches/x86_64/BOOK/chapter05/toolchaintechnotes.xml 2007-07-23
19:59:28 UTC (rev 8231)
+++ branches/x86_64/BOOK/chapter05/toolchaintechnotes.xml 2007-07-23
22:04:42 UTC (rev 8232)
@@ -28,7 +28,7 @@
<important>
<para>Before continuing, be aware of the name of the working platform,
often referred to as the target triplet. Many times, the target
- triplet will probably be <emphasis>i686-pc-linux-gnu</emphasis>. A
+ triplet will probably be <emphasis>x86_64-unknown-linux-gnu</emphasis>. A
simple way to determine the name of the target triplet is to run the
<command>config.guess</command> script that comes with the source for
many packages. Unpack the Binutils sources and run the script:
@@ -39,11 +39,9 @@
linker <command>ld</command> that is part of Binutils). The dynamic linker
provided by Glibc finds and loads the shared libraries needed by a program,
prepares the program to run, and then runs it. The name of the dynamic
- linker will usually be <filename
class="libraryfile">ld-linux.so.2</filename>.
- On platforms that are less prevalent, the name might be <filename
- class="libraryfile">ld.so.1</filename>, and newer 64 bit platforms might
- be named something else entirely. The name of the platform's dynamic linker
- can be determined by looking in the <filename
class="directory">/lib</filename>
+ linker will usually be <filename
class="libraryfile">ld-linux-x86-64.so.2</filename>.
+ The name of the platform's dynamic linker can be determined by looking in
the
+ <filename class="directory">/lib</filename>
directory on the host system. A sure-fire way to determine the name is to
inspect a random binary from the host system by running:
<userinput>readelf -l <name of binary> | grep interpreter</userinput>
@@ -98,8 +96,8 @@
seen during its run of <command>configure</command> is:</para>
<screen><computeroutput>checking what assembler to use...
- /tools/i686-pc-linux-gnu/bin/as
-checking what linker to use...
/tools/i686-pc-linux-gnu/bin/ld</computeroutput></screen>
+ /tools/x86_64-unknown-linux-gnu/bin/as
+checking what linker to use...
/tools/x86_64-unknown-linux-gnu/bin/ld</computeroutput></screen>
<para>This is important for the reasons mentioned above. It also demonstrates
that GCC's configure script does not search the PATH directories to find
which
Modified: branches/x86_64/BOOK/chapter06/binutils.xml
===================================================================
--- branches/x86_64/BOOK/chapter06/binutils.xml 2007-07-23 19:59:28 UTC (rev
8231)
+++ branches/x86_64/BOOK/chapter06/binutils.xml 2007-07-23 22:04:42 UTC (rev
8232)
@@ -59,7 +59,7 @@
<para>Prepare Binutils for compilation:</para>
<screen><userinput>../binutils-&binutils-version;/configure --prefix=/usr \
- --enable-shared</userinput></screen>
+ --enable-shared --disable-multilib</userinput></screen>
<para>Compile the package:</para>
@@ -74,8 +74,8 @@
<para>Normally, the tooldir (the directory where the executables will
ultimately be located) is set to <filename
class="directory">$(exec_prefix)/$(target_alias)</filename>. For
- example, i686 machines would expand that to <filename
- class="directory">/usr/i686-pc-linux-gnu</filename>. Because this is
+ example, x86_64 machines would expand that to <filename
+ class="directory">/usr/x86_64-unknown-linux-gnu</filename>. Because
this is
a custom system, this target-specific directory in <filename
class="directory">/usr</filename> is not required. <filename
class="directory">$(exec_prefix)/$(target_alias)</filename> would be
Modified: branches/x86_64/BOOK/chapter06/gcc.xml
===================================================================
--- branches/x86_64/BOOK/chapter06/gcc.xml 2007-07-23 19:59:28 UTC (rev
8231)
+++ branches/x86_64/BOOK/chapter06/gcc.xml 2007-07-23 22:04:42 UTC (rev
8232)
@@ -35,6 +35,11 @@
<sect2 role="installation">
<title>Installation of GCC</title>
+ <para>The following patch tells GCC to link to <filename class="directory">
+ /lib</filename> instead of <filename
class="directory">/lib64</filename>.</para>
+
+<screen><userinput>patch -Np1 -i ../&gcc-pure64-patch;</userinput></screen>
+
<para>Apply a <command>sed</command> substitution that will suppress the
installation of <filename class="libraryfile">libiberty.a</filename>. The
version of <filename class="libraryfile">libiberty.a</filename> provided by
@@ -77,7 +82,8 @@
<screen><userinput>../gcc-&gcc-version;/configure --prefix=/usr \
--libexecdir=/usr/lib --enable-shared \
--enable-threads=posix --enable-__cxa_atexit \
- --enable-clocale=gnu --enable-languages=c,c++</userinput></screen>
+ --enable-clocale=gnu --enable-languages=c,c++ \
+ --disable-multilib</userinput></screen>
<para>Compile the package:</para>
@@ -153,9 +159,9 @@
href="readjusting.xml"
xpointer="xpointer(//[EMAIL PROTECTED]'f'])"/>
-<screen><computeroutput>/usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/../../../crt1.o
succeeded
-/usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/../../../crti.o succeeded
-/usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/../../../crtn.o
succeeded</computeroutput></screen>
+<screen><computeroutput>/usr/lib/gcc/x86_64-unknown-linux-gnu/&gcc-version;/../../../crt1.o
succeeded
+/usr/lib/gcc/x86_64-unknown-linux-gnu/&gcc-version;/../../../crti.o succeeded
+/usr/lib/gcc/x86_64-unknown-linux-gnu/&gcc-version;/../../../crtn.o
succeeded</computeroutput></screen>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
href="readjusting.xml"
@@ -169,7 +175,7 @@
<screen><computeroutput>#include <...> search starts here:
/usr/local/include
- /usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/include
+ /usr/lib/gcc/x86_64-unknown-linux-gnu/&gcc-version;/include
/usr/include</computeroutput></screen>
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
@@ -184,7 +190,7 @@
href="readjusting.xml"
xpointer="xpointer(//[EMAIL PROTECTED]'k'])"/>
-<screen><computeroutput>SEARCH_DIR("/usr/i686-pc-linux-gnu/lib")
+<screen><computeroutput>SEARCH_DIR("/usr/x86_64-unknown-linux-gnu/lib")
SEARCH_DIR("/usr/local/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("/usr/lib");</computeroutput></screen>
Modified: branches/x86_64/BOOK/chapter06/glibc.xml
===================================================================
--- branches/x86_64/BOOK/chapter06/glibc.xml 2007-07-23 19:59:28 UTC (rev
8231)
+++ branches/x86_64/BOOK/chapter06/glibc.xml 2007-07-23 22:04:42 UTC (rev
8232)
@@ -101,11 +101,16 @@
<screen><userinput>mkdir -v ../glibc-build
cd ../glibc-build</userinput></screen>
+ <para>Tell Glibc to install its libraries in a more generic
location:</para>
+
+<screen><userinput>echo "slibdir=/lib" > configparms</userinput></screen>
+
<para>Prepare Glibc for compilation:</para>
<screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \
--disable-profile --enable-add-ons \
- --enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc</userinput></screen>
+ --enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc \
+ --libdir=/usr/lib</userinput></screen>
<variablelist>
<title>The meaning of the new configure options:</title>
Modified: branches/x86_64/BOOK/chapter06/readjusting.xml
===================================================================
--- branches/x86_64/BOOK/chapter06/readjusting.xml 2007-07-23 19:59:28 UTC
(rev 8231)
+++ branches/x86_64/BOOK/chapter06/readjusting.xml 2007-07-23 22:04:42 UTC
(rev 8232)
@@ -39,14 +39,14 @@
<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>,
- substitute <quote>ld-linux.so.2</quote> with the name of the platform's
+ something other than <filename
class="libraryfile">ld-linux-x86-64.so.2</filename>,
+ substitute <quote>ld-linux-x86-64.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.</para>
</important>
<screen><userinput>gcc -dumpspecs | sed \
- -e 's@/tools/lib/ld-linux.so.2@/lib/[EMAIL PROTECTED]' \
+ -e 's@/tools/lib/ld-linux-x86-64.so.2@/lib/[EMAIL PROTECTED]' \
-e '/\*startfile_prefix_spec:/{n;[EMAIL PROTECTED]@/usr/lib/ @}' \
-e '/\*cpp:/{n;[EMAIL PROTECTED]@ -isystem /usr/[EMAIL PROTECTED]' > \
`dirname $(gcc --print-libgcc-file-name)`/specs</userinput></screen>
@@ -66,7 +66,7 @@
and the output of the last command will be (allowing for
platform-specific differences in dynamic linker name):</para>
-<screen os="c"><computeroutput>[Requesting program interpreter:
/lib/ld-linux.so.2]</computeroutput></screen>
+<screen os="c"><computeroutput>[Requesting program interpreter:
/lib/ld-linux-x86-64.so.2]</computeroutput></screen>
<para>Note that <filename class="directory">/lib</filename> is now
the prefix of our dynamic linker.</para>
@@ -99,7 +99,7 @@
<para os="k">If everything is working correctly, there should be no errors,
and the output of the last command will be:</para>
-<screen><computeroutput>SEARCH_DIR("/tools/i686-pc-linux-gnu/lib")
+<screen><computeroutput>SEARCH_DIR("/tools/x86_64-unknown-linux-gnu/lib")
SEARCH_DIR("/usr/lib")
SEARCH_DIR("/lib");</computeroutput></screen>
@@ -120,7 +120,7 @@
and the output of the last command will be (allowing for
platform-specific differences in dynamic linker name):</para>
-<screen os="s"><computeroutput>found ld-linux.so.2 at
/lib/ld-linux.so.2</computeroutput></screen>
+<screen os="s"><computeroutput>found ld-linux-x86-64.so.2 at
/lib/ld-linux-x86-64.so.2</computeroutput></screen>
<para os="t">If the output does not appear as shown above or is not received
at all, then something is seriously wrong. Investigate and retrace the
Modified: branches/x86_64/BOOK/patches.ent
===================================================================
--- branches/x86_64/BOOK/patches.ent 2007-07-23 19:59:28 UTC (rev 8231)
+++ branches/x86_64/BOOK/patches.ent 2007-07-23 22:04:42 UTC (rev 8232)
@@ -47,9 +47,9 @@
<!ENTITY gcc-pure64-patch-md5 "cea9bf46663392d627de81e2456698e3">
<!ENTITY gcc-pure64-patch-size "6.7 KB">
-<!ENTITY gcc-pure64-specs-patch "gcc-&gcc-version;-pure64_specs-1.patch">
-<!ENTITY gcc-pure64-specs-patch-md5 "99e0ae890fce0614be210e83f0a5b975">
-<!ENTITY gcc-pure64-specs-patch-size "15 KB">
+<!ENTITY gcc-pure64-specs-patch "gcc-&gcc-version;-pure64_specs-2.patch">
+<!ENTITY gcc-pure64-specs-patch-md5 "95b4541d7fa0e9a11f23af6db8b303d8">
+<!ENTITY gcc-pure64-specs-patch-size "17 KB">
<!ENTITY glibc-branch_update-patch
"glibc-&glibc-version;-branch_update-3.patch">
<!ENTITY glibc-branch_update-patch-md5 "cbad3863a39eed9e52af083c5035f283">
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page