gcc-pass2: document *_FOR_TARGET parameters

This commit is contained in:
Xi Ruoyao 2022-03-01 18:09:30 +08:00
parent 8e0f8a9a52
commit 3bb463d33d
No known key found for this signature in database
GPG Key ID: D95E4716CCBB34DC

View File

@ -107,7 +107,7 @@ cd build</userinput></screen>
<title>The meaning of the new configure options:</title><!-- WIP -->
<varlistentry>
<term><parameter>-with-build-sysroot=$LFS</parameter></term>
<term><parameter>--with-build-sysroot=$LFS</parameter></term>
<listitem>
<para>Normally, using <parameter>--host</parameter> ensures that
a cross-compiler is used for building GCC, and that compiler knows
@ -119,6 +119,33 @@ cd build</userinput></screen>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>--target=$LFS_TGT</parameter></term>
<listitem>
<para>As we are cross-compiling GCC, it's impossible to build
target libraries (<filename class="libraryfile">libgcc</filename>
and <filename class="libraryfile">libstdc++</filename>) with the
compiled GCC binaries because these binaries won't run on the
host distro. GCC building system will attempt to use the
C and C++ compilers on the host distro as a workaround by default.
It's not supported to build GCC target libraries with a different
version of GCC, so using host compilers may cause building
failure. This parameter ensures to build the libraries with GCC
pass 1 and prevent the issue.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>LDFLAGS_FOR_TARGET=...</parameter></term>
<listitem>
<para>Allow <filename class="libraryfile">libstdc++</filename> to
use shared <filename class="libraryfile">libgcc</filename> being
built in this pass, instead of the static version built in GCC
pass 1. This is needed for supporting C++ exception
handling.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>--enable-initfini-array</parameter></term>
<listitem>