|
@@ -43,29 +43,28 @@
|
|
|
<sect2 role="installation">
|
|
|
<title>Installation of GCC</title>
|
|
|
|
|
|
- <para>Our first build of GCC has installed a couple of internal system
|
|
|
- headers. Normally one of them, <filename>limits.h</filename>, will in turn
|
|
|
- include the corresponding system <filename>limits.h</filename> header, in
|
|
|
- this case, <filename>/tools/include/limits.h</filename>. However, at the
|
|
|
- time of the first build of gcc <filename>/tools/include/limits.h</filename>
|
|
|
- did not exist, so the internal header that GCC installed is a partial,
|
|
|
- self-contained file and does not include the extended features of the
|
|
|
- system header. This was adequate for building the temporary libc, but this
|
|
|
- build of GCC now requires the full internal header. Create a full version
|
|
|
- of the internal header using a command that is identical to what the GCC
|
|
|
- build system does in normal circumstances:</para>
|
|
|
+ <para arch="default">As in the first build of GCC, the GMP, MPFR, and MPC packages are
|
|
|
+ required. Unpack the tarballs and move them into the required directory
|
|
|
+ names:</para>
|
|
|
+ <para arch="ml_32,ml_x32,ml_all">As in the first build of GCC, the GMP, MPFR, MPC and ISL packages are
|
|
|
+ required. Unpack the tarballs and move them into the required directory
|
|
|
+ names:</para>
|
|
|
|
|
|
-<screen><userinput remap="pre">cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
|
|
|
- `dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/include-fixed/limits.h</userinput></screen>
|
|
|
-<!--
|
|
|
- <para>For x86 machines, the limited number of registers is a bottleneck
|
|
|
- for the system. Free one up by not using a frame pointer that is not
|
|
|
- needed:</para>
|
|
|
+<screen arch="default"><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz
|
|
|
+mv -v mpfr-&mpfr-version; mpfr
|
|
|
+tar -xf ../gmp-&gmp-version;.tar.xz
|
|
|
+mv -v gmp-&gmp-version; gmp
|
|
|
+tar -xf ../mpc-&mpc-version;.tar.gz
|
|
|
+mv -v mpc-&mpc-version; mpc</userinput></screen>
|
|
|
+<screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz
|
|
|
+mv -v mpfr-&mpfr-version; mpfr
|
|
|
+tar -xf ../gmp-&gmp-version;.tar.xz
|
|
|
+mv -v gmp-&gmp-version; gmp
|
|
|
+tar -xf ../mpc-&mpc-version;.tar.gz
|
|
|
+mv -v mpc-&mpc-version; mpc
|
|
|
+tar -xf ../isl-&isl-version;.tar.xz
|
|
|
+mv -v isl-&isl-version; isl</userinput></screen>
|
|
|
|
|
|
-<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>Once again, change the location of GCC's default dynamic linker to
|
|
|
use the one installed in <filename
|
|
|
class="directory">/tools</filename>.</para>
|
|
@@ -91,43 +90,29 @@ sed -e "/^#define[[:blank:]]*STANDARD_STARTFILE_PREFIX_1/ s;\".*\";\"/tools/lib/
|
|
|
;;
|
|
|
esac</userinput></screen>
|
|
|
|
|
|
- <para arch="ml_32,ml_x32,ml_all">Change the default directory name for 64-bit
|
|
|
- libraries to <quote>lib</quote>:</para>
|
|
|
-
|
|
|
-<screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/' \
|
|
|
- -e '/m32=/s/m32=.*/m32=..\/lib32$(call if_multiarch,:i386-linux-gnu)/' \
|
|
|
- -i.orig gcc/config/i386/t-linux64</userinput></screen>
|
|
|
-
|
|
|
- <para arch="default">As in the first build of GCC it requires the GMP,
|
|
|
- MPFR, and MPC packages. Unpack the tarballs and move them into the
|
|
|
- required directory names:</para>
|
|
|
-
|
|
|
- <para arch="ml_32,ml_x32,ml_all">As in the first build of GCC it requires the GMP,
|
|
|
- ISL, MPFR, and MPC packages. Unpack the tarballs and move them into the
|
|
|
- required directory names:</para>
|
|
|
-
|
|
|
-<screen arch="default"><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz
|
|
|
-mv -v mpfr-&mpfr-version; mpfr
|
|
|
-tar -xf ../gmp-&gmp-version;.tar.xz
|
|
|
-mv -v gmp-&gmp-version; gmp
|
|
|
-tar -xf ../mpc-&mpc-version;.tar.gz
|
|
|
-mv -v mpc-&mpc-version; mpc</userinput></screen>
|
|
|
-<screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz
|
|
|
-mv -v mpfr-&mpfr-version; mpfr
|
|
|
-tar -xf ../gmp-&gmp-version;.tar.xz
|
|
|
-mv -v gmp-&gmp-version; gmp
|
|
|
-tar -xf ../mpc-&mpc-version;.tar.gz
|
|
|
-mv -v mpc-&mpc-version; mpc
|
|
|
-tar -xf ../isl-&isl-version;.tar.xz
|
|
|
-mv -v isl-&isl-version; isl</userinput></screen>
|
|
|
-
|
|
|
- <para>
|
|
|
- Now fix a problem introduced by Glibc-2.31:
|
|
|
- </para>
|
|
|
+ <para>Our first build of GCC has installed a couple of internal system
|
|
|
+ headers. Normally one of them, <filename>limits.h</filename>, will in turn
|
|
|
+ include the corresponding system <filename>limits.h</filename> header, in
|
|
|
+ this case, <filename>/tools/include/limits.h</filename>. However, at the
|
|
|
+ time of the first build of gcc <filename>/tools/include/limits.h</filename>
|
|
|
+ did not exist, so the internal header that GCC installed is a partial,
|
|
|
+ self-contained file and does not include the extended features of the
|
|
|
+ system header. This was adequate for building the temporary libc, but this
|
|
|
+ build of GCC now requires the full internal header. Create a full version
|
|
|
+ of the internal header using a command that is identical to what the GCC
|
|
|
+ build system does in normal circumstances:</para>
|
|
|
|
|
|
-<screen><userinput remap="pre">sed -e '1161 s|^|//|' \
|
|
|
- -i libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc</userinput></screen>
|
|
|
+<screen><userinput remap="pre">cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \
|
|
|
+ `dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/include-fixed/limits.h</userinput></screen>
|
|
|
+<!--
|
|
|
+ <para>For x86 machines, the limited number of registers is a bottleneck
|
|
|
+ for the system. Free one up by not using a frame pointer that is not
|
|
|
+ needed:</para>
|
|
|
|
|
|
+<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>Create a separate build directory again:</para>
|
|
|
|
|
|
<screen><userinput remap="pre">mkdir -v build
|