relax host system requirements

A requirement on Glibc is not needed at all.  It's enough once
$LFS_TGT-* is runnable.  A test on Alpine (using musl as libc) has
practically proved this.

We'd raised binutils and GCC requirements mostly for Glibc.  But now
Glibc is cross compiled by our cross toolchain with latest GCC and
binutils release, the host tools really does not matter.  In the Glibc
building process only two .c files are build with BUILD_CC (the C
compiler from the host), and they are highly conservative (mostly
unchanged for years).

Binutils does not have too much requirement on host GCC & Binutils:
there is even a Binutils commit in this week fixing a build failure with
GCC-4.2!

So the most strict limitation comes from GCC.  GCC requires host GCC to
support ISO C++ 11 so GCC >= 4.8 is needed.  And both GCC-4.8 and latest
GCC-11.2 claims a requirement for Binutils-2.12 (for x86_64) or 2.13.1
(for 32-bit x86), so we make minimal Binutils version 2.13.1.

And, host bzip2 is never used now: the only .tar.bz2 files are elfutils
and python docs.  They are not decompressed before entering chroot.
This commit is contained in:
Xi Ruoyao 2022-02-19 10:28:54 +08:00
parent 9904ecb1de
commit d6006ef769
No known key found for this signature in database
GPG Key ID: D95E4716CCBB34DC
2 changed files with 9 additions and 21 deletions

View File

@ -29,7 +29,7 @@
</listitem>
<listitem>
<para><emphasis role="strong">Binutils-2.25</emphasis> (Versions
<para><emphasis role="strong">Binutils-2.13.1</emphasis> (Versions
greater than &binutils-version; are not recommended as they have
not been tested)</para>
</listitem>
@ -39,10 +39,6 @@
should be a link to bison or small script that executes bison)</para>
</listitem>
<listitem>
<para><emphasis role="strong">Bzip2-1.0.4</emphasis></para>
</listitem>
<listitem>
<para><emphasis role="strong">Coreutils-6.9</emphasis></para>
</listitem>
@ -60,17 +56,12 @@
should be a link to gawk)</para>
</listitem>
<!-- glibc-2.30 requires gcc-6.2 or later -->
<listitem>
<para><emphasis role="strong">GCC-6.2</emphasis> including the C++
<para><emphasis role="strong">GCC-4.8</emphasis> including the C++
compiler, <command>g++</command> (Versions greater than &gcc-version; are
not recommended as they have not been tested)</para>
</listitem>
<listitem>
<para><emphasis role="strong">Glibc-2.11</emphasis> (Versions
greater than &glibc-version; are not recommended as they have
not been tested)</para>
not recommended as they have not been tested). C and C++ standard
libraries (with headers) must also be present so the C++ compiler can
build hosted programs</para>
</listitem>
<listitem>
@ -180,7 +171,6 @@ else
echo "yacc not found"
fi
bzip2 --version 2&gt;&amp;1 &lt; /dev/null | head -n1 | cut -d" " -f1,6-
echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2
diff --version | head -n1
find --version | head -n1
@ -196,7 +186,6 @@ fi
gcc --version | head -n1
g++ --version | head -n1
ldd --version | head -n1 | cut -d" " -f2- # glibc version
grep --version | head -n1
gzip --version | head -n1
cat /proc/version

View File

@ -107,11 +107,10 @@ cd build</userinput></screen>
<term><parameter>--with-glibc-version=&glibc-version;</parameter></term>
<listitem>
<para>This option specifies the version of glibc which will be
used on the target. It is not relevant 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>
used on the target. It is not relevant to the libc of the host
distro because everything compiled by pass1 gcc will run in the
chroot environment, which is isolated from libc of the host
distro.</para>
</listitem>
</varlistentry>