diff options
Diffstat (limited to 'chapter06/gcc-inst.xml')
-rw-r--r-- | chapter06/gcc-inst.xml | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/chapter06/gcc-inst.xml b/chapter06/gcc-inst.xml index 1ec2c780f..6f16a3b3e 100644 --- a/chapter06/gcc-inst.xml +++ b/chapter06/gcc-inst.xml @@ -14,6 +14,9 @@ need to unpack both the gcc-core and gcc-g++ tarballs. Other compilers are available in the full gcc package; instructions for building them may be found at <ulink url="&blfs-root;view/cvs/general/gcc.html"/>.</para> +<para><screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-no_fixedincludes.patch +patch -Np1 -i ../gcc-&gcc-version;-mmap_test.patch</userinput></screen></para> + <para>It is recommended by the GCC installation documentation to build GCC in a dedicated directory outside of the source tree. Create the build directory:</para> @@ -23,9 +26,13 @@ cd ../gcc-build</userinput></screen></para> <para>Prepare GCC to be compiled:</para> -<para><screen><userinput>../gcc-&gcc-version;/configure --prefix=/usr --enable-shared \ - --enable-threads=posix --with-slibdir=/lib \ - --enable-__cxa_atexit --enable-clocale=gnu</userinput></screen></para> +<para><screen><userinput>CFLAGS="-O2 -pipe" CXXFLAGS="-O2 -pipe" \ + ../gcc-&gcc-version;/configure --prefix=/usr \ + --enable-shared --enable-threads=posix \ + --enable-__cxa_atexit --enable-clocale=gnu \ + --enable-version-specific-runtime-libs \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info</userinput></screen></para> <para>The meanings of the configure options are:</para> @@ -48,16 +55,14 @@ is implemented.</para></listitem> <para>Continue with compiling the package:</para> -<para><screen><userinput>make bootstrap</userinput></screen></para> +<para><screen><userinput>make BOOT_LDFLAGS="-s" BOOT_CFLAGS="-O2 -pipe" \ + STAGE1_CFLAGS="-pipe" bootstrap</userinput></screen></para> -<para>The <emphasis>bootstrap</emphasis> target doesn't just compile GCC, but -it compiles GCC multiple times. It uses the first compiled programs to -compile itself a second and third time to make sure the compiler was compiled -properly.</para> +<para><screen><userinput>make -k check</userinput></screen></para> <para>Finish installing the package:</para> -<para><screen><userinput>make install-no-fixedincludes</userinput></screen></para> +<para><screen><userinput>make install</userinput></screen></para> <para>Some packages expect the C PreProcessor to be installed in the <filename>/lib</filename> and <filename>/usr/lib</filename> directories. @@ -72,4 +77,6 @@ symlink:</para> <para><screen><userinput>ln -s gcc /usr/bin/cc</userinput></screen></para> +<para><screen><userinput>rm /usr/lib/libiberty.a</userinput></screen></para> + </sect2> |