source: general/prog/gcc.xml@ 0b5a693

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
Last change on this file since 0b5a693 was 0b5a693, checked in by Randy McMurchy <randy@…>, 19 years ago

Final round of renaming the package-name entities

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

  • Property mode set to 100644
File size: 15.9 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY gcc-download-http "http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
8 <!ENTITY gcc-download-ftp "ftp://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
9 <!ENTITY gcc-size "27.2 MB">
10 <!ENTITY gcc-buildsize "1.53 GB">
11 <!ENTITY gcc-time "48.94 SBU">
12
13 <!ENTITY gnat-download-http " ">
14 <!ENTITY gnat-download-ftp "ftp://cs.nyu.edu/pub/gnat/3.15p/gnat-3.15p-i686-pc-redhat71-gnu-bin.tar.gz">
15 <!ENTITY gnat-size "13.5 MB">
16 <!ENTITY gnat-buildsize "48 MB">
17 <!ENTITY gnat-time "0.01 SBU">
18]>
19
20<sect1 id="gcc" xreflabel="GCC-&gcc-version;">
21<sect1info>
22<othername>$LastChangedBy$</othername>
23<date>$Date$</date>
24</sect1info>
25<?dbhtml filename="gcc.html" ?>
26<title>GCC-&gcc-version;</title>
27
28<sect2>
29<title>Introduction to <application><acronym>GCC</acronym></application></title>
30
31<para>The <application><acronym>GCC</acronym></application> package contains
32<acronym>GNU</acronym> compilers. This is useful for compiling programs
33written in <application>C</application>, <application>C++</application>,
34<application>Fortran</application>, <application>Java</application>,
35<application>Objective C</application> and
36<application>Ada</application>.</para>
37
38<sect3><title>Package Information</title>
39<itemizedlist spacing='compact'>
40<listitem><para>Download (HTTP): <ulink
41url="&gcc-download-http;"/></para></listitem>
42<listitem><para>Download (FTP): <ulink
43url="&gcc-download-ftp;"/></para></listitem>
44<listitem><para>Download size: &gcc-size;</para></listitem>
45<listitem><para>Estimated disk space required:
46&gcc-buildsize;</para></listitem>
47<listitem><para>Estimated build time:
48&gcc-time;</para></listitem></itemizedlist>
49</sect3>
50
51<sect3><title>Additional Downloads</title>
52<itemizedlist spacing='compact'>
53<listitem><para>Required Patch: <ulink
54url="&patch-root;/gcc-&gcc-version;-no_fixincludes-1.patch"/></para></listitem>
55<listitem><para>Required Patch: <ulink
56url="&patch-root;/gcc-&gcc-version;-linkonce-1.patch"/></para></listitem>
57<listitem><para>Test Suite: <ulink
58url="http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-&gcc-version;/gcc-testsuite-&gcc-version;.tar.bz2"/></para>
59</listitem>
60</itemizedlist></sect3>
61
62<sect3><title><application><acronym>GCC</acronym></application>
63Dependencies</title>
64<sect4><title>Recommended</title>
65<itemizedlist spacing='compact'>
66<listitem><para><xref linkend="dejagnu"/></para></listitem>
67</itemizedlist>
68</sect4></sect3>
69
70</sect2>
71
72<sect2>
73<title>Installation of <application><acronym>GCC</acronym></application></title>
74
75<para>If you plan to compile Ada, you will need to install
76<application><acronym>GNAT</acronym></application> temporarily to
77satisfy the circular dependency when you recompile
78<application><acronym>GCC</acronym></application> to include
79<application>Ada</application>.</para>
80
81<sect3><title>Package information</title>
82<itemizedlist spacing='compact'>
83<listitem><para>Download (HTTP): <ulink
84url="&gnat-download-http;"/></para></listitem>
85<listitem><para>Download (FTP): <ulink
86url="&gnat-download-ftp;"/></para></listitem>
87<listitem><para>Download size: &gnat-size;</para></listitem>
88<listitem><para>Estimated disk space required:
89&gnat-buildsize;</para></listitem>
90<listitem><para>Estimated build time:
91&gnat-time;</para></listitem></itemizedlist>
92</sect3>
93
94<sect3><title><application><acronym>GNAT</acronym></application>
95dependencies</title>
96<sect4><title>Required</title>
97<para><xref linkend="tcsh"/></para></sect4>
98</sect3>
99
100</sect2>
101
102<sect2>
103<title>Installation of <application><acronym>GNAT</acronym></application>
104</title>
105
106<para>Install <application><acronym>GNAT</acronym></application> by running the
107following commands:</para>
108
109<screen><userinput><command>./doconfig</command></userinput></screen>
110
111<para>The above script will ask you how and where you would like to install
112<application><acronym>GNAT</acronym></application>. To avoid conflicts with the
113system <command>gcc</command>, the package will be installed in a separate
114directory, that can later be removed from the system.</para>
115
116<para>In response to the questions asked by the <command>doconfig</command>
117script, enter <userinput>3</userinput> in response to the first question
118and <userinput>/opt/gnat</userinput> in response to the second question.</para>
119
120<para>To finish the install, run:</para>
121<screen><userinput><command>./doinstall</command></userinput></screen>
122
123<para>The <application><acronym>GNAT</acronym></application> compiler can be
124invoked by executing the <command>gcc</command> binary installed by the above
125script.</para>
126
127<para>Prepare to compile <application>GCC</application> by placing the
128<application>GNAT</application> <command>gcc</command> at the beginning of
129the <envar>PATH</envar> variable by using the following commands:</para>
130
131<screen><userinput><command>PATH_HOLD=$PATH &amp;&amp;
132export PATH=/opt/gnat/bin:$PATH</command></userinput></screen>
133
134</sect2>
135
136<sect2><title>Return to Installation of
137<application><acronym>GCC</acronym></application></title>
138
139<para>Install <application><acronym>GCC</acronym></application> by running the
140following commands:</para>
141
142<important><para>The installation process may overwrite your existing
143<application><acronym>GCC</acronym></application> compiler and libraries. It
144is highly recommended that you have the <application>Tcl</application>,
145<application>Expect</application> and <application>DejaGnu</application>
146packages installed, as well as unpacking the
147<application><acronym>GCC</acronym></application> testsuite tarball before
148beginning the build.</para>
149
150<para>Do not continue with the <command>make install</command> command until
151you're confident the build was successful. You can compare your test results
152with those found at <ulink
153url="http://gcc.gnu.org/ml/gcc-testresults/"/>. There's also an i686 platform
154test result produced by an <acronym>LFS</acronym> (6.0-testing-20041003) system
155at <ulink url="http://www.linuxfromscratch.org/~randy/gcc341_test.txt"/>. You
156may also want to refer to the information found in the
157<application><acronym>GCC</acronym></application>-Pass 2 section of Chapter 5
158in the <acronym>LFS</acronym> book.</para></important>
159
160<note><para>Some of the <application>Java</application> programs installed by
161the <application><acronym>GCC</acronym></application> package conflict (have
162the same names) with programs from the <xref linkend="j2sdk"/> package. If
163you're installing the <application>Java</application> language from the
164<application><acronym>GCC</acronym></application> package but you wish to
165use the programs from the <application>JDK</application> as the defaults,
166ensure
167<filename class='directory'><replaceable>[JDKpath]</replaceable>/bin</filename>
168is listed before <filename class='directory'>/usr/bin</filename> in your
169<envar>PATH</envar> variable.</para></note>
170
171<screen><userinput><command>patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes-1.patch &amp;&amp;
172patch -Np1 -i ../gcc-&gcc-version;-linkonce-1.patch &amp;&amp;
173sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in &amp;&amp;
174mkdir ../gcc-build &amp;&amp;
175cd ../gcc-build &amp;&amp;
176../gcc-&gcc-version;/configure --prefix=/usr --libexecdir=/usr/lib \
177 --enable-shared --enable-languages=c,c++,objc,f77,ada,java \
178 --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu &amp;&amp;
179make bootstrap &amp;&amp;
180make -C gcc gnatlib-shared &amp;&amp;
181make -C gcc gnattools &amp;&amp;
182make -k check &amp;&amp;
183../gcc-3.4.1/contrib/test_summary &amp;&amp;
184make install &amp;&amp;
185ln -sf ../usr/bin/cpp /lib &amp;&amp;
186ln -sf gcc /usr/bin/cc &amp;&amp;
187ln -sf g77 /usr/bin/f77 &amp;&amp;
188chown -R root:root /usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/include</command></userinput></screen>
189
190<para>You may remove the <application><acronym>GNAT</acronym></application>
191installation and restore your old <envar>PATH</envar>:</para>
192
193<screen><userinput><command>rm -rf /opt/gnat &amp;&amp;
194export PATH=$PATH_HOLD</command></userinput></screen>
195
196</sect2>
197
198<sect2>
199<title>Command explanations</title>
200
201<para><command>sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in</command>:
202This command suppresses the installation of
203<filename class='libraryfile'>libiberty.a</filename> as the version provided
204by <application>Binutils</application> is used instead.</para>
205
206<para><command>mkdir ../gcc-build; cd ../gcc-build</command>: The
207<application><acronym>GCC</acronym></application> documentation recommends
208building the package in a dedicated build directory.</para>
209
210<para><parameter>--enable-languages=c,c++,objc,f77,ada,java</parameter>:
211This command identifies which languages to build. You may modify this command
212to remove undesired languages.</para>
213
214<para><parameter>--enable-shared --enable-threads=posix
215--enable-__cxa_atexit</parameter>: These commands are required to build
216the <application>C++</application> libraries to published standards.</para>
217
218<para><parameter>--enable-clocale=gnu</parameter>: This command is a
219failsafe for incomplete locale data.</para>
220
221<para><command>make -C gcc gnatlib-shared</command>: This command builds the
222Ada shared and static libraries. Skip this step if you have not enabled
223<application>Ada</application> as one of the languages.</para>
224
225<para><command>make -C gcc gnattools</command>: This command builds the
226Ada development tools and binaries. Skip this step if you have not enabled
227<application>Ada</application> as one of the languages.</para>
228
229<para><command>make -k check</command>: This command runs the test suite
230without stopping should any errors be encountered.</para>
231
232<para><command>../gcc-3.4.1/contrib/test_summary</command>: This command will
233produce a summary of the test suite results. You can append
234<command>| grep -A7 Summ</command> to the command to produce an even more
235condensed version of the summary. You may also wish to redirect the output to
236a file for review and comparison later on.</para>
237
238<para><command>ln -sf ../usr/bin/cpp /lib</command>: This command creates a
239link to the C PreProcessor as some packages expect it to be installed in the
240<filename class='directory'>/lib</filename> directory.</para>
241
242<para><command>ln -sf gcc /usr/bin/cc; ln -sf g77 /usr/bin/f77</command>:
243These links are created as some packages refer to the C and Fortran compilers
244using an alternate name.</para>
245
246<para><command>chown -R root:root /usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/include</command>:
247If the package is built by a user other than root, the ownership of the
248installed <filename class='directory'>include</filename> directory (and its
249contents) will be incorrect. This command changes the ownership to
250root:root.</para>
251
252</sect2>
253
254<sect2>
255<title>Contents</title>
256
257<para>The <application><acronym>GCC</acronym></application> package contains
258<command>addr2name.awk</command>,
259<command>c++</command>,
260<command>cpp</command>,
261<command>g++</command>,
262<command>g77</command>,
263<command>gcc</command>,
264<command>gccbug</command>,
265<command>gcj</command>,
266<command>gcjh</command>,
267<command>gcov</command>,
268<command>gij</command>,
269<command>gnat</command>,
270<command>gnatbind</command>,
271<command>gnatbl</command>,
272<command>gnatchop</command>,
273<command>gnatclean</command>,
274<command>gnatfind</command>,
275<command>gnatkr</command>,
276<command>gnatlink</command>,
277<command>gnatls</command>,
278<command>gnatmake</command>,
279<command>gnatname</command>,
280<command>gnatprep</command>,
281<command>gnatxref</command>,
282<command>grepjar</command>,
283<command>jar</command>,
284<command>jcf-dump</command>,
285<command>jv-convert</command>,
286<command>jv-scan</command>,
287<command>rmic</command>,
288<command>rmiregistry</command> and
289<application><acronym>GCC</acronym></application> libraries.</para>
290
291</sect2>
292
293<sect2><title>Description</title>
294
295<para>The programs and libraries whose descriptions are missing here
296have been described in the <acronym>LFS</acronym>
297<acronym>GCC</acronym>-&gcc-version; page.</para>
298
299<sect3><title>addr2name.awk</title>
300<para><command>addr2name.awk</command> emulates some of the functionality
301of addr2line.</para></sect3>
302
303<sect3><title>g77</title>
304<para><command>g77</command> is the <application>Fortran</application> compiler
305invoked by <command>gcc</command>.</para></sect3>
306
307<sect3><title>gcj</title>
308<para><command>gcj</command> is an ahead-of-time compiler for the
309<application>Java</application> language.</para></sect3>
310
311<sect3><title>gcjh</title>
312<para><command>gcjh</command> generates header files from
313<application>Java</application> class files.</para></sect3>
314
315<sect3><title>gij</title>
316<para><command>gij</command> is the <acronym>GNU</acronym> interpreter for
317<application>Java</application> bytecode.</para></sect3>
318
319<sect3><title>gnat</title>
320<para><command>gnat</command> is the <application>Ada</application> compiler
321invoked by <command>gcc</command>.</para></sect3>
322
323<sect3><title>gnatbind</title>
324<para><command>gnatbind</command> is used to bind compiled
325objects.</para></sect3>
326
327<sect3><title>gnatbl</title>
328<para><command>gnatbl</command> is the <application>Ada</application>
329linker.</para></sect3>
330
331<sect3><title>gnatchop</title>
332<para><command>gnatchop</command> is useful for renaming files to meet the
333standard <application>Ada</application> default file naming
334conventions.</para></sect3>
335
336<sect3><title>gnatclean</title>
337<para><command>gnatclean</command> is used to remove files associated with a
338<application><acronym>GNAT</acronym></application> project.</para></sect3>
339
340<sect3><title>gnatfind</title>
341<para><command>gnatfind</command> is the
342<application><acronym>GNAT</acronym></application> definition/use
343finder.</para></sect3>
344
345<sect3><title>gnatkr</title>
346<para><command>gnatkr</command> is used to determine the crunched name for a
347given file, when crunched to a specified maximum length.</para></sect3>
348
349<sect3><title>gnatlink</title>
350<para><command>gnatlink</command> is used to link programs and build an
351executable file.</para></sect3>
352
353<sect3><title>gnatls</title>
354<para><command>gnatls</command> is the compiled unit browser.</para></sect3>
355
356<sect3><title>gnatmake</title>
357<para><command>gnatmake</command> is an automatic make facility.</para></sect3>
358
359<sect3><title>gnatname</title>
360<para><command>gnatname</command> will list the files associated with a
361<application><acronym>GNAT</acronym></application> project.</para></sect3>
362
363<sect3><title>gnatmem</title>
364<para><command>gnatmem</command> is the
365<application><acronym>GNAT</acronym></application> utility that monitors
366dynamic allocation and deallocation activity in a program.</para></sect3>
367
368<sect3><title>gnatprep</title>
369<para><command>gnatprep</command> is the
370<application><acronym>GNAT</acronym></application> external
371preprocessor.</para></sect3>
372
373<sect3><title>gnatxref</title>
374<para><command>gnatxref</command> is the
375<application><acronym>GNAT</acronym></application>
376cross-referencer.</para></sect3>
377
378<sect3><title>grepjar</title>
379<para><command>grepjar</command> searches <filename>jar</filename> files for a
380pattern.</para></sect3>
381
382<sect3><title>jar</title>
383<para><command>jar</command> is an archive tool for
384<application>Java</application> archives.</para></sect3>
385
386<sect3><title>jcf-dump</title>
387<para><command>jcf-dump</command> prints information about
388<application>Java</application> class files.</para></sect3>
389
390<sect3><title>jv-convert</title>
391<para><command>jv-convert</command> converts files from one encoding to
392another.</para></sect3>
393
394<sect3><title>jv-scan</title>
395<para><command>jv-scan</command> prints information about
396<application>Java</application> source files.</para></sect3>
397
398<sect3><title>rmic</title>
399<para><command>rmic</command> generates stubs for Remote Method
400Invocation.</para></sect3>
401
402<sect3><title>rmiregistry</title>
403<para><command>rmiregistry</command> starts a remote object registry on the
404current host.</para></sect3>
405
406</sect2>
407
408</sect1>
409
Note: See TracBrowser for help on using the repository browser.