Changeset 0fc98a0


Ignore:
Timestamp:
12/02/2021 07:06:18 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:
7abb6a9, 88bbf22
Parents:
bdc9e03
git-author:
Xi Ruoyao <xry111@…> (11/30/2021 09:56:34 PM)
git-committer:
Xi Ruoyao <xry111@…> (12/02/2021 07:06:18 PM)
Message:

gcc-pass1: set --with-glibc-version to target glibc version

"info gccinstall" says:

'--with-glibc-version=MAJOR.MINOR'

Tell GCC that when the GNU C Library (glibc) is used on the target
it will be version MAJOR.MINOR or later. Normally this can be
detected from the C library's header files, but this option may be
needed when bootstrapping a cross toolchain without the header
files available for building the initial bootstrap compiler.

So it can, and should be set to the version of glibc which will be built
for the chroot environment.

On x86_64, currently it does not make any difference with values >=
2.13. But it may make a difference if a new feature is added to glibc,
or on other platforms.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter05/gcc-pass1.xml

    rbdc9e03 r0fc98a0  
    8484    --target=$LFS_TGT         \
    8585    --prefix=$LFS/tools       \
    86     --with-glibc-version=2.11 \
     86    --with-glibc-version=&glibc-version; \
    8787    --with-sysroot=$LFS       \
    8888    --with-newlib             \
     
    105105
    106106      <varlistentry>
    107         <term><parameter>--with-glibc-version=2.11</parameter></term>
    108         <listitem>
    109           <para>This option ensures the package will be compatible with the host's
    110           version of glibc.  It is set to the minimum glibc requirement
    111           specified in the <xref linkend="ch-partitioning-hostreqs"/>.</para>
     107        <term><parameter>--with-glibc-version=&glibc-version;</parameter></term>
     108        <listitem>
     109          <para>This option specifies the version of glibc which will be
     110          used on the target. It is not relevent to the minimum glibc
     111          requirement specified in the
     112          <xref linkend="ch-partitioning-hostreqs"/> because everything
     113          compiled by pass1 gcc will run in the chroot environment,
     114          which is isolated from glibc of the host distro.</para>
    112115        </listitem>
    113116      </varlistentry>
Note: See TracChangeset for help on using the changeset viewer.