source: archive/gcc-ada.xml@ 48b59802

11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 48b59802 was 45ab6c7, checked in by Xi Ruoyao <xry111@…>, 3 years ago

more SVN prop clean up

Remove "$LastChanged$" everywhere, and also some unused $Date$

  • Property mode set to 100644
File size: 19.5 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY gcc-download-http "&gnu-http;/gcc/gcc-&gcc-ada-version;/gcc-&gcc-ada-version;.tar.xz">
8 <!ENTITY gcc-download-ftp "&gnu-ftp;/gcc/gcc-&gcc-ada-version;/gcc-&gcc-ada-version;.tar.xz">
9 <!ENTITY gcc-md5sum "4ab282f414676496483b3e1793d07862">
10 <!ENTITY gcc-size "61 MB">
11 <!ENTITY gcc-ada-buildsize "7.0 GB (add 369 MB for tests, add 1.6 GB if GNAT install dir is not removed)">
12 <!ENTITY gcc-ada-time "25 SBU (with parallelism=4, add 92 SBU for tests)">
13
14 <!-- Keeping these the same because the new GNAT binary for x86_64
15 Requires Qt4 and a GUI to install. The i686 one is being tested
16 seperately from this update.-->
17 <!ENTITY gnat-download-http "https://libre.adacore.com/download/">
18 <!ENTITY gnat-64-download-http "http://mirrors.cdn.adacore.com/art/591c6d80c7a447af2deed1d7">
19 <!ENTITY gnat-64-md5sum "226dac83d9e6490fc8542ac0934a1db0">
20 <!ENTITY gnat-64-size "473 MB">
21 <!ENTITY gnat-32-download-http "http://mirrors.cdn.adacore.com/art/564b3e9dc8e196b040fbe248">
22 <!ENTITY gnat-32-md5sum "69423c7ad8d9759377d4fff71a78992d">
23 <!ENTITY gnat-32-size "222 MB">
24]>
25
26<sect1 id="gcc-ada" xreflabel="GCC-Ada-&gcc-ada-version;">
27 <?dbhtml filename="gcc-ada.html" ?>
28
29 <sect1info>
30 <date>$Date$</date>
31 </sect1info>
32
33 <title>GCC-Ada-&gcc-ada-version;</title>
34
35 <indexterm zone="gcc-ada">
36 <primary sortas="a-gcc-ada">GCC-Ada-&gcc-ada-version;</primary>
37 </indexterm>
38
39 <sect2 role="package">
40 <title>Introduction to the GCC Ada compiler</title>
41
42 <para>
43 Ada is a modern programming language designed for large, long-lived
44 applications &mdash; and embedded systems in particular &mdash; where
45 reliability and efficiency are essential. It has a set of unique technical
46 features that make it highly effective for use in large, complex and
47 safety-critical projects.
48 </para>
49
50 <para>
51 The compiler and associated tools on this page are known as the
52 <application>GNAT</application> technology, developed by the Adacore
53 company, using the <application>GCC</application> backend. Since
54 parts of the Ada compiler are written in Ada, there is a circular
55 dependency on an Ada compiler. The instructions below first install
56 a binary compiler. You do not need to do that if you already have built
57 <application>GNAT</application> tools.
58 </para>
59
60 &lfs84_checked;
61
62 <caution>
63 <para>
64 Using the instructions on this page will have the effect that
65 the C and C++ compiler and libraries will be reinstalled, overwriting
66 the ones on your system. This may lead to some issues. Please read the
67 notes and caution on the <xref linkend="gcc"/> page.
68 </para>
69 </caution>
70
71 <note>
72 <para>
73 If you want to install other compilers in the <application>GCC
74 </application> collection, simply add them to the
75 <parameter>--enable-languages</parameter> parameter for <command>
76 configure</command>. If you rebuild <application>GCC</application>
77 without enabling ada after running the instructions on this page,
78 the new compiler will not be able to compile ADA anymore. If you already
79 have ADA instaled, you do not need to use the instructions on this page,
80 simply add <parameter>ada</parameter> to the
81 <parameter>--enable-languages</parameter> parameter using the
82 instructions from <xref linkend="gcc"/>.
83 </para>
84 </note>
85
86 <bridgehead renderas="sect3">Package Information</bridgehead>
87 <itemizedlist spacing="compact">
88 <listitem>
89 <para>
90 Download (HTTP): <ulink url="&gcc-download-http;"/>
91 </para>
92 </listitem>
93 <listitem>
94 <para>
95 Download (FTP): <ulink url="&gcc-download-ftp;"/>
96 </para>
97 </listitem>
98 <listitem>
99 <para>
100 Download MD5 sum: &gcc-md5sum;
101 </para>
102 </listitem>
103 <listitem>
104 <para>
105 Download size: &gcc-size;
106 </para>
107 </listitem>
108 <listitem>
109 <para>
110 Estimated disk space required: &gcc-ada-buildsize;
111 </para>
112 </listitem>
113 <listitem>
114 <para>
115 Estimated build time: &gcc-ada-time;
116 </para>
117 </listitem>
118 </itemizedlist>
119
120 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
121 <note>
122 <!-- gnat-2018 uses graphical installer, stick to 2017 -->
123 <para>
124 You will need to install <application>GNAT</application>
125 temporarily to satisfy the circular dependency. You may point your
126 browser to the <ulink url="&gnat-download-http;">AdaCore download
127 page</ulink>, choose your platform and 2017 (64 bit machines) or
128 2014 (32 bit machines), then select the file
129 to download. Alternatively, direct links to the 64 bit and 32 bit
130 linux versions are given below.
131 </para>
132 </note>
133
134 <itemizedlist spacing="compact">
135 <listitem>
136 <para>
137 GNAT 64 bit binary: <ulink url="&gnat-64-download-http;"/>
138 </para>
139 </listitem>
140 <listitem>
141 <para>
142 GNAT 64 bit MD5 sum: &gnat-64-md5sum;
143 </para>
144 </listitem>
145 <listitem>
146 <para>
147 GNAT 64 bit size: &gnat-64-size;
148 </para>
149 </listitem>
150 <listitem>
151 <para>
152 GNAT 32 bit binary: <ulink url="&gnat-32-download-http;"/>
153 </para>
154 </listitem>
155 <listitem>
156 <para>
157 GNAT 32 bit MD5 sum: &gnat-32-md5sum;
158 </para>
159 </listitem>
160 <listitem>
161 <para>
162 GNAT 32 bit size: &gnat-32-size;
163 </para>
164 </listitem>
165<!--
166 <listitem>
167 <para>
168 Required patch:
169 <ulink url="&patch-root;/gcc-&gcc-ada-version;-upstream_fixes-1.patch"/>
170 </para>
171 </listitem>
172-->
173 </itemizedlist>
174
175 <bridgehead renderas="sect3">GCC Ada Dependencies</bridgehead>
176
177 <bridgehead renderas="sect4">Recommended</bridgehead>
178 <para role="recommended">
179 <xref linkend="dejagnu"/>, for tests
180 </para>
181
182 <bridgehead renderas="sect4">Optional</bridgehead>
183 <para role="optional">
184 <xref linkend="gdb"/> and
185 <xref linkend="valgrind"/> (for tests)
186 </para>
187
188 <para condition="html" role="usernotes">User Notes:
189 <ulink url="&blfs-wiki;/gcc-ada"/></para>
190
191 </sect2>
192
193 <sect2 role="installation">
194 <title>Installation of the GNAT binary</title>
195
196 <para>
197 Before unpacking and changing into the GCC source directory, first
198 unpack the <application>GNAT</application> tarball, and change to the
199 GNAT directory. Then, install the <application>GNAT</application> binary
200 by running the following command as the
201 <systemitem class="username">root</systemitem> user:
202 </para>
203
204<screen role="root"><userinput>make ins-all prefix=/opt/gnat</userinput></screen>
205
206 <para>
207 The <application>GNAT</application> compiler can be invoked by
208 executing the <command>gcc</command> binary installed in <filename
209 class="directory">/opt/gnat/bin</filename>.
210 </para>
211
212 <para>
213 You may now remove the <application>GNAT</application>
214 source directory if desired.
215 </para>
216
217 <para>
218 Prepare to compile <application>GCC</application> by placing the
219 <application>GNAT</application> version of <command>gcc</command> at the
220 beginning of the <envar>PATH</envar> variable by using the following
221 commands:
222 </para>
223
224<screen><userinput>PATH_HOLD=$PATH &amp;&amp;
225export PATH=/opt/gnat/bin:$PATH_HOLD</userinput></screen>
226
227 <para>
228 Doing so has the drawback that the <application>GCC</application>
229 and <application>Binutils</application> executables are taken
230 from the just installed <application>GNAT</application> package, but the
231 versions of those executables are outdated compared to those installed in
232 LFS. This is not important for the <application>GCC</application> compilers,
233 since they recompile themselves during the bootstrap process. On the other
234 hand, the outdated <command>ld</command> and <command>as</command> tools
235 are used all along. In order to use the LFS tools, issue as the
236 <systemitem class="username">root</systemitem> user:
237 </para>
238
239<screen role="root"><userinput>find /opt/gnat -name ld -exec mv -v {} {}.old \;
240find /opt/gnat -name as -exec mv -v {} {}.old \;</userinput></screen>
241
242 </sect2>
243
244 <sect2 role="installation">
245 <title>Installation of GCC Ada</title>
246
247 <para>
248 Install <application>GCC Ada</application> by running the
249 following commands:
250 </para>
251
252<screen><userinput>case $(uname -m) in
253 x86_64)
254 sed -e '/m64=/s/lib64/lib/' \
255 -i.orig gcc/config/i386/t-linux64
256 ;;
257esac
258
259mkdir build &amp;&amp;
260cd build &amp;&amp;
261
262../configure \
263 --prefix=/usr \
264 --disable-multilib \
265 --disable-libmpx \
266 --with-system-zlib \
267 --enable-languages=ada &amp;&amp;
268make</userinput></screen>
269
270 <para>
271 If you have installed additional packages such as
272 <application>Valgrind</application> and <application>GDB</application>,
273 the <application>GCC</application> part of the testsuite will run more
274 tests than in LFS. Some of those will report FAIL and others XPASS
275 (pass when expected to FAIL). To run the tests, issue:
276 </para>
277
278<screen><userinput>ulimit -s 32768 &amp;&amp;
279make -k check</userinput></screen>
280<!-- The command above may error out, so using && may prevent the summary
281to be run. -->
282
283 <para>
284 The tests are very long, and the results may be hard to find in the
285 logs, specially if you use parallel jobs with make. You can get a summary
286 of the tests with:
287 </para>
288
289<screen><userinput>../contrib/test_summary</userinput></screen>
290
291 <para>
292 Now, as the <systemitem class="username">root</systemitem> user:
293 </para>
294
295<screen role="root"><userinput>make install &amp;&amp;
296mkdir -pv /usr/share/gdb/auto-load/usr/lib &amp;&amp;
297mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib &amp;&amp;
298
299chown -v -R root:root \
300 /usr/lib/gcc/*linux-gnu/&gcc-ada-version;/include{,-fixed} \
301 /usr/lib/gcc/*linux-gnu/&gcc-ada-version;/ada{lib,include}</userinput></screen>
302
303 <para>
304 You should now remove the <application>GNAT</application>
305 installation and perform other cleanups. First, as the <systemitem
306 class="username">root</systemitem> user:
307 </para>
308
309<screen role="root"><userinput>rm -rf /opt/gnat</userinput></screen>
310
311 <para>
312 Then, as a normal user:
313 </para>
314
315<screen><userinput>export PATH=$PATH_HOLD &amp;&amp;
316unset PATH_HOLD</userinput></screen>
317
318 </sect2>
319
320 <sect2 role="commands">
321 <title>Command Explanations</title>
322
323 <para>
324 <command>mkdir build; cd build</command>: The
325 <application>GCC</application> documentation recommends
326 building the package in a dedicated build directory.
327 </para>
328
329 <para>
330 <parameter>--disable-multilib</parameter>: This parameter ensures
331 that files are created for the specific architecture of your computer.
332 </para>
333
334 <para>
335 <parameter>--with-system-zlib</parameter>: Uses the system
336 <application>zlib</application> instead of the bundled one.
337 <application>zlib</application> is used for compressing
338 and uncompressing <application>GCC</application>'s intermediate
339 language in LTO (Link Time Optimization) object files.
340 </para>
341
342 <para>
343 <parameter>--enable-languages=ada</parameter>: Instructs the build system
344 to build the Ada tools and compiler. It is unavoidable that the
345 <application>C</application> and <application>C++</application>
346 compilers be built too.
347 </para>
348
349 <!-- Unlike standard GCC, removing this could break compatibility
350 with the GNAT binary for i686 because it uses gcc-4.7.3 in the
351 binary. Leave it alone until tested. -->
352 <para>
353 <option>--with-default-libstdcxx-abi=gcc4-compatible</option>: Use this
354 switch if you are building <application>GNAT</application> tools using a
355 <application>GCC</application> version prior to 5.1.0,
356 and you do not want to recompile all the libraries written in C++.
357 </para>
358
359 <para>
360 <command>ulimit -s 32768</command>: This command prevents several
361 tests from running out of stack space.
362 </para>
363
364 <para>
365 <command>make -k check</command>: This command runs the test suite
366 without stopping if any errors are encountered.
367 </para>
368
369 <para>
370 <command>../contrib/test_summary</command>: This
371 command will produce a summary of the test suite results. You can append
372 <command>| grep -A7 Summ</command> to the command to produce an even more
373 condensed version of the summary. You may also wish to redirect the output
374 to a file for review and comparison later on.
375 </para>
376
377 <para>
378 <command>chown -v -R root:root /usr/lib/gcc/*linux-gnu/...</command>:
379 If the package is built by a user other than root, the ownership of the
380 installed <filename class="directory">include</filename> and
381 <filename class="directory">adalib</filename> directories (and their
382 contents) will be incorrect. These commands change the ownership to the
383 <systemitem class="username">root</systemitem> user and group.
384 </para>
385
386 </sect2>
387
388 <sect2 role="content">
389 <title>Contents</title>
390
391 <segmentedlist>
392 <segtitle>Installed Programs</segtitle>
393 <segtitle>Installed Libraries</segtitle>
394 <segtitle>Installed Directories</segtitle>
395
396 <seglistitem>
397 <seg>
398 gnat, gnatbind, gnatchop, gnatclean, gnatfind, gnatkr,
399 gnatlink, gnatls, gnatmake, gnatname, gnatprep, gnatxref
400 </seg>
401 <seg>
402 libgnarl.{so,a}, libgnat.{so,a} in <filename class="directory">
403 /usr/lib/gcc/&lt;arch-triplet&gt;/&gcc-ada-version;/adalib</filename>
404 </seg>
405 <seg>
406 /usr/lib/gcc/&lt;arch-triplet&gt;/&gcc-ada-version;/ada{include,lib}
407 and /usr/lib/gcc/&lt;arch-triplet&gt;/&gcc-ada-version;/plugin/include/ada
408 </seg>
409 </seglistitem>
410 </segmentedlist>
411
412 <para>
413 Only the Ada specific files are listed here. Others can be found at
414 <ulink url="&lfs-root;/chapter06/gcc.html#contents-gcc"/> as they were
415 initially installed during the building of LFS.
416 </para>
417
418 <variablelist>
419 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
420 <?dbfo list-presentation="list"?>
421 <?dbhtml list-presentation="table"?>
422
423 <varlistentry id="gnat">
424 <term><command>gnat</command></term>
425 <listitem>
426 <para>
427 is a wrapper that accepts a number of commands and calls
428 the corresponding tool from the list below.
429 </para>
430 <indexterm zone="gcc-ada gnat">
431 <primary sortas="b-gnat">gnat</primary>
432 </indexterm>
433 </listitem>
434 </varlistentry>
435
436 <varlistentry id="gnatbind">
437 <term><command>gnatbind</command></term>
438 <listitem>
439 <para>
440 is used to bind compiled objects.
441 </para>
442 <indexterm zone="gcc-ada gnatbind">
443 <primary sortas="b-gnatbind">gnatbind</primary>
444 </indexterm>
445 </listitem>
446 </varlistentry>
447
448 <varlistentry id="gnatchop">
449 <term><command>gnatchop</command></term>
450 <listitem>
451 <para>
452 is useful for renaming files to meet the standard
453 <application>Ada</application> default file naming conventions.
454 </para>
455 <indexterm zone="gcc-ada gnatchop">
456 <primary sortas="b-gnatchop">gnatchop</primary>
457 </indexterm>
458 </listitem>
459 </varlistentry>
460
461 <varlistentry id="gnatclean">
462 <term><command>gnatclean</command></term>
463 <listitem>
464 <para>
465 is used to remove files associated with a
466 <application>GNAT</application> project.
467 </para>
468 <indexterm zone="gcc-ada gnatclean">
469 <primary sortas="b-gnatclean">gnatclean</primary>
470 </indexterm>
471 </listitem>
472 </varlistentry>
473
474 <varlistentry id="gnatfind">
475 <term><command>gnatfind</command></term>
476 <listitem>
477 <para>
478 is intended for locating definition and/or references to
479 specified entities in a <application>GNAT</application> project.
480 </para>
481 <indexterm zone="gcc-ada gnatfind">
482 <primary sortas="b-gnatfind">gnatfind</primary>
483 </indexterm>
484 </listitem>
485 </varlistentry>
486
487 <varlistentry id="gnatkr">
488 <term><command>gnatkr</command></term>
489 <listitem>
490 <para>
491 is used to determine the crunched name for a given file, when
492 crunched to a specified maximum length.
493 </para>
494 <indexterm zone="gcc-ada gnatkr">
495 <primary sortas="b-gnatkr">gnatkr</primary>
496 </indexterm>
497 </listitem>
498 </varlistentry>
499
500 <varlistentry id="gnatlink">
501 <term><command>gnatlink</command></term>
502 <listitem>
503 <para>
504 is used to link programs and build an executable file.
505 </para>
506 <indexterm zone="gcc-ada gnatlink">
507 <primary sortas="b-gnatlink">gnatlink</primary>
508 </indexterm>
509 </listitem>
510 </varlistentry>
511
512 <varlistentry id="gnatls">
513 <term><command>gnatls</command></term>
514 <listitem>
515 <para>
516 is the compiled unit browser.
517 </para>
518 <indexterm zone="gcc-ada gnatls">
519 <primary sortas="b-gnatls">gnatls</primary>
520 </indexterm>
521 </listitem>
522 </varlistentry>
523
524 <varlistentry id="gnatmake">
525 <term><command>gnatmake</command></term>
526 <listitem>
527 <para>
528 is the <application>Ada</application> compiler, which performs
529 compilation, binding and linking.
530 </para>
531 <indexterm zone="gcc-ada gnatmake">
532 <primary sortas="b-gnatmake">gnatmake</primary>
533 </indexterm>
534 </listitem>
535 </varlistentry>
536
537 <varlistentry id="gnatname">
538 <term><command>gnatname</command></term>
539 <listitem>
540 <para>
541 will list the files associated with a
542 <application>GNAT</application> project.
543 </para>
544 <indexterm zone="gcc-ada gnatname">
545 <primary sortas="b-gnatname">gnatname</primary>
546 </indexterm>
547 </listitem>
548 </varlistentry>
549
550 <varlistentry id="gnatprep">
551 <term><command>gnatprep</command></term>
552 <listitem>
553 <para>
554 is the <application>GNAT</application> external preprocessor.
555 </para>
556 <indexterm zone="gcc-ada gnatprep">
557 <primary sortas="b-gnatprep">gnatprep</primary>
558 </indexterm>
559 </listitem>
560 </varlistentry>
561
562 <varlistentry id="gnatxref">
563 <term><command>gnatxref</command></term>
564 <listitem>
565 <para>
566 is similar to <command>gnatfind</command>, but generates
567 a full report of all cross-references.
568 </para>
569 <indexterm zone="gcc-ada gnatxref">
570 <primary sortas="b-gnatxref">gnatxref</primary>
571 </indexterm>
572 </listitem>
573 </varlistentry>
574
575 </variablelist>
576
577 </sect2>
578
579</sect1>
Note: See TracBrowser for help on using the repository browser.