First attempt at clarifying "Important Preliminary Material"

This commit is contained in:
Pierre Labastie 2022-10-09 18:46:28 +02:00
parent 312d536a35
commit 8b539af84d

View File

@ -300,12 +300,11 @@
its library search order. Detailed information can be obtained from
<command>ld</command> by passing it the <parameter>--verbose</parameter>
flag. For example, <command>$LFS_TGT-ld --verbose | grep SEARCH</command>
will illustrate the current search paths and their order. It shows which
files are linked by <command>ld</command> by compiling a dummy program and
passing the <parameter>--verbose</parameter> switch to the linker. For
example,
<command>$LFS_TGT-gcc dummy.c -Wl,--verbose 2&gt;&amp;1 | grep succeeded</command>
will show all the files successfully opened during the linking.</para>
will illustrate the current search paths and their order. Note that this
example can be run as shown only while being user
<systemitem class="username">lfs</systemitem>. If you come back to this
page later, replace <command>$LFS_TGT-ld</command> with just
<command>ld</command>.</para>
<para>The next package installed is gcc. An example of what can be
seen during its run of <command>configure</command> is:</para>
@ -318,14 +317,18 @@ checking what linker to use... /mnt/lfs/tools/i686-lfs-linux-gnu/bin/ld</compute
directories to find which tools to use. However, during the actual
operation of <command>gcc</command> itself, the same search paths are not
necessarily used. To find out which standard linker <command>gcc</command>
will use, run: <command>$LFS_TGT-gcc -print-prog-name=ld</command>.</para>
will use, run: <command>$LFS_TGT-gcc -print-prog-name=ld</command>. Again,
remove the <command>$LFS_TGT-</command> part if coming back to this
later.</para>
<para>Detailed information can be obtained from <command>gcc</command> by
passing it the <parameter>-v</parameter> command line option while compiling
a dummy program. For example, <command>gcc -v dummy.c</command> will show
a program. For example, <command>$LFS_TGT-gcc -v
<replaceable>example.c</replaceable></command> (or without <command>
$LFS_TGT-</command> if coming back later to this) will show
detailed information about the preprocessor, compilation, and assembly
stages, including <command>gcc</command>'s included search paths and their
order.</para>
stages, including <command>gcc</command>'s search paths for included
headers and their order.</para>
<para>Next installed are sanitized Linux API headers. These allow the
standard C library (glibc) to interface with features that the Linux