Update toolchain sanity checks to use values for x86_64.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11155 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
DJ Lucas 2016-12-18 15:14:26 +00:00
parent be3d9f313a
commit 98e7ac4cd7
3 changed files with 42 additions and 37 deletions

View File

@ -42,13 +42,24 @@
<listitem revision="sysv"> or <listitem revision="systemd"> as <listitem revision="sysv"> or <listitem revision="systemd"> as
appropriate for the entry or if needed the entire day's listitem. appropriate for the entry or if needed the entire day's listitem.
--> -->
<listitem>
<para>2016-12-18</para>
<itemizedlist>
<listitem>
<para>[dj] - Update toolchain sanity checks to use values for
x86_64.</para>
</listitem>
</itemizedlist>
</listitem>
<listitem> <listitem>
<para>2016-12-17</para> <para>2016-12-17</para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para>[dj] - Remove {,/usr}/lib64 symlinks for x86_64 builds. Add <para>[dj] - Remove {,/usr}/lib64 symlinks for x86_64 builds. Add
/lib64 directory with symlinks to dynamic loader. Adjust installation /lib64 directory with symlinks to dynamic loader. Adjust installation
of glibc, gcc, and libcap to account for filesystemd changes.</para> of glibc, gcc, and libcap to account for directory layout
changes.</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</listitem> </listitem>

View File

@ -50,13 +50,13 @@ readelf -l a.out | grep ': /lib'</userinput></screen>
and the output of the last command will be (allowing for 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):</para>
<screen os="c"><computeroutput>[Requesting program interpreter: /lib/ld-linux.so.2]</computeroutput></screen> <screen os="c"><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
<para>Note that <filename class="directory">/lib</filename> is now <para>Note that <filename class="directory">/lib</filename> is now
the prefix of our dynamic linker.</para> the prefix of our dynamic linker.</para>
<note><para>On 64-bit systems the interpreter should be <note><para>On 32-bit systems the interpreter should be
/lib64/ld-linux-x86-64.so.2.</para></note> /lib/ld-linux.so.2.</para></note>
<para os="d">Now make sure that we're setup to use the correct start files:</para> <para os="d">Now make sure that we're setup to use the correct start files:</para>
@ -64,14 +64,9 @@ readelf -l a.out | grep ': /lib'</userinput></screen>
<para os="f">The output of the last command should be:</para> <para os="f">The output of the last command should be:</para>
<screen><computeroutput>/usr/lib/crt1.o succeeded <screen><computeroutput>/usr/lib/../lib/crt1.o succeeded
/usr/lib/crti.o succeeded /usr/lib/../lib/crti.o succeeded
/usr/lib/crtn.o succeeded</computeroutput></screen> /usr/lib/../lib/crtn.o succeeded</computeroutput></screen>
<note><para>On 64-bit systems, the path above will be
/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib64/. This
reduces to /usr/lib64 and /usr/lib64 is a symlink that points to
/usr/lib.</para></note>
<para os="g">Verify that the compiler is searching for the correct header <para os="g">Verify that the compiler is searching for the correct header
files:</para> files:</para>
@ -91,14 +86,13 @@ readelf -l a.out | grep ': /lib'</userinput></screen>
be ignored, but otherwise the output of the last command should be:</para> be ignored, but otherwise the output of the last command should be:</para>
<screen><computeroutput>SEARCH_DIR("/usr/lib") <screen><computeroutput>SEARCH_DIR("/usr/lib")
SEARCH_DIR("/lib");</computeroutput></screen> SEARCH_DIR("/lib")</computeroutput></screen>
<para os="l">Next make sure that we're using the correct libc:</para> <para os="l">Next make sure that we're using the correct libc:</para>
<screen os="m"><userinput>grep "/lib.*/libc.so.6 " dummy.log</userinput></screen> <screen os="m"><userinput>grep "/lib.*/libc.so.6 " dummy.log</userinput></screen>
<para os="n">The output of the last command (allowing for a lib64 directory <para os="n">The output of the last command should be:</para>
on 64-bit hosts) should be:</para>
<screen os="o"><computeroutput>attempt to open /lib/libc.so.6 succeeded</computeroutput></screen> <screen os="o"><computeroutput>attempt to open /lib/libc.so.6 succeeded</computeroutput></screen>
@ -107,10 +101,9 @@ SEARCH_DIR("/lib");</computeroutput></screen>
<screen os="q"><userinput>grep found dummy.log</userinput></screen> <screen os="q"><userinput>grep found dummy.log</userinput></screen>
<para os="r">The output of the last command should be (allowing for <para os="r">The output of the last command should be (allowing for
platform-specific differences in dynamic linker name and a lib64 directory on platform-specific differences in dynamic linker name):</para>
64-bit hosts):</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 <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 at all, then something is seriously wrong. Investigate and retrace the

