source: general/prog/gcc.xml@ 754181c

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 754181c was 754181c, checked in by Randy McMurchy <randy@…>, 20 years ago

Removed obsolete GCC patch from repository

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

  • Property mode set to 100644
File size: 17.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.2 GB">
11 <!ENTITY gcc-time "36.2 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.2 MB">
16 <!ENTITY gnat-buildsize "48.9 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
32contains <acronym>GNU</acronym> compilers. This is useful for
33<!-- compiling programs written in <application>Ada</application>, -->
34compiling programs written in
35<application>C</application>, <application>C++</application>,
36<application>Fortran</application>, <application>Java</application> and
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>
44<itemizedlist spacing='compact'>
45<listitem><para>Download (HTTP): <ulink
46url="&gcc-download-http;"/></para></listitem>
47<listitem><para>Download (FTP): <ulink
48url="&gcc-download-ftp;"/></para></listitem>
49<listitem><para>Download size: &gcc-size;</para></listitem>
50<listitem><para>Estimated Disk space required:
51&gcc-buildsize;</para></listitem>
52<listitem><para>Estimated build time:
53&gcc-time;</para></listitem></itemizedlist>
54</sect3>
55
56<sect3><title>Additional Downloads</title>
57<itemizedlist spacing='compact'>
58<listitem><para>Required Patch: <ulink
59url="&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>
63</itemizedlist></sect3>
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
74</sect2>
75
76<sect2>
77<title>Installation of <application><acronym>GCC</acronym></application></title>
78
79<!-- <para>If you plan to compile Ada, you will need to install
80<application><acronym>GNAT</acronym></application> temporarily to
81satisfy the circular dependency when you recompile
82<application><acronym>GCC</acronym></application> to include
83<application>Ada</application>.</para>
84
85<sect3><title>Package information</title>
86<itemizedlist spacing='compact'>
87<listitem><para>Download (HTTP): <ulink
88url="&gnat-download-http;"/></para></listitem>
89<listitem><para>Download (FTP): <ulink
90url="&gnat-download-ftp;"/></para></listitem>
91<listitem><para>Download size: &gnat-size;</para></listitem>
92<listitem><para>Estimated Disk space required:
93&gnat-buildsize;</para></listitem>
94<listitem><para>Estimated build time:
95&gnat-time;</para></listitem></itemizedlist>
96</sect3>
97
98<sect3><title><application><acronym>GNAT</acronym></application>
99dependencies</title>
100<sect4><title>Required</title>
101<para><xref linkend="tcsh"/></para></sect4>
102</sect3>
103
104</sect2>
105
106<sect2>
107<title>Installation of <application><acronym>GNAT</acronym></application>
108</title>
109
110<para>Install <application><acronym>GNAT</acronym></application> by running the
111following commands:</para>
112
113<screen><userinput><command>./doconfig</command></userinput></screen>
114
115<para>The above script will ask you how and where you would like to install
116<application><acronym>GNAT</acronym></application>. To avoid conflicts with the
117system <command>gcc</command>, the package will be installed in a separate
118directory, that can later be removed from the system.</para>
119
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>
123
124<para>To finish the install, run:</para>
125<screen><userinput><command>./doinstall</command></userinput></screen>
126
127<para>The <application><acronym>GNAT</acronym></application> compiler can be
128invoked by executing the <command>gcc</command> binary installed by the above
129script.</para>
130
131</sect2>
132
133<sect2><title>Return to Installation of
134<application><acronym>GCC</acronym></application></title>
135
136<screen><userinput><command>patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes-1.patch &amp;&amp;
137sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in &amp;&amp;
138PATH_HOLD=$PATH &amp;&amp;
139export PATH=/opt/gnat/bin:$PATH &amp;&amp;
140cd gcc/ada &amp;&amp;
141touch treeprs.ads [es]info.h nmake.ad[bs] &amp;&amp;
142cd ../.. &amp;&amp;
143mkdir ../gcc-build &amp;&amp;
144cd ../gcc-build &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;
149make bootstrap &amp;&amp;
150make -C gcc gnatlib_and_tools &amp;&amp;
151make -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;
154make install &amp;&amp;
155ln -sf ../usr/bin/cpp /lib &amp;&amp;
156ln -sf gcc /usr/bin/cc &amp;&amp;
157ln -sf g77 /usr/bin/f77 &amp;&amp;
158chown -R root:root /usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/include &amp;&amp;
159export PATH=$PATH_HOLD</command></userinput></screen>
160
161<para>You may remove the <application><acronym>GNAT</acronym></application>
162installation:</para>
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
212</sect2>
213
214<sect2>
215<title>Command explanations</title>
216
217<!-- <para><command>PATH_HOLD=$PATH</command>: This command
218stores your current path before it's modified so that it can be restored after
219installation.</para>
220
221<para><command>export PATH=/opt/gnat/bin:$PATH</command>: This
222command allows the build to find
223<application><acronym>GNAT</acronym></application>'s
224<application>Ada</application> compiler to build
225<application>Ada</application>.</para>
226
227<para><command>touch treeprs.ads [es]info.h nmake.ad[bs]</command>:
228This command creates necessary files for the
229<application>Ada</application> build. This step
230may be skipped if you don't want to compile the
231<application>Ada</application> front end.</para>
232
233<para><parameter>CC=/usr/bin/gcc</parameter>: This command works around the
234new <envar>PATH</envar> which puts <application><acronym>GNAT</acronym>
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
250<para><parameter>--enable-shared --enable-threads=posix
251--enable-__cxa_atexit</parameter>: These commands are required to build
252the <application>C++</application> libraries to published standards.</para>
253
254<para><parameter>--enable-clocale=gnu</parameter>: This command is a
255failsafe for incomplete locale data.</para>
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>chown -R root:root /usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/include</command>:
275If the package is built by a user other than root, the ownership of the
276installed <filename class='directory'>include</filename> directory (and its
277contents) will be incorrect. This command changes the ownership to
278root:root.</para>
279
280<!-- <para><command>make gnatlib_and tools</command>: This command
281completes the <application>Ada</application> build process. Skip this step if
282you have not enabled <application>Ada</application> as one of the languages.
283</para> -->
284
285</sect2>
286
287<sect2>
288<title>Contents</title>
289
290<para>The <application><acronym>GCC</acronym></application> package contains
291<command>addr2name.awk</command>, <command>c++</command>,
292<command>cpp</command>, <command>g++</command>,
293<command>g77</command>, <command>gcc</command>,
294<command>gccbug</command>, <command>gcj</command>,
295<command>gcjh</command>, <command>gcov</command>,
296<command>gij</command>, <command>grepjar</command>,
297<command>jar</command>, <command>jcf-dump</command>,
298<command>jv-convert</command>, <command>jv-scan</command>,
299<command>rmic</command>, <command>rmiregistry</command> and
300<!-- <command>gnat</command>, <command>gnatbind</command>,
301<command>gnatbl</command>, <command>gnatchop</command>,
302<command>gnatfind</command>, <command>gnatkr</command>,
303<command>gnatlink</command>, <command>gnatls</command>,
304<command>gnatmake</command>, <command>gnatprep</command>,
305<command>gnatpsta</command>, <command>gnatpsys</command>,
306<command>gnatxref</command> and -->
307<application><acronym>GCC</acronym></application> libraries.</para>
308
309</sect2>
310
311<sect2><title>Description</title>
312
313<para>The programs and libraries whose descriptions are missing here
314have been described in the <acronym>LFS</acronym>
315<acronym>GCC</acronym>-&gcc-version; page.</para>
316
317<sect3><title>addr2name.awk</title>
318<para><command>addr2name.awk</command> emulates a little of the functionality
319of addr2line.</para></sect3>
320
321<sect3><title>g77</title>
322<para><command>g77</command> is the <application>Fortran</application> compiler
323invoked by <command>gcc</command>.</para></sect3>
324
325<sect3><title>gcj</title>
326<para><command>gcj</command> is an ahead-of-time compiler for the
327<application>Java</application> language.</para></sect3>
328
329<sect3><title>gcjh</title>
330<para><command>gcjh</command> generates header files from
331<application>Java</application> class files.</para></sect3>
332
333<sect3><title>gij</title>
334<para><command>gij</command> is the <acronym>GNU</acronym> interpreter for
335<application>Java</application> bytecode.</para></sect3>
336
337<sect3><title>grepjar</title>
338<para><command>grepjar</command> searches <filename>jar</filename> files for a
339pattern.</para></sect3>
340
341<sect3><title>jar</title>
342<para><command>jar</command> is an archive tool for
343<application>Java</application> archives.</para></sect3>
344
345<sect3><title>jcf-dump</title>
346<para><command>jcf-dump</command> prints information about
347<application>Java</application> class files.</para></sect3>
348
349<sect3><title>jv-convert</title>
350<para><command>jv-convert</command> converts files from one encoding to
351another.</para></sect3>
352
353<sect3><title>jv-scan</title>
354<para><command>jv-scan</command> prints information about
355<application>Java</application> source files.</para></sect3>
356
357<sect3><title>rmic</title>
358<para><command>rmic</command> generates stubs for Remote Method
359Invocation.</para></sect3>
360
361<sect3><title>rmiregistry</title>
362<para><command>rmiregistry</command> starts a remote object registry on the
363current host.</para></sect3>
364
365<!-- <sect3><title>gdb</title>
366<para><command>gdb</command> is the
367<application><acronym>GNAT</acronym></application> debugger.</para></sect3>
368
369<sect3><title>gnatbind</title>
370<para><command>gnatbind</command> is used to bind compiled objects.</para>
371</sect3>
372
373<sect3><title>gnatbl</title>
374<para><command>gnatbl</command> is the <application>Ada</application> linker.
375</para></sect3>
376
377<sect3><title>gnatchop</title>
378<para><command>gnatchop</command> is useful for renaming files to meet the
379standard <application>Ada</application> default file naming conventions.</para></sect3>
380
381<sect3><title>gnatelim</title>
382<para><command>gnatelim</command> is used to detect and eliminate unused
383subprograms in an <application>Ada</application> partition.</para></sect3>
384
385<sect3><title>gnatfind</title>
386<para><command>gnatfind</command> is the <application><acronym>GNAT</acronym>
387</application> definition/use finder.</para></sect3>
388
389<sect3><title>gnatgcc</title>
390<para><command>gnatgcc</command> is the compiler.</para></sect3>
391
392<sect3><title>gnathtml.pl</title>
393<para><command>gnathtml.pl</command> converts
394<application>Ada</application> source files to <acronym>HTML</acronym> for
395viewing in Web browsers.</para></sect3>
396
397<sect3><title>gnatkr</title>
398<para><command>gnatkr</command> is used to determine the crunched name for a
399given file, when crunched to a specified maximum length.</para></sect3>
400
401<sect3><title>gnatlink</title>
402<para><command>gnatlink</command> is used to link programs and build an
403executable file.</para></sect3>
404
405<sect3><title>gnatls</title>
406<para><command>gnatls</command> is the compiled unit browser.</para></sect3>
407
408<sect3><title>gnatemake</title>
409<para><command>gnatmake</command> is an automatic make facility.</para></sect3>
410
411<sect3><title>gnatmem</title>
412<para><command>gnatmem</command> is the <application><acronym>GNAT</acronym>
413</application> utility that monitors dynamic allocation and
414deallocation activity in a program.</para></sect3>
415
416<sect3><title>gnatprep</title>
417<para><command>gnatprep</command> is the
418<application><acronym>GNAT</acronym></application> external preprocessor.</para>
419</sect3>
420
421<sect3><title>gnatpsta</title>
422<para><command>gnatpsta</command> determines the values of all the relevant
423parameters in Standard and outputs to stdout.</para></sect3>
424
425<sect3><title>gnatpsys</title>
426<para><command>gnatpsys</command> determines the values of all the relevant
427parameters in System and outputs to stdout.</para></sect3>
428
429<sect3><title>gnatstub</title>
430<para><command>gnatstub</command> is a generator of body stubs.</para></sect3>
431
432<sect3><title>gnatxref</title>
433<para><command>gnatxref</command> is the <application><acronym>GNAT</acronym></application> cross-referencer.</para></sect3> -->
434
435</sect2>
436
437</sect1>
438
Note: See TracBrowser for help on using the repository browser.