Updated to GCC-3.4.1

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2686 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
Randy McMurchy 2004-08-29 06:19:42 +00:00
parent d7b8efd208
commit 8ca386d679
3 changed files with 234 additions and 105 deletions

View File

@ -1,4 +1,4 @@
<!ENTITY day "28">
<!ENTITY day "29">
<!ENTITY month "08">
<!ENTITY year "2004">
<!ENTITY version "svn-&year;&month;&day;">
@ -128,7 +128,7 @@
<!ENTITY j2sdk-src-version "1.4.2">
<!ENTITY ruby-version "1.8.1">
<!ENTITY expect-version "5.42.1">
<!ENTITY gcc-version "3.3.3">
<!ENTITY gcc-version "3.4.1">
<!ENTITY tcl-version "8.4.6">
<!ENTITY tk-version "8.4.6">
<!ENTITY gcc2-version "2.95.3">

View File

@ -6,15 +6,15 @@
<!ENTITY gcc-download-http "http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
<!ENTITY gcc-download-ftp "ftp://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
<!ENTITY gcc-size "23 MB">
<!ENTITY gcc-buildsize "889 MB">
<!ENTITY gcc-time "29.3 SBU">
<!ENTITY gnat-download-http " ">
<!ENTITY gcc-size "27.2 MB">
<!ENTITY gcc-buildsize "1.2 GB">
<!ENTITY gcc-time "36.2 SBU">
<!-- <!ENTITY gnat-download-http " ">
<!ENTITY gnat-download-ftp "ftp://cs.nyu.edu/pub/gnat/3.15p/gnat-3.15p-i686-pc-redhat71-gnu-bin.tar.gz">
<!ENTITY gnat-size "13.2 MB">
<!ENTITY gnat-buildsize "48.9 MB">
<!ENTITY gnat-time "0.01 SBU">
<!ENTITY gnat-time "0.01 SBU"> -->
]>
<sect1 id="gcc" xreflabel="GCC-&gcc-version;">
@ -27,15 +27,20 @@
<sect2>
<title>Introduction to <application><acronym>GCC</acronym></application></title>
<para>The <application><acronym>GCC</acronym></application> package
<para>The <application><acronym>GCC</acronym></application> package
contains <acronym>GNU</acronym> compilers. This is useful for
compiling programs written in <application>Ada</application>,
<!-- compiling programs written in <application>Ada</application>, -->
compiling programs written in
<application>C</application>, <application>C++</application>,
<application>Fortran</application>, <application>Java</application> and
<application>Objective C</application>.</para>
<sect3><title>Package information</title>
<application>Objective C</application>. The
<application><acronym>GCC</acronym></application> package also contains an
<application>Ada</application> compiler, however, the installation
documentation is flawed and all the <application>Ada</application> tools cannot
be built using conventional methods.</para>
<sect3><title>Package Information</title>
<itemizedlist spacing='compact'>
<listitem><para>Download (HTTP): <ulink
url="&gcc-download-http;"/></para></listitem>
@ -47,22 +52,34 @@ url="&gcc-download-ftp;"/></para></listitem>
<listitem><para>Estimated build time:
&gcc-time;</para></listitem></itemizedlist>
</sect3>
<sect3><title>Additional Downloads</title>
<itemizedlist spacing='compact'>
<listitem><para>Required Patch: <ulink
url="&patch-root;/gcc-&gcc-version;-no_fixincludes-1.patch"/></para></listitem>
<listitem><para>Test Suite: <ulink
url="http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-&gcc-version;/gcc-testsuite-&gcc-version;.tar.bz2"/></para>
</listitem>
</itemizedlist></sect3>
<sect3><title><application><acronym>GCC</acronym></application>
Dependencies</title>
<sect4><title>Recommended</title>
<itemizedlist spacing='compact'>
<listitem><para><xref linkend="expect"/> and
<ulink url="http://freshmeat.net/projects/dejagnu/">DejaGnu</ulink></para>
</listitem></itemizedlist>
</sect4></sect3>
</sect2>
<sect2>
<title>Installation of <application><acronym>GCC</acronym></application></title>
<para>If you plan to compile Ada, you will need to install
<!-- <para>If you plan to compile Ada, you will need to install
<application><acronym>GNAT</acronym></application> temporarily to
satisfy the circular dependency when you recompile
<application><acronym>
GCC</acronym></application> to include
<application><acronym>GCC</acronym></application> to include
<application>Ada</application>.</para>
<sect3><title>Package information</title>
@ -78,15 +95,17 @@ url="&gnat-download-ftp;"/></para></listitem>
&gnat-time;</para></listitem></itemizedlist>
</sect3>
<sect3><title><application><acronym>GNAT</acronym></application> dependencies</title>
<sect3><title><application><acronym>GNAT</acronym></application>
dependencies</title>
<sect4><title>Required</title>
<para><xref linkend="tcsh"/></para></sect4>
</sect3>
</sect2>
<sect2>
<title>Installation of <application><acronym>GNAT</acronym></application></title>
<title>Installation of <application><acronym>GNAT</acronym></application>
</title>
<para>Install <application><acronym>GNAT</acronym></application> by running the
following commands:</para>
@ -98,11 +117,9 @@ following commands:</para>
system <command>gcc</command>, the package will be installed in a separate
directory, that can later be removed from the system.</para>
<para>In response to the questions asked by the
<command>doconfig</command> script, enter
<userinput>3</userinput> in response to the first question
and <userinput>/opt/gnat</userinput> in response to the
second question.</para>
<para>In response to the questions asked by the <command>doconfig</command>
script, enter <userinput>3</userinput> in response to the first question
and <userinput>/opt/gnat</userinput> in response to the second question.</para>
<para>To finish the install, run:</para>
<screen><userinput><command>./doinstall</command></userinput></screen>
@ -113,193 +130,302 @@ script.</para>
</sect2>
<sect2><title>Return to Installation of <application><acronym>GCC</acronym></application></title>
<para>Patch the source files with the following command:</para>
<sect2><title>Return to Installation of
<application><acronym>GCC</acronym></application></title>
<screen><userinput><command>patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes-1.patch &amp;&amp;
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in</command></userinput></screen>
<para>Install <application><acronym>GCC</acronym></application> by running the
following commands:</para>
<screen><userinput><command>PATH_HOLD=$PATH &amp;&amp;
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in &amp;&amp;
PATH_HOLD=$PATH &amp;&amp;
export PATH=/opt/gnat/bin:$PATH &amp;&amp;
cd gcc/ada &amp;&amp;
touch treeprs.ads [es]info.h nmake.ad[bs] &amp;&amp;
cd ../.. &amp;&amp;
mkdir ../gcc-build &amp;&amp;
cd ../gcc-build &amp;&amp;
CC=/usr/bin/gcc ../gcc-&gcc-version;/configure --prefix=/usr --enable-shared \
--enable-languages=c,c++,objc,f77,ada,java --enable-threads=posix \
--enable-__cxa_atexit --enable-clocale=gnu &amp;&amp;
CC=/usr/bin/gcc ../gcc-&gcc-version;/configure -prefix=/usr -enable-shared \
../gcc-&gcc-version;/configure -prefix=/usr -libexecdir=/usr/lib \
-enable-shared -enable-languages=c,c++,objc,f77,java \
-enable-threads=posix -enable-__cxa_atexit -enable-clocale=gnu &amp;&amp;
make bootstrap &amp;&amp;
make -C gcc gnatlib_and_tools &amp;&amp;
make -k check &amp;&amp;
../gcc-3.4.1/contrib/test_summary &amp;&amp;
../gcc-3.4.1/contrib/test_summary | grep -A7 Summ &amp;&amp;
make install &amp;&amp;
ln -sf ../usr/bin/cpp /lib &amp;&amp;
ln -sf gcc /usr/bin/cc &amp;&amp;
ln -sf g77 /usr/bin/f77 &amp;&amp;
chown -R root:root /usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/include &amp;&amp;
export PATH=$PATH_HOLD</command></userinput></screen>
<para>You may remove the <application><acronym>GNAT</acronym></application>
installation:</para>
<screen><userinput><command>rm -rf /opt/gnat</command></userinput></screen>
<screen><userinput><command>rm -rf /opt/gnat</command></userinput></screen> -->
<important><para>The installation process may overwrite your existing
<application><acronym>GCC</acronym></application> compiler and libraries. It
is strongly recommended that you install the <application>Expect</application>
and <application>DejaGnu</application> packages as well as unpacking the
<application><acronym>GCC</acronym></application> testsuite tarball before
beginning the build.</para>
<para>Do not continue with the <command>make install</command> command until
you're confident the build was successful. You can compare your test results
with those found at <ulink
url="http://gcc.gnu.org/ml/gcc-testresults/"/>. There's also an i686 platform
test result produced by an <acronym>LFS</acronym> (SVN-testing-040712) system
at <ulink url="http://www.linuxfromscratch.org/~randy/gcc-test.txt"/>. You may
also want to refer to the information found in the
<application><acronym>GCC</acronym></application>-Pass 2 section of Chapter 5
in the <acronym>LFS</acronym> book.</para></important>
<note><para>Some of the <application>Java</application> programs installed by
the <application><acronym>GCC</acronym></application> package conflict (have
the same names) with programs from the <xref linkend="j2sdk"/> package. If
you're installing the <application>Java</application> language from the
<application><acronym>GCC</acronym></application> package but you wish to
use the programs from the <application>JDK</application> as the defaults,
ensure
<filename class='directory'><replaceable>[JDKpath]</replaceable>/bin</filename>
is listed before <filename class='directory'>/usr/bin</filename> in your
<envar>PATH</envar> variable.</para></note>
<para>Install <application><acronym>GCC</acronym></application> by running the
following commands:</para>
<screen><userinput><command>patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes-1.patch &amp;&amp;
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in &amp;&amp;
mkdir ../gcc-build &amp;&amp;
cd ../gcc-build &amp;&amp;
../gcc-&gcc-version;/configure --prefix=/usr --libexecdir=/usr/lib \
--enable-shared --enable-languages=c,c++,objc,f77,java \
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu &amp;&amp;
make bootstrap &amp;&amp;
make -k check &amp;&amp;
../gcc-3.4.1/contrib/test_summary &amp;&amp;
make install &amp;&amp;
ln -sf ../usr/bin/cpp /lib &amp;&amp;
ln -sf gcc /usr/bin/cc &amp;&amp;
ln -sf g77 /usr/bin/f77 &amp;&amp;
chown -R root:root /usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/include</command></userinput></screen>
</sect2>
<sect2>
<title>Command explanations</title>
<para><command>PATH_HOLD=$PATH</command>: This command
<!-- <para><command>PATH_HOLD=$PATH</command>: This command
stores your current path before it's modified so that it can be restored after
installation.</para>
<para><command>export PATH=/opt/gnat/bin:$PATH</command>: This
command allows the build to find
<application><acronym>GNAT</acronym></application>'s
<application>Ada</application> compiler to build
<application>Ada</application>.</para>
<para><command>touch treeprs.ads [es]info.h nmake.ad[bs]</command>:
This command creates necessary files for the
<application>Ada</application> build. This step
may be skipped if you don't want to compile the
<application>Ada</application> front end.</para>
<para><parameter>CC=/usr/bin/gcc</parameter>: This command works around the
new <envar>PATH</envar> which puts <application><acronym>GNAT</acronym>
</application>'s <command>gcc</command> as the primary compiler.</para>
<para><parameter>--enable-languages=c,c++,objc,f77,ada,java</parameter>: This command builds all available languages in the
<application><acronym>GCC</acronym></application> package.
You may modify this command to remove unwanted languages.</para>
</application>'s <command>gcc</command> as the primary compiler.</para> -->
<para><command>sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in</command>:
This command suppresses the installation of
<filename class='libraryfile'>libiberty.a</filename> as the version provided
by <application>Binutils</application> is used instead.</para>
<para><command>mkdir ../gcc-build; cd ../gcc-build</command>: The
<application><acronym>GCC</acronym></application> documentation recommends
building the package in a dedicated build directory.</para>
<para><parameter>--enable-languages=c,c++,objc,f77,ada,java</parameter>:
This command identifies which languages to build. You may modify this command
to remove unwanted languages.</para>
<para><parameter>--enable-shared --enable-threads=posix
--enable-__cxa_atexit</parameter>: These commands are required to build
the <application>C++</application> libraries to published standards.</para>
<para><parameter>--enable-clocale=gnu</parameter>: This command is a
failsafe for incomplete locale data.</para>
<para><command>make gnatlib_and tools</command>: This command
<para><command>make -k check</command>: This command runs the test suite
without stopping should any errors be encountered.</para>
<para><command>../gcc-3.4.1/contrib/test_summary</command>: This command will
produce a summary of the test suite results. You can append
<command>| grep -A7 Summ</command> to the command to produce an even more
condensed version of the summary. You may also wish to redirect the output to
a file for review and comparison later on.</para>
<para><command>ln -sf ../usr/bin/cpp /lib</command>: This command creates a
link to the C PreProcessor as some packages expect it to be installed in the
<filename class='directory'>/lib</filename> directory.</para>
<para><command>ln -sf gcc /usr/bin/cc; ln -sf g77 /usr/bin/f77</command>:
These links are created as some packages refer to the C and Fortran compilers
using an alternate name.</para>
<!-- <para><command>make gnatlib_and tools</command>: This command
completes the <application>Ada</application> build process. Skip this step if
you have not enabled <application>Ada</application> as one of the languages.
</para>
</para> -->
</sect2>
<sect2>
<title>Contents</title>
<para>The <application><acronym>GCC</acronym></application> package contains
<command>c++</command>,
<command>c++filt</command>, <command>cpp</command>,
<command>g++</command>, <command>g77</command>,
<command>gcc</command>, <command>gccbug</command>,
<command>gcov</command>, <command>glob</command>,
<command>gnat</command>, <command>gnatbind</command>,
<para>The <application><acronym>GCC</acronym></application> package contains
<command>addr2name.awk</command>, <command>c++</command>,
<command>cpp</command>, <command>g++</command>,
<command>g77</command>, <command>gcc</command>,
<command>gccbug</command>, <command>gcj</command>,
<command>gcjh</command>, <command>gcov</command>,
<command>gij</command>, <command>grepjar</command>,
<command>jar</command>, <command>jcf-dump</command>,
<command>jv-convert</command>, <command>jv-scan</command>,
<command>rmic</command>, <command>rmiregistry</command> and
<!-- <command>gnat</command>, <command>gnatbind</command>,
<command>gnatbl</command>, <command>gnatchop</command>,
<command>gnatfind</command>, <command>gnatkr</command>,
<command>gnatlink</command>, <command>gnatls</command>,
<command>gnatmake</command>, <command>gnatprep</command>,
<command>gnatpsta</command>, <command>gnatpsys</command>,
<command>gnatxref</command> and
<command>gnatxref</command> and -->
<application><acronym>GCC</acronym></application> libraries.</para>
</sect2>
<sect2><title>Description</title>
<para>The programs and libraries whose descriptions are missing here
have been described in the <acronym>LFS</acronym>
<acronym>GCC</acronym>-&gcc-version; page.</para>
<sect3><title>addr2name.awk</title>
<para><command>addr2name.awk</command> emulates a little of the functionality
of addr2line.</para></sect3>
<sect3><title>g77</title>
<para><command>g77</command> is the <application>Fortran</application> compiler
<para><command>g77</command> is the <application>Fortran</application> compiler
invoked by <command>gcc</command>.</para></sect3>
<sect3><title>add2line</title>
<para><command>add2line</command> converts the <acronym>ASCII</acronym> form of
the 2-line orbital elements in a file to binary form and appends them to the
orbdata files. </para></sect3>
<sect3><title>gcov</title>
<para><command>gcov</command> is a test coverage program.</para></sect3>
<sect3><title>gdb</title>
<sect3><title>gcj</title>
<para><command>gcj</command> is an ahead-of-time compiler for the
<application>Java</application> language.</para></sect3>
<sect3><title>gcjh</title>
<para><command>gcjh</command> generates header files from
<application>Java</application> class files.</para></sect3>
<sect3><title>gij</title>
<para><command>gij</command> is the <acronym>GNU</acronym> interpreter for
<application>Java</application> bytecode.</para></sect3>
<sect3><title>grepjar</title>
<para><command>grepjar</command> searches <filename>jar</filename> files for a
pattern.</para></sect3>
<sect3><title>jar</title>
<para><command>jar</command> is an archive tool for
<application>Java</application> archives.</para></sect3>
<sect3><title>jcf-dump</title>
<para><command>jcf-dump</command> prints information about
<application>Java</application> class files.</para></sect3>
<sect3><title>jv-convert</title>
<para><command>jv-convert</command> converts files from one encoding to
another.</para></sect3>
<sect3><title>jv-scan</title>
<para><command>jv-scan</command> prints information about
<application>Java</application> source files.</para></sect3>
<sect3><title>rmic</title>
<para><command>rmic</command> generates stubs for Remote Method
Invocation.</para></sect3>
<sect3><title>rmiregistry</title>
<para><command>rmiregistry</command> starts a remote object registry on the
current host.</para></sect3>
<!-- <sect3><title>gdb</title>
<para><command>gdb</command> is the
<application><acronym>GNAT</acronym></application> debugger.</para></sect3>
<sect3><title>gnatbind</title>
<para><command>gnatbind</command> is used to bind compiled objects.</para>
</sect3>
<sect3><title>gnatbl</title>
<para><command>gnatbl</command> is the <application>Ada</application> linker.
</para></sect3>
<sect3><title>gnatchop</title>
<para><command>gnatchop</command> is useful for renaming files to meet the
standard <application>Ada</application> default file naming conventions.</para></sect3>
<sect3><title>gnatelim</title>
<para><command>gnatelim</command> is used to detect and eliminate unused
subprograms in an <application>Ada</application> partition.</para></sect3>
<sect3><title>gnatfind</title>
<para><command>gnatfind</command> is the <application><acronym>GNAT</acronym>
</application> definition/use finder.</para></sect3>
<sect3><title>gnatgcc</title>
<para><command>gnatgcc</command> is the compiler.</para></sect3>
<sect3><title>gnathtml.pl</title>
<para><command>gnathtml.pl</command> converts
<application>Ada</application> source files to <acronym>HTML</acronym> for
viewing in Web browsers.</para></sect3>
<sect3><title>gnatkr</title>
<para><command>gnatkr</command> is used to determine the crunched name for a
given file, when crunched to a specified maximum length.</para></sect3>
<sect3><title>gnatlink</title>
<para><command>gnatlink</command> is used to link programs and build an
executable file.</para></sect3>
<sect3><title>gnatls</title>
<para><command>gnatls</command> is the compiled unit browser.</para></sect3>
<sect3><title>gnatemake</title>
<para><command>gnatmake</command> is an automatic make facility.</para></sect3>
<para><command>gnatmake</command> is an automatic make facility.</para></sect3>
<sect3><title>gnatmem</title>
<para><command>gnatmem</command> is the <application><acronym>GNAT</acronym>
</application> utility that monitors dynamic allocation and
deallocation activity in a program.</para></sect3>
<sect3><title>gnatprep</title>
<para><command>gnatprep</command> is the
<application><acronym>GNAT</acronym></application> external preprocessor.</para>
</sect3>
<sect3><title>gnatpsta</title>
<para><command>gnatpsta</command> determines the values of all the relevant
parameters in Standard and outputs to stdout.</para></sect3>
<sect3><title>gnatpsys</title>
<para><command>gnatpsys</command> determines the values of all the relevant
parameters in System and outputs to stdout.</para></sect3>
<sect3><title>gnatstub</title>
<para><command>gnatstub</command> is a generator of body stubs.</para></sect3>
<sect3><title>gnatxref</title>
<para><command>gnatxref</command> is the <application><acronym>GNAT</acronym></application> cross-referencer.</para></sect3>
<sect3><title>gvd</title>
<para><command>gvd</command> is the <acronym>GNU</acronym> Visual Debugger.
</para></sect3>
<para><command>gnatxref</command> is the <application><acronym>GNAT</acronym></application> cross-referencer.</para></sect3> -->
</sect2>
</sect1>

View File

@ -22,6 +22,9 @@ who wrote what.</para>
<itemizedlist>
<listitem><para>August 29th, 2004 [randy]: Updated to
GCC-3.4.1.</para></listitem>
<listitem><para>August 28th, 2004 [randy]: Removed kernel_2.6 patch from
cdrtools; removed build_fix patch from iptables.</para></listitem>