source: chapter06/chapter06.xml

Last change on this file was 426913e, checked in by Xi Ruoyao <xry111@…>, 12 months ago

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.

  • Property mode set to 100644
File size: 1.9 KB
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
8<chapter id="chapter-temporary-tools" xreflabel="Chapter&nbsp;6">
9 <?dbhtml dir="chapter06"?>
10 <?dbhtml filename="chapter06.html"?>
12 <title>Cross Compiling Temporary Tools</title>
14 <xi:include xmlns:xi="" href="introduction.xml"/>
15 <xi:include xmlns:xi="" href="m4.xml"/>
16 <xi:include xmlns:xi="" href="ncurses.xml"/>
17 <xi:include xmlns:xi="" href="bash.xml"/>
18 <xi:include xmlns:xi="" href="coreutils.xml"/>
19 <xi:include xmlns:xi="" href="diffutils.xml"/>
20 <xi:include xmlns:xi="" href="file.xml"/>
21 <xi:include xmlns:xi="" href="findutils.xml"/>
22 <xi:include xmlns:xi="" href="gawk.xml"/>
23 <xi:include xmlns:xi="" href="grep.xml"/>
24 <xi:include xmlns:xi="" href="gzip.xml"/>
25 <!--xi:include xmlns:xi="" href="zlib.xml"/-->
26 <xi:include xmlns:xi="" href="make.xml"/>
27 <xi:include xmlns:xi="" href="patch.xml"/>
28 <xi:include xmlns:xi="" href="sed.xml"/>
29 <xi:include xmlns:xi="" href="tar.xml"/>
30 <xi:include xmlns:xi="" href="xz.xml"/>
31 <xi:include xmlns:xi="" href="binutils-pass2.xml"/>
32 <xi:include xmlns:xi="" href="gcc-pass2.xml"/>
Note: See TracBrowser for help on using the repository browser.