Changeset 313ca76


Ignore:
Timestamp:
01/26/2006 03:45:12 AM (18 years ago)
Author:
Jeremy Huntwork <jhuntwork@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
40abfd5
Parents:
ae437d3
Message:

Fixed the re-adjusting of the toolchain in chapter 6 so that chapter 6 GCC and Binutils links against the proper Glibc and so that we don't have to keep the binutils directories from chapter 5.
Also moved a note about saving the /tools directory to the beginning of chapter 6.
Fixes bug 1677. Thanks to Chris Staub, Alexander Patrakov, Greg Schafer and Tushar Teredesai for reporting and resolving this issue.

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

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • chapter01/changelog.xml

    rae437d3 r313ca76  
    4949          and Greg Schafer for the fix.</para>
    5050        </listitem>
     51        <listitem>
     52          <para>[jhuntwork] - Fixed the re-adjusting of the toolchain in chapter 6
     53          so that chapter 6 GCC and Binutils links against the proper Glibc and so
     54          that we don't have to keep the binutils directories from chapter 5. Also
     55          moved a note about saving the /tools directory to the beginning of chapter 6.
     56          Fixes bug 1677. Thanks to Chris Staub, Alexander Patrakov, Greg Schafer and
     57          Tushar Teredesai for reporting and resolving this issue.</para>
     58        </listitem>
    5159      </itemizedlist>
    5260    </listitem>
  • chapter05/binutils-pass2.xml

    rae437d3 r313ca76  
    8383<screen><userinput>make install</userinput></screen>
    8484
    85     <para>Now prepare the linker for the <quote>Re-adjusting</quote> phase in
    86     the next chapter:</para>
    87 
    88 <screen><userinput>make -C ld clean
    89 make -C ld LIB_PATH=/usr/lib:/lib</userinput></screen>
    90 
    91     <warning>
    92       <para><emphasis>Do not</emphasis> remove the Binutils source and build
    93       directories yet. These directories will be needed again in the next
    94       chapter in their current state.</para>
    95     </warning>
    96 
    9785  </sect2>
    9886
  • chapter06/gcc.xml

    rae437d3 r313ca76  
    100100<screen><userinput>ln -sv ../usr/bin/cpp /lib</userinput></screen>
    101101
    102 <para>Many packages use the name <command>cc</command> to call the C
    103 compiler. To satisfy those packages, create a symlink:</para>
    104 
    105 <screen><userinput>ln -sv gcc /usr/bin/cc</userinput></screen>
    106 
    107102<note><para>At this point, it is strongly recommended to repeat the
    108103sanity check performed earlier in this chapter. Refer back to <xref
  • chapter06/introduction.xml

    rae437d3 r313ca76  
    5959the package installs.</para>
    6060
     61<note><para>At this point, you may wish to keep your finished temporary
     62tools for use in future LFS builds by creating a tarball of the
     63<filename class="directory">/tools</filename> directory and
     64storing it in a safe location.</para></note>
     65
    6166</sect1>
    6267
  • chapter06/readjusting.xml

    rae437d3 r313ca76  
    1010<para>Now that the final C libraries have been installed, it is time to adjust
    1111the toolchain again. The toolchain will be adjusted so that it will link any
    12 newly compiled program against these new libraries. This is the same process
     12newly compiled program against these new libraries. This is a similar process
    1313used in the <quote>Adjusting</quote> phase in the beginning of <xref
    1414linkend="chapter-temporary-tools"/>, but with the adjustments reversed. In <xref
     
    2020directories.</para>
    2121
    22 <para>Start by adjusting the linker. The source and build directories from the
    23 second pass of Binutils were retained for this purpose. Install the adjusted
    24 linker by running the following command from within the <filename
    25 class="directory">binutils-build</filename> directory:</para>
    26 
    27 <screen><userinput>make -C ld INSTALL=/tools/bin/install install</userinput></screen>
    28 
    29 <note><para>If the earlier warning to retain the Binutils source and
    30 build directories from the second pass in <xref
    31 linkend="chapter-temporary-tools"/> was missed, or if they were
    32 accidentally deleted or are inaccessible, ignore the above command.
    33 The result will be that the next package, Binutils, will link against
    34 the C libraries in <filename class="directory">/tools</filename>
    35 rather than in <filename class="directory">/{,usr/}lib</filename>.
    36 This is not ideal, however, testing has shown that the resulting
    37 Binutils program binaries should be identical.</para></note>
    38 
    39 <para>From now on, every compiled program will link only against the
    40 libraries in <filename class="directory">/usr/lib</filename> and
    41 <filename class="directory">/lib</filename>. The extra
    42 <parameter>INSTALL=/tools/bin/install</parameter> option is needed
    43 because the <filename>Makefile</filename> file created during the
    44 second pass still contains the reference to
    45 <command>/usr/bin/install</command>, which has not been installed yet.
    46 Some host distributions contain a <filename
    47 class="symlink">ginstall</filename> symbolic link which takes
    48 precedence in the <filename>Makefile</filename> file and can cause a
    49 problem. The above command takes care of this issue.</para>
    50 
    51 <para>Remove the Binutils source and build directories now.</para>
    52 
    53 <para>Next, amend the GCC specs file so that it points to the new
     22<para>First, amend the GCC specs file so that it points to the new
    5423dynamic linker. A <command>sed</command> command accomplishes this:</para>
    5524
     
    6938linkend="ch-tools-toolchaintechnotes" role=","/> if
    7039necessary.</para></important>
     40
     41<para>Now create temporary wrapper scripts for <filename>gcc</filename> and
     42<filename>ld</filename>. These scripts will point to their real counterparts
     43in <filename class="directory">/tools</filename> but with adjusted parameters
     44to ensure that GCC in the next section links to our newly installed Glibc.</para>
     45
     46<screen><userinput>cat &gt; /usr/bin/gcc &lt;&lt; "EOF"
     47#!/bin/bash
     48/tools/bin/gcc -B/usr/lib $@
     49EOF
     50cat &gt; /usr/bin/ld &lt;&lt; "EOF"
     51#!/bin/bash
     52/tools/bin/ld -nostdlib -L/usr/lib -L/lib $@
     53EOF
     54chmod 755 /usr/bin/{ld,gcc}
     55ln -s gcc /usr/bin/cc</userinput></screen>
    7156
    7257<caution><para>It is imperative at this point to stop and ensure that
  • chapter06/revisedchroot.xml

    rae437d3 r313ca76  
    1919class="directory">/tools</filename> are no longer needed.  Since they are no
    2020longer needed you can delete the <filename class="directory">/tools</filename>
    21 directory if so desired or tar it up and keep it to build another final
    22 system.</para>
     21directory if so desired.</para>
    2322
    2423<note><para>Removing <filename class="directory">/tools</filename> will also
Note: See TracChangeset for help on using the changeset viewer.