Author: jhuntwork
Date: 2007-08-07 14:24:04 -0600 (Tue, 07 Aug 2007)
New Revision: 8282
Modified:
branches/jh/BOOK/chapter01/changelog.xml
branches/jh/BOOK/chapter01/whatsnew.xml
branches/jh/BOOK/chapter05/adjusting.xml
branches/jh/BOOK/chapter05/toolchaintechnotes.xml
branches/jh/BOOK/chapter06/gcc.xml
branches/jh/BOOK/chapter06/readjusting.xml
branches/jh/BOOK/general.ent
branches/jh/BOOK/packages.ent
Log:
* Upgraded to HJL Binutils-2.17.50.0.18
* Initial update of commands to work with both x86 and x86_64
Modified: branches/jh/BOOK/chapter01/changelog.xml
===================================================================
--- branches/jh/BOOK/chapter01/changelog.xml 2007-08-07 20:21:44 UTC (rev
8281)
+++ branches/jh/BOOK/chapter01/changelog.xml 2007-08-07 20:24:04 UTC (rev
8282)
@@ -39,6 +39,12 @@
<listitem>
<para>2007-08-07</para>
<itemizedlist>
+ <listitem>
+ <para>[jhuntwork] - Upgraded to HJL Binutils-2.17.50.0.18</para>
+ </listitem>
+ <listitem>
+ <para>[jhuntwork] - Update commands to work with both x86 and
x86_64</para>
+ </listitem>
<listitem>
<para>[jhuntwork] - Use '-n' when creating /tools/lib64 symlink.
Will fail if that directory or symlink already exists, instead of
@@ -63,6 +69,16 @@
</listitem>
<listitem>
+ <para>2007-08-04</para>
+ <itemizedlist>
+ <listitem>
+ <para>[dnicholson] - Added the
<parameter>--disable-werror</parameter>
+ parameter to Binutils Pass 1.</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+
+ <listitem>
<para>2007-07-31</para>
<itemizedlist>
<listitem>
Modified: branches/jh/BOOK/chapter01/whatsnew.xml
===================================================================
--- branches/jh/BOOK/chapter01/whatsnew.xml 2007-08-07 20:21:44 UTC (rev
8281)
+++ branches/jh/BOOK/chapter01/whatsnew.xml 2007-08-07 20:24:04 UTC (rev
8282)
@@ -39,11 +39,11 @@
</listitem>
<listitem>
<para>Berkeley DB &db-version;</para>
- </listitem>
+ </listitem> -->
<listitem>
<para>Binutils &binutils-version;</para>
</listitem>
- <listitem>
+ <!--<listitem>
<para>Bison &bison-version;</para>
</listitem>
<listitem>
Modified: branches/jh/BOOK/chapter05/adjusting.xml
===================================================================
--- branches/jh/BOOK/chapter05/adjusting.xml 2007-08-07 20:21:44 UTC (rev
8281)
+++ branches/jh/BOOK/chapter05/adjusting.xml 2007-08-07 20:24:04 UTC (rev
8282)
@@ -36,20 +36,22 @@
<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>/lib64/ld-linux-x86-64.so.2</quote>
- have been replaced with
<quote>/tools/lib64/ld-linux-x86-64.so.2</quote>:</para>
+ 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>
<important>
<para>If working on a platform where the name of the dynamic linker is
- 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
+ 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.</para>
+ 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@/lib64/ld-linux-x86-64.so.2@/tools&@g' \
- > `dirname $(gcc -print-libgcc-file-name)`/specs</userinput></screen>
+<screen><userinput>gcc -dumpspecs | sed 's@/lib\(64\)\?/ld@/tools&@g' \
+ > `dirname $(gcc -print-libgcc-file-name)`/specs</userinput></screen>
<para>During the build process, GCC runs a script
(<command>fixincludes</command>) that scans the system for header files
@@ -84,9 +86,10 @@
and the output of the last command will be of the form:</para>
<screen><computeroutput>[Requesting program interpreter:
- /tools/lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
+ /tools/lib/ld-linux.so.2]</computeroutput></screen>
- <para>Note that <filename class="directory">/tools/lib</filename>
+ <para>Note that <filename class="directory">/tools/lib</filename>, or
+ <filename class="directory">/tools/lib64</filename> for 64-bit machines
appears as the prefix of the dynamic linker.</para>
<para>If the output is not shown as above or there was no output at all,
Modified: branches/jh/BOOK/chapter05/toolchaintechnotes.xml
===================================================================
--- branches/jh/BOOK/chapter05/toolchaintechnotes.xml 2007-08-07 20:21:44 UTC
(rev 8281)
+++ branches/jh/BOOK/chapter05/toolchaintechnotes.xml 2007-08-07 20:24:04 UTC
(rev 8282)
@@ -27,22 +27,21 @@
<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>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:
- <userinput>./config.guess</userinput> and note the output.</para>
+ often referred to as the target triplet. 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: <userinput>./config.guess</userinput> and note
+ the output. For example, for a modern 32-bit Intel processor the
+ output will likely be <emphasis>i686-pc-linux-gnu</emphasis>.</para>
<para>Also be aware of the name of the platform's dynamic linker, often
referred to as the dynamic loader (not to be confused with the standard
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-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
+ linker for a 32-bit Intel machine will be
+ <filename class="libraryfile">ld-linux.so.2</filename>.
+ A sure-fire way to determine the name of the dynamic linker is to
inspect a random binary from the host system by running:
<userinput>readelf -l <name of binary> | grep interpreter</userinput>
and noting the output. The authoritative reference covering all platforms
@@ -96,8 +95,8 @@
seen during its run of <command>configure</command> is:</para>
<screen><computeroutput>checking what assembler to use...
- /tools/x86_64-unknown-linux-gnu/bin/as
-checking what linker to use...
/tools/x86_64-unknown-linux-gnu/bin/ld</computeroutput></screen>
+ /tools/i686-pc-linux-gnu/bin/as
+checking what linker to use...
/tools/i686-pc-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/jh/BOOK/chapter06/gcc.xml
===================================================================
--- branches/jh/BOOK/chapter06/gcc.xml 2007-08-07 20:21:44 UTC (rev 8281)
+++ branches/jh/BOOK/chapter06/gcc.xml 2007-08-07 20:24:04 UTC (rev 8282)
@@ -154,10 +154,18 @@
href="readjusting.xml"
xpointer="xpointer(//[EMAIL PROTECTED]'f'])"/>
-<screen><computeroutput>/usr/lib/gcc/x86_64-unknown-linux-gnu/&gcc-version;/../../../../lib64/crt1.o
succeeded
-/usr/lib/gcc/x86_64-unknown-linux-gnu/&gcc-version;/../../../../lib64/crti.o
succeeded
-/usr/lib/gcc/x86_64-unknown-linux-gnu/&gcc-version;/../../../../lib64/crtn.o
succeeded</computeroutput></screen>
+<screen><computeroutput>/usr/lib/gcc/x86_64-unknown-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>
+ <para>Depending on your machine architecture, the above may differ slightly,
+ the difference usually being the name of the directory
+ after <filename class="directory">/usr/lib/gcc</filename>. If your machine is
+ a 64-bit system, you may also see a directory named <filename
class="directory">lib64</filename>
+ towards the end of the string. The important thing to
+ look for here is that gcc has found all three <filename>crt*.o</filename>
files under
+ the <filename class="directory">/usr/lib</filename> directory.</para>
+
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
href="readjusting.xml"
xpointer="xpointer(//[EMAIL PROTECTED]'g'])"/>
@@ -173,6 +181,9 @@
/usr/lib/gcc/x86_64-unknown-linux-gnu/&gcc-version;/include
/usr/include</computeroutput></screen>
+ <para>Again, note that the directory named after your target triplet may be
+ different than the above, depending on your architecture.</para>
+
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
href="readjusting.xml"
xpointer="xpointer(//[EMAIL PROTECTED]'i'])"/>
@@ -185,6 +196,14 @@
href="readjusting.xml"
xpointer="xpointer(//[EMAIL PROTECTED]'k'])"/>
+<screen><computeroutput>SEARCH_DIR("/usr/i686-pc-linux-gnu/lib")
+SEARCH_DIR("/usr/local/lib")
+SEARCH_DIR("/lib")
+SEARCH_DIR("/usr/lib");</computeroutput></screen>
+
+ <para>A 64-bit system may see a few more directories. For example, here
+ is the output from a x86_64 machine:</para>
+
<screen><computeroutput>SEARCH_DIR("/usr/x86_64-unknown-linux-gnu/lib64")
SEARCH_DIR("/usr/local/lib64")
SEARCH_DIR("/lib64")
Modified: branches/jh/BOOK/chapter06/readjusting.xml
===================================================================
--- branches/jh/BOOK/chapter06/readjusting.xml 2007-08-07 20:21:44 UTC (rev
8281)
+++ branches/jh/BOOK/chapter06/readjusting.xml 2007-08-07 20:24:04 UTC (rev
8282)
@@ -37,16 +37,7 @@
and Glibc start files. A <command>sed</command> command accomplishes
this:</para>
- <important>
- <para>If working on a platform where the name of the dynamic linker is
- 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/lib64/ld-linux-x86-64.so.2@/lib64/[EMAIL PROTECTED]' \
+<screen><userinput>gcc -dumpspecs | sed -e 's@/tools@@g' \
-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 +57,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:
/lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
+<screen os="c"><computeroutput>[Requesting program interpreter:
/lib/ld-linux.so.2]</computeroutput></screen>
<para>Note that <filename class="directory">/lib</filename> is now
the prefix of our dynamic linker.</para>
@@ -97,20 +88,22 @@
<screen os="j"><userinput>grep 'SEARCH.*/usr/lib' dummy.log |sed 's|;
|\n|g'</userinput></screen>
<para os="k">If everything is working correctly, there should be no errors,
- and the output of the last command will be:</para>
+ and the output of the last command (allowing for platform-specific target
triplets)
+ will be:</para>
-<screen><computeroutput>SEARCH_DIR("/tools/x86_64-unknown-linux-gnu/lib")
+<screen><computeroutput>SEARCH_DIR("/tools/i686-pc-linux-gnu/lib")
SEARCH_DIR("/usr/lib")
SEARCH_DIR("/lib");</computeroutput></screen>
<para os="l">Next make sure that we're using the correct libc:</para>
-<screen os="m"><userinput>grep "/lib64/libc.so.6 "
dummy.log</userinput></screen>
+<screen os="m"><userinput>grep "/lib.*/libc.so.6 "
dummy.log</userinput></screen>
<para os="n">If everything is working correctly, there should be no errors,
- and the output of the last command will be:</para>
+ and the output of the last command (allowing for a lib64 directory on 64-bit
hosts)
+ will be:</para>
-<screen os="o"><computeroutput>attempt to open /lib64/libc.so.6
succeeded</computeroutput></screen>
+<screen os="o"><computeroutput>attempt to open /lib/libc.so.6
succeeded</computeroutput></screen>
<para os="p">Lastly, make sure GCC is using the correct dynamic
linker:</para>
@@ -118,9 +111,10 @@
<para os="r">If everything is working correctly, there should be no errors,
and the output of the last command will be (allowing for
- platform-specific differences in dynamic linker name):</para>
+ platform-specific differences in dynamic linker name and a lib64 directory
+ on 64-bit hosts):</para>
-<screen os="s"><computeroutput>found ld-linux-x86-64.so.2 at
/lib64/ld-linux-x86-64.so.2</computeroutput></screen>
+<screen os="s"><computeroutput>found ld-linux.so.2 at
/lib/ld-linux.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/jh/BOOK/general.ent
===================================================================
--- branches/jh/BOOK/general.ent 2007-08-07 20:21:44 UTC (rev 8281)
+++ branches/jh/BOOK/general.ent 2007-08-07 20:24:04 UTC (rev 8282)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!ENTITY version "SVN-x86_64-20070807">
+<!ENTITY version "SVN-JH-20070807">
<!ENTITY releasedate "August 7, 2007">
<!ENTITY milestone "7.0">
<!ENTITY generic-version "development"> <!-- Use "development", "testing", or
"x.y[-pre{x}]" -->
Modified: branches/jh/BOOK/packages.ent
===================================================================
--- branches/jh/BOOK/packages.ent 2007-08-07 20:21:44 UTC (rev 8281)
+++ branches/jh/BOOK/packages.ent 2007-08-07 20:24:04 UTC (rev 8282)
@@ -38,10 +38,10 @@
<!ENTITY bash-doc-md5 "0e904cb46ca873fcfa65df19b024bec9">
<!ENTITY bash-doc-home " ">
-<!ENTITY binutils-version "2.17">
-<!ENTITY binutils-size "13,472 KB">
-<!ENTITY binutils-url "&gnu;binutils/binutils-&binutils-version;.tar.bz2">
-<!ENTITY binutils-md5 "e26e2e06b6e4bf3acf1dc8688a94c0d1">
+<!ENTITY binutils-version "2.17.50.0.18">
+<!ENTITY binutils-size "13,599 KB">
+<!ENTITY binutils-url
"http://www.kernel.org/pub/linux/devel/binutils/binutils-&binutils-version;.tar.bz2">
+<!ENTITY binutils-md5 "98e21a7c0d82b318fe29f2e04d273344">
<!ENTITY binutils-home "http://sources.redhat.com/binutils/">
<!ENTITY binutils-ch5p1-du "213 MB">
<!ENTITY binutils-ch5p1-sbu "1 SBU">
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page