source: general/prog/gcc.xml@ a0f03b0

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 a0f03b0 was a0f03b0, checked in by Archaic <archaic@…>, 20 years ago

Inserting sect1info

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

  • Property mode set to 100644
File size: 15.3 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 "23 MB">
10 <!ENTITY gcc-buildsize "889 MB">
11 <!ENTITY gcc-time "29.3 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
33compiling programs written in <application>Ada</application>,
34<application>C</application>, <application>C++</application>,
35<application>Fortran</application>, <application>Java</application> and
36<application>Objective C</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<sect3><title>Additional Downloads</title>
51<itemizedlist spacing='compact'>
52<listitem><para>Required Patch: <ulink
53url="&patch-root;/gcc-&gcc-version;-no_fixincludes-1.patch"/></para></listitem>
54</itemizedlist></sect3>
55
56</sect2>
57
58<sect2>
59<title>Installation of <application><acronym>GCC</acronym></application></title>
60
61<para>If you plan to compile Ada, you will need to install
62<application><acronym>GNAT</acronym></application> temporarily to
63satisfy the circular dependency when you recompile
64<application><acronym>
65GCC</acronym></application> to include
66<application>Ada</application>.</para>
67
68<sect3><title>Package information</title>
69<itemizedlist spacing='compact'>
70<listitem><para>Download (HTTP): <ulink
71url="&gnat-download-http;"/></para></listitem>
72<listitem><para>Download (FTP): <ulink
73url="&gnat-download-ftp;"/></para></listitem>
74<listitem><para>Download size: &gnat-size;</para></listitem>
75<listitem><para>Estimated Disk space required:
76&gnat-buildsize;</para></listitem>
77<listitem><para>Estimated build time:
78&gnat-time;</para></listitem></itemizedlist>
79</sect3>
80
81<sect3><title><application><acronym>GNAT</acronym></application> dependencies</title>
82<sect4><title>Required</title>
83<para><xref linkend="tcsh"/></para></sect4>
84</sect3>
85
86</sect2>
87
88<sect2>
89<title>Installation of <application><acronym>GNAT</acronym></application></title>
90
91<para>Install <application><acronym>GNAT</acronym></application> by running the
92following commands:</para>
93
94<screen><userinput><command>./doconfig</command></userinput></screen>
95
96<para>The above script will ask you how and where you would like to install
97<application><acronym>GNAT</acronym></application>. To avoid conflicts with the
98system <command>gcc</command>, the package will be installed in a separate
99directory, that can later be removed from the system.</para>
100
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
104and <userinput>/opt/gnat</userinput> in response to the
105second question.</para>
106
107<para>To finish the install, run:</para>
108<screen><userinput><command>./doinstall</command></userinput></screen>
109
110<para>The <application><acronym>GNAT</acronym></application> compiler can be
111invoked by executing the <command>gcc</command> binary installed by the above
112script.</para>
113
114</sect2>
115
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>
120<screen><userinput><command>patch -Np1 -i ../gcc-&gcc-version;-no_fixincludes-1.patch &amp;&amp;
121sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in</command></userinput></screen>
122
123<para>Install <application><acronym>GCC</acronym></application> by running the
124following commands:</para>
125
126<screen><userinput><command>PATH_HOLD=$PATH &amp;&amp;
127export PATH=/opt/gnat/bin:$PATH &amp;&amp;
128cd gcc/ada &amp;&amp;
129touch treeprs.ads [es]info.h nmake.ad[bs] &amp;&amp;
130cd ../.. &amp;&amp;
131mkdir ../gcc-build &amp;&amp;
132cd ../gcc-build &amp;&amp;
133CC=/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;
136make bootstrap &amp;&amp;
137make -C gcc gnatlib_and_tools &amp;&amp;
138make -k check &amp;&amp;
139make install &amp;&amp;
140ln -sf ../usr/bin/cpp /lib &amp;&amp;
141ln -sf gcc /usr/bin/cc &amp;&amp;
142ln -sf g77 /usr/bin/f77 &amp;&amp;
143export PATH=$PATH_HOLD</command></userinput></screen>
144
145<para>You may remove the <application><acronym>GNAT</acronym></application>
146installation:</para>
147<screen><userinput><command>rm -rf /opt/gnat</command></userinput></screen>
148
149</sect2>
150
151<sect2>
152<title>Command explanations</title>
153
154<para><command>PATH_HOLD=$PATH</command>: This command
155stores your current path before it's modified so that it can be restored after
156installation.</para>
157
158<para><command>export PATH=/opt/gnat/bin:$PATH</command>: This
159command allows the build to find
160<application><acronym>GNAT</acronym></application>'s
161<application>Ada</application> compiler to build
162<application>Ada</application>.</para>
163
164<para><command>touch treeprs.ads [es]info.h nmake.ad[bs]</command>:
165This command creates necessary files for the
166<application>Ada</application> build. This step
167may be skipped if you don't want to compile the
168<application>Ada</application> front end.</para>
169
170<para><parameter>CC=/usr/bin/gcc</parameter>: This command works around the
171new <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.
176You may modify this command to remove unwanted languages.</para>
177
178<para><parameter>--enable-shared --enable-threads=posix
179--enable-__cxa_atexit</parameter>: These commands are required to build
180the <application>C++</application> libraries to published standards.</para>
181
182<para><parameter>--enable-clocale=gnu</parameter>: This command is a
183failsafe for incomplete locale data.</para>
184
185<para><command>make gnatlib_and tools</command>: This command
186completes the <application>Ada</application> build process. Skip this step if
187you have not enabled <application>Ada</application> as one of the languages.
188</para>
189
190</sect2>
191
192<sect2>
193<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>,
202<command>gnatbl</command>, <command>gnatchop</command>,
203<command>gnatfind</command>, <command>gnatkr</command>,
204<command>gnatlink</command>, <command>gnatls</command>,
205<command>gnatmake</command>, <command>gnatprep</command>,
206<command>gnatpsta</command>, <command>gnatpsys</command>,
207<command>gnatxref</command> and
208<application><acronym>GCC</acronym></application> libraries.</para>
209
210</sect2>
211
212<sect2><title>Description</title>
213
214<para>The programs and libraries whose descriptions are missing here
215have been described in the <acronym>LFS</acronym>
216<acronym>GCC</acronym>-&gcc-version; page.</para>
217
218<sect3><title>g77</title>
219<para><command>g77</command> is the <application>Fortran</application> compiler
220invoked by <command>gcc</command>.</para></sect3>
221
222<sect3><title>add2line</title>
223<para><command>add2line</command> converts the <acronym>ASCII</acronym> form of
224the 2-line orbital elements in a file to binary form and appends them to the
225orbdata 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>
231<para><command>gdb</command> is the
232<application><acronym>GNAT</acronym></application> debugger.</para></sect3>
233
234<sect3><title>gnatbind</title>
235<para><command>gnatbind</command> is used to bind compiled objects.</para>
236</sect3>
237
238<sect3><title>gnatbl</title>
239<para><command>gnatbl</command> is the <application>Ada</application> linker.
240</para></sect3>
241
242<sect3><title>gnatchop</title>
243<para><command>gnatchop</command> is useful for renaming files to meet the
244standard <application>Ada</application> default file naming conventions.</para></sect3>
245
246<sect3><title>gnatelim</title>
247<para><command>gnatelim</command> is used to detect and eliminate unused
248subprograms in an <application>Ada</application> partition.</para></sect3>
249
250<sect3><title>gnatfind</title>
251<para><command>gnatfind</command> is the <application><acronym>GNAT</acronym>
252</application> definition/use finder.</para></sect3>
253
254<sect3><title>gnatgcc</title>
255<para><command>gnatgcc</command> is the compiler.</para></sect3>
256
257<sect3><title>gnathtml.pl</title>
258<para><command>gnathtml.pl</command> converts
259<application>Ada</application> source files to <acronym>HTML</acronym> for
260viewing in Web browsers.</para></sect3>
261
262<sect3><title>gnatkr</title>
263<para><command>gnatkr</command> is used to determine the crunched name for a
264given file, when crunched to a specified maximum length.</para></sect3>
265
266<sect3><title>gnatlink</title>
267<para><command>gnatlink</command> is used to link programs and build an
268executable file.</para></sect3>
269
270<sect3><title>gnatls</title>
271<para><command>gnatls</command> is the compiled unit browser.</para></sect3>
272
273<sect3><title>gnatemake</title>
274<para><command>gnatmake</command> is an automatic make facility.</para></sect3>
275<sect3><title>gnatmem</title>
276<para><command>gnatmem</command> is the <application><acronym>GNAT</acronym>
277</application> utility that monitors dynamic allocation and
278deallocation activity in a program.</para></sect3>
279
280<sect3><title>gnatprep</title>
281<para><command>gnatprep</command> is the
282<application><acronym>GNAT</acronym></application> external preprocessor.</para>
283</sect3>
284
285<sect3><title>gnatpsta</title>
286<para><command>gnatpsta</command> determines the values of all the relevant
287parameters in Standard and outputs to stdout.</para></sect3>
288
289<sect3><title>gnatpsys</title>
290<para><command>gnatpsys</command> determines the values of all the relevant
291parameters in System and outputs to stdout.</para></sect3>
292
293<sect3><title>gnatstub</title>
294<para><command>gnatstub</command> is a generator of body stubs.</para></sect3>
295
296<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
303</sect2>
304
305</sect1>
306
Note: See TracBrowser for help on using the repository browser.