Changeset 0967c90


Ignore:
Timestamp:
05/13/2017 10:56:01 PM (5 years ago)
Author:
DJ Lucas <dj@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 8.1, 8.1-rc1, 8.1-rc2, 8.2, 8.2-rc1, 8.3, 8.3-rc1, 8.3-rc2, 8.4, 8.4-rc1, 9.0, 9.0-rc1, 9.1, 9.1-rc1, cross-chap5, ml-11.0, multilib, old-trunk, trunk, xry111/git-transition, xry111/glibc-2.34, xry111/tester-nohack, xry111/usr-move
Children:
26a1b33
Parents:
4dab071
Message:

Introduce -isystem to use the final system location of gcc's internel headers in the GlibC build.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11250 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • chapter01/changelog.xml

    r4dab071 r0967c90  
    4747      <itemizedlist>
    4848        <listitem>
     49          <para>[dj] - Introduce -isystem to use the final system location of
     50          gcc's internel headers in the GlibC build.</para>
     51        </listitem>
     52        <listitem>
    4953          <para>[ken] - Update some library versions in Stripping Again, partly
    5054          fixes <ulink url="&lfs-ticket-root;4085">#4085</ulink>.</para>
  • chapter06/createfiles.xml

    r4dab071 r0967c90  
    170170      <term><parameter><filename>/usr/lib/lib{blkid,lzma,mount,uuid}.{a,la,so*}</filename></parameter></term>
    171171      <listitem>
    172         <para>These links prevent systemd utilties from being poluted with an
     172        <para>These links prevent systemd utilities from being acquiring an
    173173        unnecessary reference to the
    174174        <filename class="directory">/tools</filename> directory.</para>
  • chapter06/gcc.xml

    r4dab071 r0967c90  
    5151  ;;
    5252esac</userinput></screen>
     53
     54    <para>Remove the symlink created earlier as the final gcc includes will be
     55    installed here:</para>
     56
     57<screen><userinput remap="pre">rm -f /usr/lib/gcc</userinput></screen>
    5358
    5459    <para>The GCC documentation recommends building GCC in a dedicated build directory:</para>
  • chapter06/glibc.xml

    r4dab071 r0967c90  
    5858<screen><userinput remap="pre">patch -Np1 -i ../&glibc-fhs-patch;</userinput></screen>
    5959
    60     <para>Create a symlink for LSB compliance and, for x86_64, a
    61     compatibility symlink required for the dynamic loader to function
    62     correctly:</para>
     60    <para>First create a compatibility symlink to avoid references to /tools in
     61    our final glibc:</para>
     62
     63<screen><userinput remap="pre">ln -sfv /tools/lib/gcc /usr/lib</userinput></screen>
     64
     65    <para>Determine the GCC include directory and create a symlink for LSB
     66    compliance. Additionally, for x86_64, create a compatibility symlink
     67    required for the dynamic loader to function correctly:</para>
    6368
    6469<screen><userinput remap="pre">case $(uname -m) in
    65     x86) ln -s ld-linux.so.2 /lib/ld-lsb.so.3
     70    x86)    GCC_INCDIR=/usr/lib/gcc/x86-pc-linux-gnu/&gcc-version;/include
     71            ln -s ld-linux.so.2 /lib/ld-lsb.so.3
    6672    ;;
    67     x86_64) ln -s ../lib/ld-linux-x86-64.so.2 /lib64
     73    x86_64) GCC_INCDIR=/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include
     74            ln -s ../lib/ld-linux-x86-64.so.2 /lib64
    6875            ln -s ../lib/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3
    6976    ;;
     
    7885    <para>Prepare Glibc for compilation:</para>
    7986
    80 <screen><userinput remap="configure">../configure --prefix=/usr                   \
    81              --disable-werror                \
    82              --enable-kernel=&min-kernel;          \
    83              --enable-obsolete-rpc           \
    84              --enable-stack-protector=strong \
    85              libc_cv_slibdir=/lib</userinput></screen>
     87<screen><userinput remap="configure">CC="gcc -isystem $GCC_INCDIR -isystem /usr/include" \
     88../configure --prefix=/usr                          \
     89             --disable-werror                       \
     90             --enable-kernel=&min-kernel;                 \
     91             --enable-obsolete-rpc                  \
     92             --enable-stack-protector=strong        \
     93             libc_cv_slibdir=/lib
     94unset GCC_INCDIR</userinput></screen>
    8695
    8796   <variablelist>
    88       <title>The meaning of the new configure options:</title>
     97      <title>The meaning of the options and new configure parameters:</title>
     98
     99      <varlistentry>
     100        <term><parameter>CC="gcc -isystem $GCC_INCDIR -isystem /usr/include"</parameter></term>
     101        <listitem>
     102          <para>Setting the location of both gcc and system include directories
     103          avoids introduction of invalid paths in debuging symbols.</para>
     104        </listitem>
     105      </varlistentry>
    89106
    90107      <varlistentry>
Note: See TracChangeset for help on using the changeset viewer.