Ignore:
Timestamp:
08/08/2004 02:10:39 AM (20 years ago)
Author:
Gerard Beekmans <gerard@…>
Branches:
6.0
Children:
ef13657
Parents:
78349b7
Message:

Completed global edits for upcoming 6.0 release

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/testing/BOOK@3999 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter05/adjusting.xml

    r78349b7 r6e41459  
    99
    1010<para>Now that the temporary C libraries have been installed, all
    11 the tools compiled in the rest of this chapter should be linked against these
    12 libraries. In order to accomplish this, the linker and the compiler's
    13 specs file, need to be adjsted.</para>
     11tools compiled in the rest of this chapter should be linked against
     12these libraries. In order to accomplish this, the linker and the
     13compiler's specs file need to be adjusted.</para>
    1414
    15 <para> Some people would say that there is <emphasis><quote>black magic juju
    16 below this line</quote></emphasis>, but it is really very simple.</para>
    17 
    18 <para>First, the linker, adjusted at the end of the first pass of Binutils, is
    19 installed by running the following command from within
    20 the <filename class="directory">binutils-build</filename> directory:</para>
     15<para>The linker, adjusted at the end of the first pass of Binutils,
     16is installed by running the following command from within the
     17<filename class="directory">binutils-build</filename> directory:</para>
    2118
    2219<screen><userinput>make -C ld install</userinput></screen>
    2320
    24 <para>From this point onwards everything will link <emphasis>only</emphasis>
     21<para>From this point onwards, everything will link only
    2522against the libraries in <filename class="directory">/tools/lib</filename>.</para>
    2623
    27 <note><para>If you missed the earlier warning to retain the Binutils
    28 source and build directories from the first pass, dont worry - all is not lost.
    29 Just ignore the above command. This results in a small chance of the subsequent
    30 testing programs linking against libraries on the host. This is not ideal, but
    31 it's not a major problem. The situation is corrected when the second pass of
    32 Binutils is installed later on.</para></note>
     24<note><para>If the earlier warning to retain the Binutils source and
     25build directories from the first pass was missed, ignore the above
     26command. This results in a small chance that the subsequent testing
     27programs will link against libraries on the host. This is not ideal,
     28but it is not a major problem. The situation is corrected when the
     29second pass of Binutils is installed later.</para></note>
    3330
    3431<para>Now that the adjusted linker is installed, the Binutils build and source
    35 directories should be <emphasis>removed</emphasis>.</para>
     32directories should be removed.</para>
    3633
    3734<para>The next task is to amend our GCC specs file so that it points
     
    4643unset SPECFILE</userinput></screen>
    4744
    48 <para>It is recommended that the above command be cut-and-pasted in order to
    49 ensure correctness - Alternatively, the specs file can be edited by hand. This
    50 is done simply by replacing every occurrence of
    51 <quote>/lib/ld-linux.so.2</quote> with <quote>/tools/lib/ld-linux.so.2</quote>.
    52 </para>
     45<para>It is recommended that the above command be cut-and-pasted in
     46order to ensure correctness. Alternatively, the specs file can be
     47edited by hand. This is done by replacing every occurrence of
     48<quote>/lib/ld-linux.so.2</quote> with
     49<quote>/tools/lib/ld-linux.so.2</quote>.</para>
    5350
    54 <para> Be sure to visually inspect the specs file in order to verify the intended changes have been made.</para>
     51<para>Be sure to visually inspect the specs file in order to verify the
     52intended changes have been made.</para>
    5553
    56 <important><para>If you are working on a platform where the name of the dynamic
    57 linker is something other than <filename>ld-linux.so.2</filename>, you
    58 <emphasis>must</emphasis> replace <filename>ld-linux.so.2</filename> with the
    59 name of your platform's dynamic linker in the above commands. Refer back to
    60 <xref linkend="ch-tools-toolchaintechnotes"/> if necessary.</para></important>
     54<important><para>If working on a platform where the name of the
     55dynamic linker is something other than
     56<filename>ld-linux.so.2</filename>, replace
     57<filename>ld-linux.so.2</filename> with the name of the platform's
     58dynamic linker in the above commands. Refer back to <xref
     59linkend="ch-tools-toolchaintechnotes"/> if
     60necessary.</para></important>
    6161
    62 <para>Lastly, there is a possibility that some include files from the host
    63 system have found their way into GCC's private include dir. This can happen
    64 as a result of of GCC's <quote>fixincludes</quote> process which runs as part
    65 of the GCC build.  We'll explain more about this further on in this chapter.
    66 Run the following commands to eliminate this possibility:</para>
     62<para>There is a possibility that some include files from the host
     63system have found their way into GCC's private include dir. This can
     64happen as a result of GCC's <quote>fixincludes</quote> process, which runs as part
     65of the GCC build. This is explained in more detail later in this
     66chapter. Run the following command to eliminate this
     67possibility:</para>
    6768
    6869<screen><userinput>rm -f /tools/lib/gcc/*/*/include/{pthread.h,bits/sigthread.h}</userinput></screen>
    6970
    70 
    71 <caution><para>It is imperative at this point to stop and ensure that the basic
    72 functions (compiling and linking) of the new toolchain are working as expected.
    73 To perform a simple sanity check, run the following commands:</para>
     71<caution><para>At this point, it is imperative to stop and ensure that
     72the basic functions (compiling and linking) of the new toolchain are
     73working as expected. To perform a sanity check, run the following
     74commands:</para>
    7475
    7576<screen><userinput>echo 'main(){}' &gt; dummy.c
     
    7778readelf -l a.out | grep ': /tools'</userinput></screen>
    7879
    79 <para>If everything is working correctly, there should be no errors, and the
    80 output of the last command will be of the form:</para>
     80<para>If everything is working correctly, there should be no errors,
     81and the output of the last command will be of the form:</para>
    8182
    8283<blockquote><screen><computeroutput>[Requesting program interpreter: /tools/lib/ld-linux.so.2]</computeroutput></screen></blockquote>
    8384
    8485<para>Note especially that <filename class="directory">/tools/lib</filename>
    85 appears as the prefix of our dynamic linker.</para>
     86appears as the prefix of the dynamic linker.</para>
    8687
    87 <para>If the output is not
    88 as shown above, or there was no output at all, then something is seriously
    89 wrong. You will need to investigate and retrace your steps to find out where the
    90 problem is and correct it. There is no point in continuing until this is done.
    91 First, perform the sanity check again, using <command>gcc</command> instead of
    92 <command>cc</command>. If this works, then the
    93 <filename class="symlink">/tools/bin/cc</filename> symlink is missing. Revisit
    94 <xref linkend="ch-tools-gcc-pass1"/> and install the symlink. Second, ensure your PATH
    95 is correct. You can check this by running <userinput>echo $PATH</userinput> and
    96 verifying that <filename class="directory">/tools/bin</filename> is at the head
    97 of the list. If the PATH is wrong it could mean you're not logged in as user
    98 <emphasis>lfs</emphasis> or something went wrong back in
    99 <xref linkend="ch-tools-settingenviron"/>. Third, something may have gone wrong with
    100 the specs file amendment above. In this case redo the specs file amendment
    101 being careful to cut-and-paste the commands.</para>
     88<para>If the output is not shown as above or there was no output at
     89all, then something is wrong. Investigate and retrace the steps to
     90find out where the problem is and correct it. This issue must be
     91resolved before continuing on. First, perform the sanity check again,
     92using <command>gcc</command> instead of <command>cc</command>. If this
     93works, then the <filename>/tools/bin/cc</filename> symlink is missing.
     94Revisit <xref linkend="ch-tools-gcc-pass1"/> and install the symlink.
     95Next, ensure that the PATH is correct. This can be checked by running
     96<command>echo $PATH</command> and verifying that <filename
     97class="directory">/tools/bin</filename> is at the head of the list. If
     98the PATH is wrong it could mean that you are not logged in as user
     99<emphasis>lfs</emphasis> or that something went wrong back in <xref
     100linkend="ch-tools-settingenviron"/> Another option is that something
     101may have gone wrong with the specs file amendment above. In this case,
     102redo the specs file amendment, being careful to cut-and-paste the
     103commands.</para>
    102104
    103 <para>Once you are satisfied that all is well, clean up the test files:</para>
     105<para>Once all is well, clean up the test files:</para>
    104106
    105107<screen><userinput>rm dummy.c a.out</userinput></screen>
    106108</caution>
    107109
     110</sect1>
    108111
    109 </sect1>
Note: See TracChangeset for help on using the changeset viewer.