diff options
author | Xi Ruoyao <xry111@mengyan1223.wang> | 2021-12-01 05:56:34 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@mengyan1223.wang> | 2021-12-03 03:06:18 +0800 |
commit | 0fc98a07ffecf993c6597d71089e40b3f5687fae (patch) | |
tree | f436cb8b9f26ced35cac947d87302e0b2e57345e /chapter05 | |
parent | bdc9e03b781ef2e4731cb45dfe3919cfb460d764 (diff) |
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.
Diffstat (limited to 'chapter05')
-rw-r--r-- | chapter05/gcc-pass1.xml | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml index 765f5b875..93b6a2229 100644 --- a/chapter05/gcc-pass1.xml +++ b/chapter05/gcc-pass1.xml @@ -83,7 +83,7 @@ cd build</userinput></screen> <screen><userinput remap="configure">../configure \ --target=$LFS_TGT \ --prefix=$LFS/tools \ - --with-glibc-version=2.11 \ + --with-glibc-version=&glibc-version; \ --with-sysroot=$LFS \ --with-newlib \ --without-headers \ @@ -104,11 +104,14 @@ cd build</userinput></screen> <title>The meaning of the configure options:</title> <varlistentry> - <term><parameter>--with-glibc-version=2.11</parameter></term> + <term><parameter>--with-glibc-version=&glibc-version;</parameter></term> <listitem> - <para>This option ensures the package will be compatible with the host's - version of glibc. It is set to the minimum glibc requirement - specified in the <xref linkend="ch-partitioning-hostreqs"/>.</para> + <para>This option specifies the version of glibc which will be + used on the target. It is not relevent to the minimum glibc + requirement specified in the + <xref linkend="ch-partitioning-hostreqs"/> because everything + compiled by pass1 gcc will run in the chroot environment, + which is isolated from glibc of the host distro.</para> </listitem> </varlistentry> |