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
|
---|
32 | contains <acronym>GNU</acronym> compilers. This is useful for
|
---|
33 | compiling 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
|
---|
41 | url="&gcc-download-http;"/></para></listitem>
|
---|
42 | <listitem><para>Download (FTP): <ulink
|
---|
43 | url="&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
|
---|
53 | url="&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
|
---|
63 | satisfy the circular dependency when you recompile
|
---|
64 | <application><acronym>
|
---|
65 | GCC</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
|
---|
71 | url="&gnat-download-http;"/></para></listitem>
|
---|
72 | <listitem><para>Download (FTP): <ulink
|
---|
73 | url="&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
|
---|
92 | following 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
|
---|
98 | system <command>gcc</command>, the package will be installed in a separate
|
---|
99 | directory, 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
|
---|
104 | and <userinput>/opt/gnat</userinput> in response to the
|
---|
105 | second 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
|
---|
111 | invoked by executing the <command>gcc</command> binary installed by the above
|
---|
112 | script.</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 &&
|
---|
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 &&
|
---|
127 | export PATH=/opt/gnat/bin:$PATH &&
|
---|
128 | cd gcc/ada &&
|
---|
129 | touch treeprs.ads [es]info.h nmake.ad[bs] &&
|
---|
130 | cd ../.. &&
|
---|
131 | mkdir ../gcc-build &&
|
---|
132 | cd ../gcc-build &&
|
---|
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 &&
|
---|
136 | make bootstrap &&
|
---|
137 | make -C gcc gnatlib_and_tools &&
|
---|
138 | make -k check &&
|
---|
139 | make install &&
|
---|
140 | ln -sf ../usr/bin/cpp /lib &&
|
---|
141 | ln -sf gcc /usr/bin/cc &&
|
---|
142 | ln -sf g77 /usr/bin/f77 &&
|
---|
143 | export PATH=$PATH_HOLD</command></userinput></screen>
|
---|
144 |
|
---|
145 | <para>You may remove the <application><acronym>GNAT</acronym></application>
|
---|
146 | installation:</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
|
---|
155 | stores your current path before it's modified so that it can be restored after
|
---|
156 | installation.</para>
|
---|
157 |
|
---|
158 | <para><command>export PATH=/opt/gnat/bin:$PATH</command>: This
|
---|
159 | command 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>:
|
---|
165 | This command creates necessary files for the
|
---|
166 | <application>Ada</application> build. This step
|
---|
167 | may 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
|
---|
171 | new <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 |
|
---|
178 | <para><parameter>--enable-shared --enable-threads=posix
|
---|
179 | --enable-__cxa_atexit</parameter>: These commands are required to build
|
---|
180 | the <application>C++</application> libraries to published standards.</para>
|
---|
181 |
|
---|
182 | <para><parameter>--enable-clocale=gnu</parameter>: This command is a
|
---|
183 | failsafe for incomplete locale data.</para>
|
---|
184 |
|
---|
185 | <para><command>make gnatlib_and tools</command>: This command
|
---|
186 | completes the <application>Ada</application> build process. Skip this step if
|
---|
187 | you 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
|
---|
215 | have 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
|
---|
220 | invoked 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>
|
---|
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
|
---|
244 | standard <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
|
---|
248 | subprograms 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
|
---|
260 | viewing 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
|
---|
264 | given 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
|
---|
268 | executable 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
|
---|
278 | deallocation 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
|
---|
287 | parameters 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
|
---|
291 | parameters 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 |
|
---|