diff options
Diffstat (limited to 'chapter05')
-rw-r--r-- | chapter05/gcc-pass1.xml | 16 | ||||
-rw-r--r-- | chapter05/gcc-pass2.xml | 13 |
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&@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&@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> |