Ignore:
Timestamp:
03/19/2020 10:18:54 AM (23 months ago)
Author:
Thomas Trepl <thomas@…>
Branches:
multilib-10.1, multilib-before-cross
Children:
7354a12
Parents:
6989d33e
Message:

MultiLib: Merge changes from trunk

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multilib@11792 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter05/gcc-pass2.xml

    r6989d33e r997d961  
    4444    <title>Installation of GCC</title>
    4545
    46     <para>Our first build of GCC has installed a couple of internal system
    47     headers.  Normally one of them, <filename>limits.h</filename>, will in turn
    48     include the corresponding system <filename>limits.h</filename> header, in
    49     this case, <filename>/tools/include/limits.h</filename>. However, at the
    50     time of the first build of gcc <filename>/tools/include/limits.h</filename>
    51     did not exist, so the internal header that GCC installed is a partial,
    52     self-contained file and does not include the extended features of the
    53     system header. This was adequate for building the temporary libc, but this
    54     build of GCC now requires the full internal header.  Create a full version
    55     of the internal header using a command that is identical to what the GCC
    56     build system does in normal circumstances:</para>
    57 
    58 <screen><userinput remap="pre">cat gcc/limitx.h gcc/glimits.h gcc/limity.h &gt; \
    59   `dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/include-fixed/limits.h</userinput></screen>
    60 <!--
    61     <para>For x86 machines, the limited number of registers is a bottleneck
    62     for the system.  Free one up by not using a frame pointer that is not
    63     needed:</para>
    64 
    65 <screen><userinput remap="pre">case `uname -m` in
    66   i?86) sed -i 's/^T_CFLAGS =$/&amp; -fomit-frame-pointer/' gcc/Makefile.in ;;
    67 esac</userinput></screen>
    68 -->
    69     <para>Once again, change the location of GCC's default dynamic linker to
    70     use the one installed in <filename
    71     class="directory">/tools</filename>.</para>
    72 
    73 <screen><userinput remap="pre">for file in gcc/config/{linux,i386/linux{,64}}.h
    74 do
    75   cp -uv $file{,.orig}
    76   sed -e 's@/lib\(64\)\?\(32\)\?\(x32\)\?/ld@/tools&amp;@g' \
    77       -e 's@/usr@/tools@g' $file.orig &gt; $file
    78   touch $file.orig
    79 done
    80 sed -e "/^#define[[:blank:]]*STANDARD_STARTFILE_PREFIX_1/ s;\".*\";\"/tools/lib/\";" \
    81     -e "/^#define[[:blank:]]*STANDARD_STARTFILE_PREFIX_2/ s;\".*\";\"\";" \
    82     -i gcc/gcc.c</userinput></screen>
    83 
    84     <para arch="default">If building on x86_64, change the default directory
    85     name for 64-bit libraries to <quote>lib</quote>:</para>
    86 
    87 <screen arch="default"><userinput remap="pre">case $(uname -m) in
    88   x86_64)
    89     sed -e '/m64=/s/lib64/lib/' \
    90         -i.orig gcc/config/i386/t-linux64
    91   ;;
    92 esac</userinput></screen>
    93 
    94     <para arch="ml_32,ml_x32,ml_all">Change the default directory name for 64-bit
    95     libraries to <quote>lib</quote>:</para>
    96 
    97 <screen arch="ml_32,ml_x32,ml_all"><userinput remap="pre">sed -e '/m64=/s/lib64/lib/'  \
    98     -e '/m32=/s/m32=.*/m32=..\/lib32$(call if_multiarch,:i386-linux-gnu)/' \
    99     -i.orig gcc/config/i386/t-linux64</userinput></screen>
    100 
    101     <para arch="default">As in the first build of GCC it requires the GMP,
    102     MPFR, and MPC packages. Unpack the tarballs and move them into the
    103     required directory names:</para>
    104 
    105     <para arch="ml_32,ml_x32,ml_all">As in the first build of GCC it requires the GMP,
    106     ISL, MPFR, and MPC packages. Unpack the tarballs and move them into the
    107     required directory names:</para>
     46    <para arch="default">As in the first build of GCC, the GMP, MPFR, and MPC packages are
     47    required. Unpack the tarballs and move them into the required directory
     48    names:</para>
     49    <para arch="ml_32,ml_x32,ml_all">As in the first build of GCC, the GMP, MPFR, MPC and ISL packages are
     50    required. Unpack the tarballs and move them into the required directory
     51    names:</para>
    10852
    10953<screen arch="default"><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz
     
    12266mv -v isl-&isl-version; isl</userinput></screen>
    12367
    124     <para>
    125       Now fix a problem introduced by Glibc-2.31:
    126     </para>
    127 
    128 <screen><userinput remap="pre">sed -e '1161 s|^|//|' \
    129     -i libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc</userinput></screen>
    130 
     68    <para>Once again, change the location of GCC's default dynamic linker to
     69    use the one installed in <filename
     70    class="directory">/tools</filename>.</para>
     71
     72<screen><userinput remap="pre">for file in gcc/config/{linux,i386/linux{,64}}.h
     73do
     74  cp -uv $file{,.orig}
     75  sed -e 's@/lib\(64\)\?\(32\)\?\(x32\)\?/ld@/tools&amp;@g' \
     76      -e 's@/usr@/tools@g' $file.orig &gt; $file
     77  touch $file.orig
     78done
     79sed -e "/^#define[[:blank:]]*STANDARD_STARTFILE_PREFIX_1/ s;\".*\";\"/tools/lib/\";" \
     80    -e "/^#define[[:blank:]]*STANDARD_STARTFILE_PREFIX_2/ s;\".*\";\"\";" \
     81    -i gcc/gcc.c</userinput></screen>
     82
     83    <para arch="default">If building on x86_64, change the default directory
     84    name for 64-bit libraries to <quote>lib</quote>:</para>
     85
     86<screen arch="default"><userinput remap="pre">case $(uname -m) in
     87  x86_64)
     88    sed -e '/m64=/s/lib64/lib/' \
     89        -i.orig gcc/config/i386/t-linux64
     90  ;;
     91esac</userinput></screen>
     92
     93    <para>Our first build of GCC has installed a couple of internal system
     94    headers.  Normally one of them, <filename>limits.h</filename>, will in turn
     95    include the corresponding system <filename>limits.h</filename> header, in
     96    this case, <filename>/tools/include/limits.h</filename>. However, at the
     97    time of the first build of gcc <filename>/tools/include/limits.h</filename>
     98    did not exist, so the internal header that GCC installed is a partial,
     99    self-contained file and does not include the extended features of the
     100    system header. This was adequate for building the temporary libc, but this
     101    build of GCC now requires the full internal header.  Create a full version
     102    of the internal header using a command that is identical to what the GCC
     103    build system does in normal circumstances:</para>
     104
     105<screen><userinput remap="pre">cat gcc/limitx.h gcc/glimits.h gcc/limity.h &gt; \
     106  `dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/include-fixed/limits.h</userinput></screen>
     107<!--
     108    <para>For x86 machines, the limited number of registers is a bottleneck
     109    for the system.  Free one up by not using a frame pointer that is not
     110    needed:</para>
     111
     112<screen><userinput remap="pre">case `uname -m` in
     113  i?86) sed -i 's/^T_CFLAGS =$/&amp; -fomit-frame-pointer/' gcc/Makefile.in ;;
     114esac</userinput></screen>
     115-->
    131116    <para>Create a separate build directory again:</para>
    132117
Note: See TracChangeset for help on using the changeset viewer.