Ignore:
Timestamp:
02/10/2022 01:05:33 PM (2 years ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
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, arm, bdubbs/gcc13, 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:
db3c501
Parents:
b35ab48b
git-author:
Xi Ruoyao <xry111@…> (02/10/2022 12:13:21 PM)
git-committer:
Xi Ruoyao <xry111@…> (02/10/2022 01:05:33 PM)
Message:

binutils-pass2: workaround "binaries link to host libraries" issue

A very old libtool copy (2009-11-29) is shipped in binutils tarball. It
does not support sysroot, so the cross-built binutils binaries may link
to libraries from the host distro, if certain libraries are available.

The ideal solution should be updating libtool, as libtool-2.4.6 (in LFS)
has sysroot support. However, updating libtool for binutils is not
trivial: it would require to rerun autoconf and binutils building system
sticks to autoconf-2.69. Another issue is the sysroot support for
libtool has introduced a configure option "--with-sysroot", which
conflicts with an already existing option with the same name in
GCC and binutils building system (we are using the GCC/binutils version
of --with-sysroot in chapter 5).

GCC building system has --with-build-sysroot (we are using this for GCC
pass 2) for this issue. Binutils copied GCC building system, but it
does not respect --with-build-sysroot.

So for now we just edit libtool code to prevent "-L/usr/lib" in
$LFS_TGT_gcc command line. It should fix the issue about host libiberty
(reported in #lfs-support) as well, but it still need to be confirmed by
someone having such a host.

Tested with a jhalfs run on LFS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter01/changelog.xml

    rb35ab48b r426913e  
    4141    -->
    4242    <listitem>
     43      <para>2022-02-10</para>
     44      <itemizedlist>
     45        <listitem>
     46          <para>[xry111] - Workaround the issue causing binaries link to
     47          libraries from the host distro for pass 2 binutils.  It's now
     48          unnecessary to build zlib in chapter 6.</para>
     49        </listitem>
     50      </itemizedlist>
     51    </listitem>
     52
     53    <listitem>
    4354      <para>2022-02-09</para>
    4455      <itemizedlist>
Note: See TracChangeset for help on using the changeset viewer.