|
@@ -45,7 +45,7 @@
|
|
|
programs to fail:</para>
|
|
|
|
|
|
<screen><userinput remap="pre">patch -Np1 -i ../&gcc-upstream-patch;</userinput></screen>
|
|
|
-
|
|
|
+<!--
|
|
|
<para>As in <xref linkend="ch-tools-gcc-pass2"/>, apply the following
|
|
|
<command>sed</command> to force the build to use the
|
|
|
<option>-fomit-frame-pointer</option> compiler flag in order to ensure
|
|
@@ -54,7 +54,7 @@
|
|
|
<screen><userinput remap="pre">case `uname -m` in
|
|
|
i?86) sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in ;;
|
|
|
esac</userinput></screen>
|
|
|
-
|
|
|
+-->
|
|
|
<para>The GCC documentation recommends building GCC outside of the source
|
|
|
directory in a dedicated build directory:</para>
|
|
|
|
|
@@ -150,6 +150,14 @@ cd ../gcc-build</userinput></screen>
|
|
|
|
|
|
<screen><userinput remap="install">ln -sv gcc /usr/bin/cc</userinput></screen>
|
|
|
|
|
|
+ <para>Add a compatibility symlink to enable building programs with
|
|
|
+ Link Time Optimization (LTO):</para>
|
|
|
+
|
|
|
+<screen><userinput remap="install">install -dm755 /usr/lib/bfd-plugins
|
|
|
+pushd /usr/lib/bfd-plugins
|
|
|
+ln -sfv ../../libexec/gcc/x86_64-unknown-linux-gnu/&gcc-version;/liblto_plugin.so
|
|
|
+popd</userinput></screen>
|
|
|
+
|
|
|
<para>Now that our final toolchain is in place, it is important to again ensure
|
|
|
that compiling and linking will work as expected. We do this by performing
|
|
|
the same sanity checks as we did earlier in the chapter:</para>
|