diff options
author | Jeremy Huntwork <jhuntwork@linuxfromscratch.org> | 2008-12-03 22:46:04 +0000 |
---|---|---|
committer | Jeremy Huntwork <jhuntwork@linuxfromscratch.org> | 2008-12-03 22:46:04 +0000 |
commit | 6e886330cf157dc71e6a0a1fca410d7005683167 (patch) | |
tree | 0d8c4ae5a6429328469c512bb9f6661ad3886e19 /chapter05/gcc-pass2.xml | |
parent | b0e1dc860c471d7047fc906001f3a336ef5f357c (diff) |
Initial addition of support for x86_64
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8754 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter05/gcc-pass2.xml')
-rw-r--r-- | chapter05/gcc-pass2.xml | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/chapter05/gcc-pass2.xml b/chapter05/gcc-pass2.xml index 5a41c879d..bbdda355f 100644 --- a/chapter05/gcc-pass2.xml +++ b/chapter05/gcc-pass2.xml @@ -99,7 +99,8 @@ sed 's/^XCFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in.tmp \ GCC. That is, all of the binaries created during the build will link against the new Glibc. Issue:</para> -<screen><userinput remap="pre">for file in $(find gcc/config -name linux64.h -o -name linux.h) +<screen><userinput remap="pre">for file in \ + $(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h) do cp -uv $file{,.orig} sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \ @@ -112,7 +113,8 @@ done</userinput></screen> <para>In case the above seems hard to follow, let's break it down a bit. First we find all the files under the gcc/config directory that are named - either <filename>linux.h</filename> or <filename>linux64.h</filename>. + either <filename>linux.h</filename>, <filename>linux64.h</filename> or + <filename>sysv4.h</filename>. For each file found, we copy it to a file of the same name but with an added suffix of <quote>.orig</quote>. Then the first sed expression prepends <quote>/tools</quote> to every instance of <quote>/lib/ld</quote>, @@ -124,6 +126,14 @@ done</userinput></screen> changes to the original files in case the command is inadvertently run twice. </para> + <para>Unsetting the multlib spec for GCC ensures that it + won't attempt to link against libraries on the host:</para> + +<screen><userinput remap="pre">for file in $(find gcc/config -name t-linux64) ; do \ + cp -v $file{,.orig} + sed '/MULTILIB_OSDIRNAMES/d' $file.orig > $file +done</userinput></screen> + <para>As in the first build of GCC it requires the GMP and MPFR packages. Unpack the tarballs and move them into the required directory names:</para> @@ -146,7 +156,8 @@ cd ../gcc-build</userinput></screen> --with-local-prefix=/tools --enable-clocale=gnu \ --enable-shared --enable-threads=posix \ --enable-__cxa_atexit --enable-languages=c,c++ \ - --disable-libstdcxx-pch --disable-bootstrap</userinput></screen> + --disable-libstdcxx-pch --disable-multilib \ + --disable-bootstrap</userinput></screen> <variablelist> <title>The meaning of the new configure options:</title> |