View File

@ -120,7 +120,8 @@ cd build</userinput></screen>
<userinput>grep -A7 Summ</userinput>.</para> <userinput>grep -A7 Summ</userinput>.</para>
<para>Results can be compared with those located at <ulink <para>Results can be compared with those located at <ulink
url="&test-results;"/> and <ulink url="http://gcc.gnu.org/ml/gcc-testresults/"/>.</para> url="&test-results;"/> and
<ulink url="http://gcc.gnu.org/ml/gcc-testresults/"/>.</para>
<para>A few unexpected failures cannot always be avoided. The GCC developers <para>A few unexpected failures cannot always be avoided. The GCC developers
are usually aware of these issues, but have not resolved them yet. are usually aware of these issues, but have not resolved them yet.
@ -179,9 +180,9 @@ ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/&gcc-version;/liblto_plugin.so \
href="adjusting.xml" href="adjusting.xml"
xpointer="xpointer(//*[@os='f'])"/> xpointer="xpointer(//*[@os='f'])"/>
<screen><computeroutput>/usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/../../../crt1.o succeeded <screen><computeroutput>/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crt1.o succeeded
/usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/../../../crti.o succeeded /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
/usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/../../../crtn.o succeeded</computeroutput></screen> /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
<para>Depending on your machine architecture, the above may differ slightly, <para>Depending on your machine architecture, the above may differ slightly,
the difference usually being the name of the directory the difference usually being the name of the directory
@ -201,9 +202,9 @@ ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/&gcc-version;/liblto_plugin.so \
xpointer="xpointer(//*[@os='h'])"/> xpointer="xpointer(//*[@os='h'])"/>
<screen><computeroutput>#include &lt;...&gt; search starts here: <screen><computeroutput>#include &lt;...&gt; search starts here:
/usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/include /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include
/usr/local/include /usr/local/include
/usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/include-fixed /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed
/usr/include</computeroutput></screen> /usr/include</computeroutput></screen>
<para>Again, note that the directory named after your target triplet may be <para>Again, note that the directory named after your target triplet may be
@ -226,6 +227,18 @@ ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/&gcc-version;/liblto_plugin.so \
href="adjusting.xml" href="adjusting.xml"
xpointer="xpointer(//*[@os='k'])"/> xpointer="xpointer(//*[@os='k'])"/>
<screen><computeroutput>SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64")
SEARCH_DIR("/usr/local/lib64")
SEARCH_DIR("/lib64")
SEARCH_DIR("/usr/lib64")
SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib")
SEARCH_DIR("/usr/local/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("/usr/lib");</computeroutput></screen>
<para>A 32-bit system may see a few different directories. For example, here
is the output from an i686 machine:</para>
<screen><computeroutput>SEARCH_DIR("/usr/i686-pc-linux-gnu/lib32") <screen><computeroutput>SEARCH_DIR("/usr/i686-pc-linux-gnu/lib32")
SEARCH_DIR("/usr/local/lib32") SEARCH_DIR("/usr/local/lib32")
SEARCH_DIR("/lib32") SEARCH_DIR("/lib32")
@ -233,18 +246,6 @@ SEARCH_DIR("/usr/lib32")
SEARCH_DIR("/usr/i686-pc-linux-gnu/lib") SEARCH_DIR("/usr/i686-pc-linux-gnu/lib")
SEARCH_DIR("/usr/local/lib") SEARCH_DIR("/usr/local/lib")
SEARCH_DIR("/lib") SEARCH_DIR("/lib")
SEARCH_DIR("/usr/lib");</computeroutput></screen>
<para>A 64-bit system may see a few different directories. For example, here
is the output from an x86_64 machine:</para>
<screen><computeroutput>SEARCH_DIR("/usr/x86_64-unknown-linux-gnu/lib64")
SEARCH_DIR("/usr/local/lib64")
SEARCH_DIR("/lib64")
SEARCH_DIR("/usr/lib64")
SEARCH_DIR("/usr/x86_64-unknown-linux-gnu/lib")
SEARCH_DIR("/usr/local/lib")
SEARCH_DIR("/lib")
SEARCH_DIR("/usr/lib");</computeroutput></screen> SEARCH_DIR("/usr/lib");</computeroutput></screen>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"