diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 2ff76e43d..a906b3b48 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -39,6 +39,12 @@ 2013-03-29 + + [matthew] - Use --disable-install-libiberty to prevent GCC from + installing libiberty.a (thanks to Armin K. for the pointer). Retain + the existing sed, though, as the flag doesn't work correctly + yet. + [matthew] - Remove the now unnecessary instructions that prevented GCC's info files from being built; GCC-4.8.0 contains diff --git a/chapter06/gcc.xml b/chapter06/gcc.xml index b36cf66dc..011692cc0 100644 --- a/chapter06/gcc.xml +++ b/chapter06/gcc.xml @@ -41,13 +41,6 @@ Installation of GCC - Apply a sed substitution that will suppress the - installation of libiberty.a. The - version of libiberty.a provided by - Binutils will be used instead: - -sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in - As in , apply the following sed to force the build to use the compiler flag in order to ensure @@ -57,6 +50,12 @@ i?86) sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in ;; esac + Workaround a bug so that GCC doesn't install + libiberty.a, which is already + provided by Binutils: + +sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in + Also fix an error in one of the check Makefiles: sed -i -e /autogen/d -e /check.sh/d fixincludes/Makefile.in @@ -69,15 +68,16 @@ cd ../gcc-build Prepare GCC for compilation: -../gcc-&gcc-version;/configure --prefix=/usr \ - --libexecdir=/usr/lib \ - --enable-shared \ - --enable-threads=posix \ - --enable-__cxa_atexit \ - --enable-clocale=gnu \ - --enable-languages=c,c++ \ - --disable-multilib \ - --disable-bootstrap \ +../gcc-&gcc-version;/configure --prefix=/usr \ + --libexecdir=/usr/lib \ + --enable-shared \ + --enable-threads=posix \ + --enable-__cxa_atexit \ + --enable-clocale=gnu \ + --enable-languages=c,c++ \ + --disable-multilib \ + --disable-bootstrap \ + --disable-install-libiberty \ --with-system-zlib Note that for other languages, there are some prerequisites that @@ -87,6 +87,14 @@ cd ../gcc-build The meaning of the new configure option: + + --disable-install-libiberty + + This prevents GCC from installing its own copy of libiberty, + which is already provided by Binutils-&binutils-version;. + + + --with-system-zlib