aboutsummaryrefslogtreecommitdiffstats
path: root/chapter05
diff options
context:
space:
mode:
authorDJ Lucas <dj@linuxfromscratch.org>2016-12-17 06:46:18 +0000
committerDJ Lucas <dj@linuxfromscratch.org>2016-12-17 06:46:18 +0000
commitbe3d9f313a25000d1cbaa631852be62330828f2c (patch)
tree87d04399c46fe7a8612b0f3247011dc1c55adb46 /chapter05
parent9f3c264e7c4b780161c70e899c09084bc1c400bd (diff)
Merge nosym branch.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11154 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter05')
-rw-r--r--chapter05/gcc-pass1.xml16
-rw-r--r--chapter05/gcc-pass2.xml13
2 files changed, 24 insertions, 5 deletions
diff --git a/chapter05/gcc-pass1.xml b/chapter05/gcc-pass1.xml
index 694bfe780..f72e11df0 100644
--- a/chapter05/gcc-pass1.xml
+++ b/chapter05/gcc-pass1.xml
@@ -68,8 +68,7 @@ mv -v mpc-&mpc-version; mpc</userinput></screen>
class="directory">/usr/include</filename> from GCC's include search path.
Issue:</para>
-<screen><userinput remap="pre">for file in \
- $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
+<screen><userinput remap="pre">for file in gcc/config/{linux,i386/linux{,64}}.h
do
cp -uv $file{,.orig}
sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&amp;@g' \
@@ -97,7 +96,18 @@ done</userinput></screen>
Finally, we use <command>touch</command> to update the timestamp on the
copied files. When used in conjunction with <command>cp -u</command>, this
prevents unexpected changes to the original files in case the commands are
- inadvertently run twice. </para>
+ inadvertently run twice.</para>
+
+ <para>Finally, on x86_64 hosts, set the default directory name for
+ 64-bit libraries to <quote>lib</quote>:</para>
+
+<screen><userinput remap="pre">case $(uname -m) in
+ x86_64)
+ sed -e '/m64=/s/lib64/lib/' \
+ -i.orig gcc/config/i386/t-linux64
+ ;;
+esac</userinput></screen>
+
<!--
<para>GCC doesn't detect stack protection correctly, which causes problems
for the build of Glibc-&glibc-version;, so fix that by issuing the following
diff --git a/chapter05/gcc-pass2.xml b/chapter05/gcc-pass2.xml
index a8844ed7d..776f23538 100644
--- a/chapter05/gcc-pass2.xml
+++ b/chapter05/gcc-pass2.xml
@@ -70,8 +70,7 @@ esac</userinput></screen>
use the one installed in <filename
class="directory">/tools</filename>.</para>
-<screen><userinput remap="pre">for file in \
- $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
+<screen><userinput remap="pre">for file in gcc/config/{linux,i386/linux{,64}}.h
do
cp -uv $file{,.orig}
sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&amp;@g' \
@@ -84,6 +83,16 @@ do
touch $file.orig
done</userinput></screen>
+ <para>If building on x86_64, change the default directory name for 64-bit
+ libraries to <quote>lib</quote>:</para>
+
+<screen><userinput remap="pre">case $(uname -m) in
+ x86_64)
+ sed -e '/m64=/s/lib64/lib/' \
+ -i.orig gcc/config/i386/t-linux64
+ ;;
+esac</userinput></screen>
+
<para>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>