Changeset 8ca386d for general/prog


Ignore:
Timestamp:
08/29/2004 06:19:42 AM (20 years ago)
Author:
Randy McMurchy <randy@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 6.0, 6.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
754181c
Parents:
d7b8efd2
Message:

Updated to GCC-3.4.1

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2686 af4574ff-66df-0310-9fd7-8a98e5e911e0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • general/prog/gcc.xml

    rd7b8efd2 r8ca386d  
    77  <!ENTITY gcc-download-http  "http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
    88  <!ENTITY gcc-download-ftp   "ftp://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
    9   <!ENTITY gcc-size           "23 MB">
    10   <!ENTITY gcc-buildsize      "889 MB">
    11   <!ENTITY gcc-time           "29.3 SBU">
    12  
    13   <!ENTITY gnat-download-http " ">
     9  <!ENTITY gcc-size           "27.2 MB">
     10  <!ENTITY gcc-buildsize      "1.2 GB">
     11  <!ENTITY gcc-time           "36.2 SBU">
     12
     13<!--  <!ENTITY gnat-download-http " ">
    1414  <!ENTITY gnat-download-ftp  "ftp://cs.nyu.edu/pub/gnat/3.15p/gnat-3.15p-i686-pc-redhat71-gnu-bin.tar.gz">
    1515  <!ENTITY gnat-size          "13.2 MB">
    1616  <!ENTITY gnat-buildsize     "48.9 MB">
    17   <!ENTITY gnat-time          "0.01 SBU">
     17  <!ENTITY gnat-time          "0.01 SBU"> -->
    1818]>
    1919
     
    2828<sect2>
    2929<title>Introduction to <application><acronym>GCC</acronym></application></title>
    30                                                                                
    31 <para>The  <application><acronym>GCC</acronym></application> package
     30
     31<para>The <application><acronym>GCC</acronym></application> package
    3232contains <acronym>GNU</acronym> compilers. This is useful for
    33 compiling programs written in <application>Ada</application>,
     33<!-- compiling programs written in <application>Ada</application>, -->
     34compiling programs written in
    3435<application>C</application>, <application>C++</application>,
    3536<application>Fortran</application>, <application>Java</application> and
    36 <application>Objective C</application>.</para>
    37                                                                                
    38 <sect3><title>Package information</title>
     37<application>Objective C</application>. The
     38<application><acronym>GCC</acronym></application> package also contains an
     39<application>Ada</application> compiler, however, the installation
     40documentation is flawed and all the <application>Ada</application> tools cannot
     41be built using conventional methods.</para>
     42
     43<sect3><title>Package Information</title>
    3944<itemizedlist spacing='compact'>
    4045<listitem><para>Download (HTTP): <ulink
     
    4853&gcc-time;</para></listitem></itemizedlist>
    4954</sect3>
     55
    5056<sect3><title>Additional Downloads</title>
    5157<itemizedlist spacing='compact'>
    5258<listitem><para>Required Patch: <ulink
    5359url="&patch-root;/gcc-&gcc-version;-no_fixincludes-1.patch"/></para></listitem>
     60<listitem><para>Test Suite: <ulink
     61url="http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-&gcc-version;/gcc-testsuite-&gcc-version;.tar.bz2"/></para>
     62</listitem>
    5463</itemizedlist></sect3>
    55                                                                                
     64
     65<sect3><title><application><acronym>GCC</acronym></application>
     66Dependencies</title>
     67<sect4><title>Recommended</title>
     68<itemizedlist spacing='compact'>
     69<listitem><para><xref linkend="expect"/> and
     70<ulink url="http://freshmeat.net/projects/dejagnu/">DejaGnu</ulink></para>
     71</listitem></itemizedlist>
     72</sect4></sect3>
     73
    5674</sect2>
    5775
    5876<sect2>
    5977<title>Installation of <application><acronym>GCC</acronym></application></title>
    60                                                                                
    61 <para>If you plan to compile Ada, you will need to install
     78
     79<!-- <para>If you plan to compile Ada, you will need to install
    6280<application><acronym>GNAT</acronym></application> temporarily to
    6381satisfy the circular dependency when you recompile
    64 <application><acronym>
    65 GCC</acronym></application> to include
     82<application><acronym>GCC</acronym></application> to include
    6683<application>Ada</application>.</para>
    6784
     
    7996</sect3>
    8097
    81 <sect3><title><application><acronym>GNAT</acronym></application> dependencies</title>
     98<sect3><title><application><acronym>GNAT</acronym></application>
     99dependencies</title>
    82100<sect4><title>Required</title>
    83101<para><xref linkend="tcsh"/></para></sect4>
     
    85103
    86104</sect2>
    87                                                                                
     105
    88106<sect2>
    89 <title>Installation of <application><acronym>GNAT</acronym></application></title>
     107<title>Installation of <application><acronym>GNAT</acronym></application>
     108</title>
    90109
    91110<para>Install <application><acronym>GNAT</acronym></application> by running the
     
    99118directory, that can later be removed from the system.</para>
    100119
    101 <para>In response to the questions asked by the
    102 <command>doconfig</command> script, enter
    103 <userinput>3</userinput> in response to the first question
    104 and <userinput>/opt/gnat</userinput> in response to the
    105 second question.</para>
     120<para>In response to the questions asked by the <command>doconfig</command>
     121script, enter <userinput>3</userinput> in response to the first question
     122and <userinput>/opt/gnat</userinput> in response to the second question.</para>
    106123
    107124<para>To finish the install, run:</para>
     
    114131</sect2>
    115132
    116                                                                                
    117 <sect2><title>Return to Installation of <application><acronym>GCC</acronym></application></title>
    118                                                                                
    119 <para>Patch the source files with the following command:</para>
     133<sect2><title>Return to Installation of
     134<application><acronym>GCC</acronym></application></title>
     135
    120136<screen><userinput><command>patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes-1.patch &amp;&amp;
    121 sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in</command></userinput></screen>
    122                                                                                
    123 <para>Install <application><acronym>GCC</acronym></application> by running the
    124 following commands:</para>
    125                                                                                
    126 <screen><userinput><command>PATH_HOLD=$PATH &amp;&amp;
     137sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in &amp;&amp;
     138PATH_HOLD=$PATH &amp;&amp;
    127139export PATH=/opt/gnat/bin:$PATH &amp;&amp;
    128140cd gcc/ada &amp;&amp;
     
    131143mkdir ../gcc-build &amp;&amp;
    132144cd ../gcc-build &amp;&amp;
    133 CC=/usr/bin/gcc ../gcc-&gcc-version;/configure --prefix=/usr --enable-shared \
    134     --enable-languages=c,c++,objc,f77,ada,java --enable-threads=posix \
    135     --enable-__cxa_atexit --enable-clocale=gnu &amp;&amp;
     145CC=/usr/bin/gcc ../gcc-&gcc-version;/configure -prefix=/usr -enable-shared \
     146../gcc-&gcc-version;/configure -prefix=/usr -libexecdir=/usr/lib \
     147    -enable-shared -enable-languages=c,c++,objc,f77,java \
     148    -enable-threads=posix -enable-__cxa_atexit -enable-clocale=gnu &amp;&amp;
    136149make bootstrap &amp;&amp;
    137150make -C gcc gnatlib_and_tools &amp;&amp;
    138151make -k check &amp;&amp;
     152../gcc-3.4.1/contrib/test_summary &amp;&amp;
     153../gcc-3.4.1/contrib/test_summary | grep -A7 Summ &amp;&amp;
    139154make install &amp;&amp;
    140155ln -sf ../usr/bin/cpp /lib &amp;&amp;
    141156ln -sf gcc /usr/bin/cc &amp;&amp;
    142157ln -sf g77 /usr/bin/f77 &amp;&amp;
     158chown -R root:root /usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/include &amp;&amp;
    143159export PATH=$PATH_HOLD</command></userinput></screen>
    144                                                                                
     160
    145161<para>You may remove the <application><acronym>GNAT</acronym></application>
    146162installation:</para>
    147 <screen><userinput><command>rm -rf /opt/gnat</command></userinput></screen>
    148                                                                                
     163<screen><userinput><command>rm -rf /opt/gnat</command></userinput></screen> -->
     164
     165<important><para>The installation process may overwrite your existing
     166<application><acronym>GCC</acronym></application> compiler and libraries. It
     167is strongly recommended that you install the <application>Expect</application>
     168and <application>DejaGnu</application> packages as well as unpacking the
     169<application><acronym>GCC</acronym></application> testsuite tarball before
     170beginning the build.</para>
     171
     172<para>Do not continue with the <command>make install</command> command until
     173you're confident the build was successful. You can compare your test results
     174with those found at <ulink
     175url="http://gcc.gnu.org/ml/gcc-testresults/"/>. There's also an i686 platform
     176test result produced by an <acronym>LFS</acronym> (SVN-testing-040712) system
     177at <ulink url="http://www.linuxfromscratch.org/~randy/gcc-test.txt"/>. You may
     178also want to refer to the information found in the
     179<application><acronym>GCC</acronym></application>-Pass 2 section of Chapter 5
     180in the <acronym>LFS</acronym> book.</para></important>
     181
     182<note><para>Some of the <application>Java</application> programs installed by
     183the <application><acronym>GCC</acronym></application> package conflict (have
     184the same names) with programs from the <xref linkend="j2sdk"/> package. If
     185you're installing the <application>Java</application> language from the
     186<application><acronym>GCC</acronym></application> package but you wish to
     187use the programs from the <application>JDK</application> as the defaults,
     188ensure
     189<filename class='directory'><replaceable>[JDKpath]</replaceable>/bin</filename>
     190is listed before <filename class='directory'>/usr/bin</filename> in your
     191<envar>PATH</envar> variable.</para></note>
     192
     193<para>Install <application><acronym>GCC</acronym></application> by running the
     194following commands:</para>
     195
     196<screen><userinput><command>patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes-1.patch &amp;&amp;
     197sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in &amp;&amp;
     198mkdir ../gcc-build &amp;&amp;
     199cd ../gcc-build &amp;&amp;
     200../gcc-&gcc-version;/configure --prefix=/usr --libexecdir=/usr/lib \
     201    --enable-shared --enable-languages=c,c++,objc,f77,java \
     202    --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu &amp;&amp;
     203make bootstrap &amp;&amp;
     204make -k check &amp;&amp;
     205../gcc-3.4.1/contrib/test_summary &amp;&amp;
     206make install &amp;&amp;
     207ln -sf ../usr/bin/cpp /lib &amp;&amp;
     208ln -sf gcc /usr/bin/cc &amp;&amp;
     209ln -sf g77 /usr/bin/f77 &amp;&amp;
     210chown -R root:root /usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/include</command></userinput></screen>
     211
    149212</sect2>
    150213
    151214<sect2>
    152215<title>Command explanations</title>
    153                                                                                
    154 <para><command>PATH_HOLD=$PATH</command>: This command
     216
     217<!-- <para><command>PATH_HOLD=$PATH</command>: This command
    155218stores your current path before it's modified so that it can be restored after
    156219installation.</para>
    157                                                                                
     220
    158221<para><command>export PATH=/opt/gnat/bin:$PATH</command>: This
    159222command allows the build to find
     
    161224<application>Ada</application> compiler to build
    162225<application>Ada</application>.</para>
    163                                                                                
     226
    164227<para><command>touch treeprs.ads [es]info.h nmake.ad[bs]</command>:
    165228This command creates necessary files for the
     
    167230may be skipped if you don't want to compile the
    168231<application>Ada</application> front end.</para>
    169                                                                                
     232
    170233<para><parameter>CC=/usr/bin/gcc</parameter>: This command works around the
    171234new <envar>PATH</envar> which puts <application><acronym>GNAT</acronym>
    172 </application>'s <command>gcc</command> as the primary compiler.</para>
    173                                                                                
    174 <para><parameter>--enable-languages=c,c++,objc,f77,ada,java</parameter>: This command builds all available languages in the
    175 <application><acronym>GCC</acronym></application> package.
    176 You may modify this command to remove unwanted languages.</para>
    177                                                                                
     235</application>'s <command>gcc</command> as the primary compiler.</para> -->
     236
     237<para><command>sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in</command>:
     238This command suppresses the installation of
     239<filename class='libraryfile'>libiberty.a</filename> as the version provided
     240by <application>Binutils</application> is used instead.</para>
     241
     242<para><command>mkdir ../gcc-build; cd ../gcc-build</command>: The
     243<application><acronym>GCC</acronym></application> documentation recommends
     244building the package in a dedicated build directory.</para>
     245
     246<para><parameter>--enable-languages=c,c++,objc,f77,ada,java</parameter>:
     247This command identifies which languages to build. You may modify this command
     248to remove unwanted languages.</para>
     249
    178250<para><parameter>--enable-shared --enable-threads=posix
    179251--enable-__cxa_atexit</parameter>: These commands are required to build
    180252the <application>C++</application> libraries to published standards.</para>
    181                                                                                
     253
    182254<para><parameter>--enable-clocale=gnu</parameter>: This command is a
    183255failsafe for incomplete locale data.</para>
    184                                                                                
    185 <para><command>make gnatlib_and tools</command>: This command
     256
     257<para><command>make -k check</command>: This command runs the test suite
     258without stopping should any errors be encountered.</para>
     259
     260<para><command>../gcc-3.4.1/contrib/test_summary</command>: This command will
     261produce a summary of the test suite results. You can append
     262<command>| grep -A7 Summ</command> to the command to produce an even more
     263condensed version of the summary. You may also wish to redirect the output to
     264a file for review and comparison later on.</para>
     265
     266<para><command>ln -sf ../usr/bin/cpp /lib</command>: This command creates a
     267link to the C PreProcessor as some packages expect it to be installed in the
     268<filename class='directory'>/lib</filename> directory.</para>
     269
     270<para><command>ln -sf gcc /usr/bin/cc; ln -sf g77 /usr/bin/f77</command>:
     271These links are created as some packages refer to the C and Fortran compilers
     272using an alternate name.</para>
     273
     274<!-- <para><command>make gnatlib_and tools</command>: This command
    186275completes the <application>Ada</application> build process. Skip this step if
    187276you have not enabled <application>Ada</application> as one of the languages.
    188 </para>
    189                                                                                
     277</para> -->
     278
    190279</sect2>
    191280
    192281<sect2>
    193282<title>Contents</title>
    194                                                                                
    195 <para>The <application><acronym>GCC</acronym></application> package contains
    196 <command>c++</command>,
    197 <command>c++filt</command>, <command>cpp</command>,
    198 <command>g++</command>, <command>g77</command>,
    199 <command>gcc</command>, <command>gccbug</command>,
    200 <command>gcov</command>, <command>glob</command>,
    201 <command>gnat</command>, <command>gnatbind</command>,
     283
     284<para>The <application><acronym>GCC</acronym></application> package contains
     285<command>addr2name.awk</command>, <command>c++</command>,
     286<command>cpp</command>, <command>g++</command>,
     287<command>g77</command>, <command>gcc</command>,
     288<command>gccbug</command>, <command>gcj</command>,
     289<command>gcjh</command>, <command>gcov</command>,
     290<command>gij</command>, <command>grepjar</command>,
     291<command>jar</command>, <command>jcf-dump</command>,
     292<command>jv-convert</command>, <command>jv-scan</command>,
     293<command>rmic</command>, <command>rmiregistry</command> and
     294<!-- <command>gnat</command>, <command>gnatbind</command>,
    202295<command>gnatbl</command>, <command>gnatchop</command>,
    203296<command>gnatfind</command>, <command>gnatkr</command>,
     
    205298<command>gnatmake</command>, <command>gnatprep</command>,
    206299<command>gnatpsta</command>, <command>gnatpsys</command>,
    207 <command>gnatxref</command> and
     300<command>gnatxref</command> and -->
    208301<application><acronym>GCC</acronym></application> libraries.</para>
    209                                                                                
    210 </sect2>
    211                                                                                
     302
     303</sect2>
     304
    212305<sect2><title>Description</title>
    213                                                                                
     306
    214307<para>The programs and libraries whose descriptions are missing here
    215308have been described in the <acronym>LFS</acronym>
    216309<acronym>GCC</acronym>-&gcc-version; page.</para>
    217                                                                                
     310
     311<sect3><title>addr2name.awk</title>
     312<para><command>addr2name.awk</command> emulates a little of the functionality
     313of addr2line.</para></sect3>
     314
    218315<sect3><title>g77</title>
    219 <para><command>g77</command> is the <application>Fortran</application> compiler                                                                              
     316<para><command>g77</command> is the <application>Fortran</application> compiler
    220317invoked by <command>gcc</command>.</para></sect3>
    221                                                                                
    222 <sect3><title>add2line</title>
    223 <para><command>add2line</command> converts the <acronym>ASCII</acronym> form of                                                                               
    224 the 2-line orbital elements in a file to binary form and appends them to the
    225 orbdata files. </para></sect3>
    226                                                                                
    227 <sect3><title>gcov</title>
    228 <para><command>gcov</command> is a test coverage program.</para></sect3>
    229                                                                                
    230 <sect3><title>gdb</title>
     318
     319<sect3><title>gcj</title>
     320<para><command>gcj</command> is an ahead-of-time compiler for the
     321<application>Java</application> language.</para></sect3>
     322
     323<sect3><title>gcjh</title>
     324<para><command>gcjh</command> generates header files from
     325<application>Java</application> class files.</para></sect3>
     326
     327<sect3><title>gij</title>
     328<para><command>gij</command> is the <acronym>GNU</acronym> interpreter for
     329<application>Java</application> bytecode.</para></sect3>
     330
     331<sect3><title>grepjar</title>
     332<para><command>grepjar</command> searches <filename>jar</filename> files for a
     333pattern.</para></sect3>
     334
     335<sect3><title>jar</title>
     336<para><command>jar</command> is an archive tool for
     337<application>Java</application> archives.</para></sect3>
     338
     339<sect3><title>jcf-dump</title>
     340<para><command>jcf-dump</command> prints information about
     341<application>Java</application> class files.</para></sect3>
     342
     343<sect3><title>jv-convert</title>
     344<para><command>jv-convert</command> converts files from one encoding to
     345another.</para></sect3>
     346
     347<sect3><title>jv-scan</title>
     348<para><command>jv-scan</command> prints information about
     349<application>Java</application> source files.</para></sect3>
     350
     351<sect3><title>rmic</title>
     352<para><command>rmic</command> generates stubs for Remote Method
     353Invocation.</para></sect3>
     354
     355<sect3><title>rmiregistry</title>
     356<para><command>rmiregistry</command> starts a remote object registry on the
     357current host.</para></sect3>
     358
     359<!-- <sect3><title>gdb</title>
    231360<para><command>gdb</command> is the
    232361<application><acronym>GNAT</acronym></application> debugger.</para></sect3>
    233                                                                                
     362
    234363<sect3><title>gnatbind</title>
    235364<para><command>gnatbind</command> is used to bind compiled objects.</para>
    236365</sect3>
    237                                                                                
     366
    238367<sect3><title>gnatbl</title>
    239368<para><command>gnatbl</command> is the <application>Ada</application> linker.
    240369</para></sect3>
    241                                                                                
     370
    242371<sect3><title>gnatchop</title>
    243372<para><command>gnatchop</command> is useful for renaming files to meet the
    244373standard <application>Ada</application> default file naming conventions.</para></sect3>
    245                                                                                
     374
    246375<sect3><title>gnatelim</title>
    247376<para><command>gnatelim</command> is used to detect and eliminate unused
    248377subprograms in an <application>Ada</application> partition.</para></sect3>
    249                                                                                
     378
    250379<sect3><title>gnatfind</title>
    251380<para><command>gnatfind</command> is the <application><acronym>GNAT</acronym>
    252381</application> definition/use finder.</para></sect3>
    253                                                                                
     382
    254383<sect3><title>gnatgcc</title>
    255384<para><command>gnatgcc</command> is the compiler.</para></sect3>
    256                                                                                
     385
    257386<sect3><title>gnathtml.pl</title>
    258387<para><command>gnathtml.pl</command> converts
    259388<application>Ada</application> source files to <acronym>HTML</acronym> for
    260389viewing in Web browsers.</para></sect3>
    261                                                                                
     390
    262391<sect3><title>gnatkr</title>
    263392<para><command>gnatkr</command> is used to determine the crunched name for a
    264393given file, when crunched to a specified maximum length.</para></sect3>
    265                                                                                
     394
    266395<sect3><title>gnatlink</title>
    267396<para><command>gnatlink</command> is used to link programs and build an
    268397executable file.</para></sect3>
    269                                                                                
     398
    270399<sect3><title>gnatls</title>
    271400<para><command>gnatls</command> is the compiled unit browser.</para></sect3>
    272                                                                                
     401
    273402<sect3><title>gnatemake</title>
    274 <para><command>gnatmake</command> is an automatic make facility.</para></sect3>                                                                               
     403<para><command>gnatmake</command> is an automatic make facility.</para></sect3>
     404
    275405<sect3><title>gnatmem</title>
    276406<para><command>gnatmem</command> is the <application><acronym>GNAT</acronym>
    277407</application> utility that monitors dynamic allocation and
    278408deallocation activity in a program.</para></sect3>
    279                                                                                
     409
    280410<sect3><title>gnatprep</title>
    281411<para><command>gnatprep</command> is the
    282412<application><acronym>GNAT</acronym></application> external preprocessor.</para>
    283413</sect3>
    284                                                                                
     414
    285415<sect3><title>gnatpsta</title>
    286416<para><command>gnatpsta</command> determines the values of all the relevant
    287417parameters in Standard and outputs to stdout.</para></sect3>
    288                                                                                
     418
    289419<sect3><title>gnatpsys</title>
    290420<para><command>gnatpsys</command> determines the values of all the relevant
     
    293423<sect3><title>gnatstub</title>
    294424<para><command>gnatstub</command> is a generator of body stubs.</para></sect3>
    295                                                                                
     425
    296426<sect3><title>gnatxref</title>
    297 <para><command>gnatxref</command> is the <application><acronym>GNAT</acronym></application> cross-referencer.</para></sect3>
    298                                                                                
    299 <sect3><title>gvd</title>
    300 <para><command>gvd</command> is the <acronym>GNU</acronym> Visual Debugger.
    301 </para></sect3>
    302                                                                                
     427<para><command>gnatxref</command> is the <application><acronym>GNAT</acronym></application> cross-referencer.</para></sect3> -->
     428
    303429</sect2>
    304430
Note: See TracChangeset for help on using the changeset viewer.