mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-07-10 22:34:21 +01:00
glibc: Drop --with-headers in pass 1
I cannot see why this is ever needed. The default is "the compiler default" which should be correct as the compiler has been configured --with-sysroot. And the explanation for this switch is just repeating a common misunderstanding. In fact glibc **never** attempts to figure out what features the kernel has from the headers. Instead it depends on the kernel-features.h files in the source tree and the --with-kernel value to determine the kernel features that it can rely on.
This commit is contained in:
parent
5e3bef69d1
commit
7e4fd2e198
@ -91,7 +91,6 @@ cd build</userinput></screen>
|
|||||||
--host=$LFS_TGT \
|
--host=$LFS_TGT \
|
||||||
--build=$(../scripts/config.guess) \
|
--build=$(../scripts/config.guess) \
|
||||||
--enable-kernel=&min-kernel; \
|
--enable-kernel=&min-kernel; \
|
||||||
--with-headers=$LFS/usr/include \
|
|
||||||
--disable-nscd \
|
--disable-nscd \
|
||||||
libc_cv_slibdir=/usr/lib</userinput></screen>
|
libc_cv_slibdir=/usr/lib</userinput></screen>
|
||||||
|
|
||||||
@ -116,16 +115,6 @@ cd build</userinput></screen>
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><parameter>--with-headers=$LFS/usr/include</parameter></term>
|
|
||||||
<listitem>
|
|
||||||
<para>This tells Glibc to compile itself against the headers
|
|
||||||
recently installed to the $LFS/usr/include directory, so that
|
|
||||||
it knows exactly what features the kernel has and can optimize
|
|
||||||
itself accordingly.</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><parameter>libc_cv_slibdir=/usr/lib</parameter></term>
|
<term><parameter>libc_cv_slibdir=/usr/lib</parameter></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -439,27 +439,19 @@ checking what linker to use... /mnt/lfs/tools/i686-lfs-linux-gnu/bin/ld</compute
|
|||||||
standard C library (glibc) to interface with features that the Linux
|
standard C library (glibc) to interface with features that the Linux
|
||||||
kernel will provide.</para>
|
kernel will provide.</para>
|
||||||
|
|
||||||
<para>Next comes glibc. The most important
|
<para>Next comes glibc. This is the first package that we cross-compile.
|
||||||
considerations for building glibc are the compiler, binary tools, and
|
We use the <parameter>--host=$LFS_TGT</parameter> option to make
|
||||||
kernel headers. The compiler and binary tools are not an issue
|
the build system to use those tools prefixed with
|
||||||
as <parameter>--host=$LFS_TGT</parameter> makes the build system to use
|
<literal>$LFS_TGT-</literal>, and the
|
||||||
those tools prefixed with <literal>$LFS_TGT-</literal> as we've
|
<parameter>--build=$(../scripts/config.guess)</parameter> option to
|
||||||
discussed. The kernel headers can
|
enable <quote>the cross-compilation mode</quote> as we've discussed.
|
||||||
be a bit more complicated. Therefore, we take no risks and use
|
The <envar>DESTDIR</envar> variable is used to force installation into
|
||||||
the available configure switch to enforce the correct selection. After
|
the LFS file system.</para>
|
||||||
the run of <command>configure</command>, check the contents of the
|
|
||||||
<filename>config.make</filename> file in the <filename
|
|
||||||
class="directory">build</filename> directory for all important details.
|
|
||||||
These items highlight an important aspect of the glibc
|
|
||||||
package—it is very self-sufficient in terms of its build machinery,
|
|
||||||
and generally does not rely on toolchain defaults.</para>
|
|
||||||
|
|
||||||
<para>As mentioned above, the standard C++ library is compiled next, followed in
|
<para>As mentioned above, the standard C++ library is compiled next, followed in
|
||||||
<xref linkend="chapter-temporary-tools"/> by other programs that must
|
<xref linkend="chapter-temporary-tools"/> by other programs that must
|
||||||
be cross-compiled to break circular dependencies at build time.
|
be cross-compiled to break circular dependencies at build time.
|
||||||
The install step of all those packages uses the
|
The steps for those packages are similar to the steps for glibc.</para>
|
||||||
<envar>DESTDIR</envar> variable to force installation
|
|
||||||
in the LFS filesystem.</para>
|
|
||||||
|
|
||||||
<para>At the end of <xref linkend="chapter-temporary-tools"/> the native
|
<para>At the end of <xref linkend="chapter-temporary-tools"/> the native
|
||||||
LFS compiler is installed. First binutils-pass2 is built,
|
LFS compiler is installed. First binutils-pass2 is built,
|
||||||
|
Loading…
Reference in New Issue
Block a user