diff options
author | Xi Ruoyao <xry111@mengyan1223.wang> | 2022-03-01 18:09:30 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@mengyan1223.wang> | 2022-03-02 18:02:07 +0800 |
commit | 3bb463d33d713d262b4864d8d3c6af08e25c77aa (patch) | |
tree | 7bbbb0cc7703b7bf149aad71e23cab81b615bd8e | |
parent | 8e0f8a9a521080c2f5fc460319e6d87b12d6039a (diff) |
gcc-pass2: document *_FOR_TARGET parameters
-rw-r--r-- | chapter06/gcc-pass2.xml | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/chapter06/gcc-pass2.xml b/chapter06/gcc-pass2.xml index d10b403e9..d76b9d9af 100644 --- a/chapter06/gcc-pass2.xml +++ b/chapter06/gcc-pass2.xml @@ -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 @@ -120,6 +120,33 @@ cd build</userinput></screen> </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> <para>This option is automatically enabled when building a native |