Ignore:
Timestamp:
05/13/2017 10:56:01 PM (7 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, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.