source: general/prog/gcc.xml@ 07b157f4

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

Standardized 'Recommended Patch:' on various package instructions; Revised KOffice 'Additional download' section; Minor wording changes to Dillo instructions

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

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