Ignore:
Timestamp:
08/01/2015 04:26:22 AM (9 years ago)
Author:
Douglas R. Reno <renodr@…>
Branches:
systemd-13485
Children:
ad6910d
Parents:
4a83293
Message:

Import back into SVN from Github

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/branches/systemd@16309 af4574ff-66df-0310-9fd7-8a98e5e911e0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • general/prog/gcc-ada.xml

    r4a83293 rac38e9dc  
    55  %general-entities;
    66
    7   <!ENTITY gcc-download-http     "http://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
     7  <!ENTITY gcc-download-http     "https://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
    88  <!ENTITY gcc-download-ftp      "ftp://ftp.gnu.org/gnu/gcc/gcc-&gcc-version;/gcc-&gcc-version;.tar.bz2">
    9   <!ENTITY gcc-md5sum            "4df8ee253b7f3863ad0b86359cd39c43">
    10   <!ENTITY gcc-size              "86 MB">
    11   <!ENTITY gcc-ada-buildsize     "5.1 GB (0.7 GB added if GNAT install dir is not removed)">
    12   <!ENTITY gcc-ada-time          "114 SBU (including 72 SBU for tests)">
     9  <!ENTITY gcc-md5sum            "d5525b1127d07d215960e6051c5da35e">
     10  <!ENTITY gcc-size              "91 MB">
     11  <!ENTITY gcc-ada-buildsize     "6.4 GB (0.7 GB added if GNAT install dir is not removed)">
     12  <!ENTITY gcc-ada-time          "125 SBU (including 73 SBU for tests)">
    1313
    1414  <!ENTITY gnat-download-http    "https://libre.adacore.com/download/">
     
    3838    <title>Introduction to the GCC Ada compiler</title>
    3939
    40     <para>Ada is a modern programming language designed for large, long-lived
    41     applications &mdash; and embedded systems in particular &mdash; where
    42     reliability and efficiency are essential. It has a set of unique technical
    43     features that make it highly effective for use in large, complex and
    44     safety-critical projects.</para>
    45 
    46     <para>The compiler and associated tools on this page are known as the
    47     <application>GNAT</application> technology, developed by the Adacore
    48     company, using the <application>GCC</application> backend. Since
    49     parts of the Ada compiler are written in Ada, there is a circular
    50     dependency on an Ada compiler. The instructions below first install
    51     a binary compiler.</para>
    52 
    53     &lfs76_checked;
     40    <para>
     41      Ada is a modern programming language designed for large, long-lived
     42      applications &mdash; and embedded systems in particular &mdash; where
     43      reliability and efficiency are essential. It has a set of unique technical
     44      features that make it highly effective for use in large, complex and
     45      safety-critical projects.
     46    </para>
     47
     48    <para>
     49      The compiler and associated tools on this page are known as the
     50      <application>GNAT</application> technology, developed by the Adacore
     51      company, using the <application>GCC</application> backend. Since
     52      parts of the Ada compiler are written in Ada, there is a circular
     53      dependency on an Ada compiler. The instructions below first install
     54      a binary compiler. You do not need to do that if you already have built
     55      <application>GNAT</application> tools.
     56    </para>
     57
     58    &lfs77_checked;
    5459
    5560    <caution>
    56       <para>Using the instructions on this page will have the effect that
    57       the C and C++ compiler and libraries will be reinstalled, overwriting
    58       the ones on your system. This may lead to some issues. Please read the
    59       notes and caution on the <xref linkend="gcc"/> page.</para>
     61      <para>
     62        Using the instructions on this page will have the effect that
     63        the C and C++ compiler and libraries will be reinstalled, overwriting
     64        the ones on your system. This may lead to some issues. Please read the
     65        notes and caution on the <xref linkend="gcc"/> page.
     66      </para>
    6067    </caution>
     68
     69    <note>
     70      <para>
     71        If you want to install other compilers in the <application>GCC
     72        </application> collection, do that first, or specify ada in the
     73        <parameter>--enable-languages</parameter> switch to <command>
     74        configure</command>. If you rebuild <application>GCC</application>
     75        without enabling ada after running the instructions on this page,
     76        the new compiler will not be able to compile ADA anymore.
     77      </para>
     78    </note>
    6179
    6280    <bridgehead renderas="sect3">Package Information</bridgehead>
    6381    <itemizedlist spacing="compact">
    6482      <listitem>
    65         <para>Download (HTTP): <ulink url="&gcc-download-http;"/></para>
    66       </listitem>
    67       <listitem>
    68         <para>Download (FTP): <ulink url="&gcc-download-ftp;"/></para>
    69       </listitem>
    70       <listitem>
    71         <para>Download MD5 sum: &gcc-md5sum;</para>
    72       </listitem>
    73       <listitem>
    74         <para>Download size: &gcc-size;</para>
    75       </listitem>
    76       <listitem>
    77         <para>Estimated disk space required: &gcc-ada-buildsize;</para>
    78       </listitem>
    79       <listitem>
    80         <para>Estimated build time: &gcc-ada-time;</para>
     83        <para>
     84          Download (HTTP): <ulink url="&gcc-download-http;"/>
     85        </para>
     86      </listitem>
     87      <listitem>
     88        <para>
     89          Download (FTP): <ulink url="&gcc-download-ftp;"/>
     90        </para>
     91      </listitem>
     92      <listitem>
     93        <para>
     94          Download MD5 sum: &gcc-md5sum;
     95        </para>
     96      </listitem>
     97      <listitem>
     98        <para>
     99          Download size: &gcc-size;
     100        </para>
     101      </listitem>
     102      <listitem>
     103        <para>
     104          Estimated disk space required: &gcc-ada-buildsize;
     105        </para>
     106      </listitem>
     107      <listitem>
     108        <para>
     109          Estimated build time: &gcc-ada-time;
     110        </para>
    81111      </listitem>
    82112    </itemizedlist>
     
    84114    <bridgehead renderas="sect3">Additional Downloads</bridgehead>
    85115    <note>
    86       <para>You will need to install <application>GNAT</application>
    87       temporarily to satisfy the circular dependency. You may point your
    88       browser to the <ulink url="&gnat-download-http;">AdaCore download
    89       page</ulink>, choose your platform and 2014, then select the file
    90       to download. Alternatively, direct links to the 64 bit and 32 bit
    91       linux versions are given below.</para>
     116      <para>
     117        You will need to install <application>GNAT</application>
     118        temporarily to satisfy the circular dependency. You may point your
     119        browser to the <ulink url="&gnat-download-http;">AdaCore download
     120        page</ulink>, choose your platform and 2014, then select the file
     121        to download. Alternatively, direct links to the 64 bit and 32 bit
     122        linux versions are given below.
     123      </para>
    92124    </note>
    93125
     
    123155        </para>
    124156      </listitem>
    125 <!--      <listitem>
     157      <listitem>
    126158        <para>
    127159          Required patch:
    128160          <ulink url="&patch-root;/gcc-&gcc-version;-upstream_fixes-1.patch"/>
    129161        </para>
    130       </listitem>-->
     162      </listitem>
    131163    </itemizedlist>
    132164
     
    146178    <title>Installation of the GNAT binary</title>
    147179
    148     <para>Before unpacking and changing into the GCC source directory, first
    149     unpack the <application>GNAT</application> tarball, and change to the
    150     GNAT directory. Then, install the <application>GNAT</application> binary
    151     by running the following command as the
    152     <systemitem class="username">root</systemitem> user:</para>
     180    <para>
     181      Before unpacking and changing into the GCC source directory, first
     182      unpack the <application>GNAT</application> tarball, and change to the
     183      GNAT directory. Then, install the <application>GNAT</application> binary
     184      by running the following command as the
     185      <systemitem class="username">root</systemitem> user:
     186    </para>
    153187
    154188<screen role="root"><userinput>make ins-all prefix=/opt/gnat</userinput></screen>
    155189
    156     <para>The <application>GNAT</application> compiler can be invoked by
    157     executing the <command>gcc</command> binary installed in <filename
    158     class="directory">/opt/gnat/bin</filename>.</para>
    159 
    160     <para>You may now remove the <application>GNAT</application>
    161     source directory if desired.</para>
    162 
    163     <para>Prepare to compile <application>GCC</application> by placing the
    164     <application>GNAT</application> version of <command>gcc</command> at the
    165     beginning of the <envar>PATH</envar> variable by using the following
    166     commands:</para>
     190    <para>
     191      The <application>GNAT</application> compiler can be invoked by
     192      executing the <command>gcc</command> binary installed in <filename
     193      class="directory">/opt/gnat/bin</filename>.
     194    </para>
     195
     196    <para>
     197      You may now remove the <application>GNAT</application>
     198      source directory if desired.
     199    </para>
     200
     201    <para>
     202      Prepare to compile <application>GCC</application> by placing the
     203      <application>GNAT</application> version of <command>gcc</command> at the
     204      beginning of the <envar>PATH</envar> variable by using the following
     205      commands:
     206    </para>
    167207
    168208<screen><userinput>PATH_HOLD=$PATH &amp;&amp;
    169209export PATH=/opt/gnat/bin:$PATH_HOLD</userinput></screen>
    170210
    171     <para>Doing so has the drawback that the <application>GCC</application>
    172     and <application>Binutils</application> executables are taken
    173     from the just installed <application>GNAT</application> package, but the
    174     versions of those executables are outdated compared to those installed in
    175     LFS. This is not important for the <application>GCC</application> compilers,
    176     since they recompile themselves during the bootstrap process. On the other
    177     hand, the outdated <command>ld</command> and <command>as</command> tools
    178     are used all along. In order to use the LFS tools, issue as the
    179     <systemitem class="username">root</systemitem> user:</para>
     211    <para>
     212      Doing so has the drawback that the <application>GCC</application>
     213      and <application>Binutils</application> executables are taken
     214      from the just installed <application>GNAT</application> package, but the
     215      versions of those executables are outdated compared to those installed in
     216      LFS. This is not important for the <application>GCC</application> compilers,
     217      since they recompile themselves during the bootstrap process. On the other
     218      hand, the outdated <command>ld</command> and <command>as</command> tools
     219      are used all along. In order to use the LFS tools, issue as the
     220      <systemitem class="username">root</systemitem> user:
     221    </para>
    180222
    181223<screen role="root"><userinput>find /opt/gnat -name ld -exec mv -v {} {}.old \;
     
    186228  <sect2 role="installation">
    187229    <title>Installation of GCC Ada</title>
    188 <!--
    189     <para>As in LFS, fix a problem identified upstream:</para>
    190 
    191 <screen><userinput>sed -i 's/if \((code.*))\)/if (\1 \&amp;\&amp; \!DEBUG_INSN_P (insn))/' gcc/sched-deps.c</userinput></screen>
    192 -->
    193 
    194     <para>Install <application>GCC Ada</application> by running the
    195     following commands:</para>
    196 
    197 <screen><userinput><!--
    198 patch -Np1 -i ../gcc-&gcc-version;-upstream_fixes-1.patch &amp;&amp;
    199 -->mkdir ../gcc-build &amp;&amp;
     230
     231    <para>
     232      As in LFS, fix some problems identified upstream:
     233    </para>
     234
     235<screen><userinput>patch -Np1 -i ../gcc-&gcc-version;-upstream_fixes-1.patch</userinput></screen>
     236
     237    <para>
     238      Install <application>GCC Ada</application> by running the
     239      following commands:
     240    </para>
     241
     242<screen><userinput>mkdir ../gcc-build &amp;&amp;
    200243cd    ../gcc-build &amp;&amp;
    201244
     
    207250make</userinput></screen>
    208251
    209     <para>If you have installed additional packages such as
    210     <application>Valgrind</application> and <application>GDB</application>,
    211     the <application>GCC</application> part of the testsuite will run more
    212     tests than in LFS. Some of those will report FAIL and others XPASS
    213     (pass when expected to FAIL). To run the tests, issue:</para>
     252    <para>
     253      If you have installed additional packages such as
     254      <application>Valgrind</application> and <application>GDB</application>,
     255      the <application>GCC</application> part of the testsuite will run more
     256      tests than in LFS. Some of those will report FAIL and others XPASS
     257      (pass when expected to FAIL). To run the tests, issue:
     258    </para>
    214259
    215260<screen><userinput>ulimit -s 32768 &amp;&amp;
     
    218263to be run. -->
    219264
    220     <para>The tests are very long, and the results may be hard to find in the
    221     logs, specially if you use parallel jobs with make. You can get a summary
    222     of the tests with:</para>
     265    <para>
     266      The tests are very long, and the results may be hard to find in the
     267      logs, specially if you use parallel jobs with make. You can get a summary
     268      of the tests with:
     269    </para>
    223270
    224271<screen><userinput>../gcc-&gcc-version;/contrib/test_summary</userinput></screen>
    225272
    226     <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
     273    <para>
     274      Now, as the <systemitem class="username">root</systemitem> user:
     275    </para>
    227276
    228277<screen role="root"><userinput>make install &amp;&amp;
     
    235284    /usr/lib/gcc/*linux-gnu/&gcc-version;/ada{lib,include}</userinput></screen>
    236285
    237     <para>You should now remove the <application>GNAT</application>
    238     installation and perform other cleanups:</para>
    239 
    240 <screen><userinput>rm -rf /opt/gnat &amp;&amp;
    241 export PATH=$PATH_HOLD &amp;&amp;
     286    <para>
     287      You should now remove the <application>GNAT</application>
     288      installation and perform other cleanups. First, as the <systemitem
     289      class="username">root</systemitem> user:
     290    </para>
     291
     292<screen role="root"><userinput>rm -rf /opt/gnat</userinput></screen>
     293
     294    <para>
     295      Then, as a normal user:
     296    </para>
     297
     298<screen><userinput>export PATH=$PATH_HOLD &amp;&amp;
    242299unset PATH_HOLD</userinput></screen>
    243300
     
    246303  <sect2 role="commands">
    247304    <title>Command Explanations</title>
    248 <!--
    249     <para>
    250       <command>patch ... gcc-&gcc-version;-upstream_fixes-1.patch</command>:
    251       This patch corrects bugs in the C++ compiler, which lead to
    252       segmentation faults in some cases.
    253     </para>
    254 -->
    255 
    256     <para><command>mkdir ../gcc-build; cd ../gcc-build</command>: The
    257     <application>GCC</application> documentation recommends
    258     building the package in a dedicated build directory.</para>
    259 
    260     <para><parameter>--disable-multilib</parameter>: This parameter ensures
    261     that files are created for the specific architecture of your computer.</para>
     305
     306    <para>
     307      <command>mkdir ../gcc-build; cd ../gcc-build</command>: The
     308      <application>GCC</application> documentation recommends
     309      building the package in a dedicated build directory.
     310    </para>
     311
     312    <para>
     313      <parameter>--disable-multilib</parameter>: This parameter ensures
     314      that files are created for the specific architecture of your computer.
     315    </para>
    262316
    263317    <para>
     
    276330    </para>
    277331
    278     <para><command>ulimit -s 32768</command>: This command prevents several
    279     tests from running out of stack space.</para>
    280 
    281     <para><command>make -k check</command>: This command runs the test suite
    282     without stopping if any errors are encountered.</para>
    283 
    284     <para><command>../gcc-&gcc-version;/contrib/test_summary</command>: This
    285     command will produce a summary of the test suite results. You can append
    286     <command>| grep -A7 Summ</command> to the command to produce an even more
    287     condensed version of the summary. You may also wish to redirect the output
    288     to a file for review and comparison later on.</para>
    289 
    290     <para><command>chown -v -R root:root /usr/lib/gcc/*linux-gnu/...</command>:
    291     If the package is built by a user other than root, the ownership of the
    292     installed <filename class="directory">include</filename> and
    293     <filename class="directory">adalib</filename> directories (and their
    294     contents) will be incorrect. These commands change the ownership to the
    295     <systemitem class="username">root</systemitem> user and group.</para>
     332    <para>
     333      <option>--with-default-libstdcxx-abi=c++98</option>: Use this switch if you
     334      are building <application>GNAT</application> tools using a
     335      <application>GCC</application> version prior to 5.1.0,
     336      and you do not want to recompile all the libraries written in C++.
     337    </para>
     338
     339    <para>
     340      <command>ulimit -s 32768</command>: This command prevents several
     341      tests from running out of stack space.
     342    </para>
     343
     344    <para>
     345      <command>make -k check</command>: This command runs the test suite
     346      without stopping if any errors are encountered.
     347    </para>
     348
     349    <para>
     350      <command>../gcc-&gcc-version;/contrib/test_summary</command>: This
     351      command will produce a summary of the test suite results. You can append
     352      <command>| grep -A7 Summ</command> to the command to produce an even more
     353      condensed version of the summary. You may also wish to redirect the output
     354      to a file for review and comparison later on.
     355    </para>
     356
     357    <para>
     358      <command>chown -v -R root:root /usr/lib/gcc/*linux-gnu/...</command>:
     359      If the package is built by a user other than root, the ownership of the
     360      installed <filename class="directory">include</filename> and
     361      <filename class="directory">adalib</filename> directories (and their
     362      contents) will be incorrect. These commands change the ownership to the
     363      <systemitem class="username">root</systemitem> user and group.
     364    </para>
    296365
    297366  </sect2>
     
    308377        <seg>
    309378          gnat, gnatbind, gnatchop, gnatclean, gnatfind, gnatkr,
    310           gnatlink, gnatls, gnatmake, gnatname, gnatprep, gnatxref,
    311           and a run-time executable, gnat1, in <filename class="directory">
    312           /usr/libexec/&lt;arch-triplet&gt;/&gcc-version;</filename>
     379          gnatlink, gnatls, gnatmake, gnatname, gnatprep, gnatxref
    313380        </seg>
    314381        <seg>
     
    322389    </segmentedlist>
    323390
    324     <para>Only the Ada specific files are listed here. Others can be found at
    325     <ulink url="&lfs-root;/chapter06/gcc.html#contents-gcc"/> as they were
    326     initially installed during the building of LFS.</para>
     391    <para>
     392      Only the Ada specific files are listed here. Others can be found at
     393      <ulink url="&lfs-root;/chapter06/gcc.html#contents-gcc"/> as they were
     394      initially installed during the building of LFS.
     395    </para>
    327396
    328397    <variablelist>
     
    334403        <term><command>gnat</command></term>
    335404        <listitem>
    336           <para>is a wrapper that accepts a number of commands and calls
    337           the corresponding tool from the list below.</para>
     405          <para>
     406            is a wrapper that accepts a number of commands and calls
     407            the corresponding tool from the list below.
     408          </para>
    338409          <indexterm zone="gcc-ada gnat">
    339410            <primary sortas="b-gnat">gnat</primary>
     
    345416        <term><command>gnatbind</command></term>
    346417        <listitem>
    347           <para>is used to bind compiled objects.</para>
     418          <para>
     419            is used to bind compiled objects.
     420          </para>
    348421          <indexterm zone="gcc-ada gnatbind">
    349422            <primary sortas="b-gnatbind">gnatbind</primary>
     
    355428        <term><command>gnatchop</command></term>
    356429        <listitem>
    357           <para>is useful for renaming files to meet the standard
    358           <application>Ada</application> default file naming conventions.</para>
     430          <para>
     431            is useful for renaming files to meet the standard
     432            <application>Ada</application> default file naming conventions.
     433          </para>
    359434          <indexterm zone="gcc-ada gnatchop">
    360435            <primary sortas="b-gnatchop">gnatchop</primary>
     
    366441        <term><command>gnatclean</command></term>
    367442        <listitem>
    368           <para>is used to remove files associated with a
    369           <application>GNAT</application> project.</para>
     443          <para>
     444            is used to remove files associated with a
     445            <application>GNAT</application> project.
     446          </para>
    370447          <indexterm zone="gcc-ada gnatclean">
    371448            <primary sortas="b-gnatclean">gnatclean</primary>
     
    377454        <term><command>gnatfind</command></term>
    378455        <listitem>
    379           <para> is intended for locating definition and/or references to
    380           specified entities in a <application>GNAT</application> project.</para>
     456          <para>
     457            is intended for locating definition and/or references to
     458            specified entities in a <application>GNAT</application> project.
     459          </para>
    381460          <indexterm zone="gcc-ada gnatfind">
    382461            <primary sortas="b-gnatfind">gnatfind</primary>
     
    388467        <term><command>gnatkr</command></term>
    389468        <listitem>
    390           <para>is used to determine the crunched name for a given file, when
    391           crunched to a specified maximum length.</para>
     469          <para>
     470            is used to determine the crunched name for a given file, when
     471            crunched to a specified maximum length.
     472          </para>
    392473          <indexterm zone="gcc-ada gnatkr">
    393474            <primary sortas="b-gnatkr">gnatkr</primary>
     
    399480        <term><command>gnatlink</command></term>
    400481        <listitem>
    401           <para>is used to link programs and build an executable file.</para>
     482          <para>
     483            is used to link programs and build an executable file.
     484          </para>
    402485          <indexterm zone="gcc-ada gnatlink">
    403486            <primary sortas="b-gnatlink">gnatlink</primary>
     
    409492        <term><command>gnatls</command></term>
    410493        <listitem>
    411           <para>is the compiled unit browser.</para>
     494          <para>
     495            is the compiled unit browser.
     496          </para>
    412497          <indexterm zone="gcc-ada gnatls">
    413498            <primary sortas="b-gnatls">gnatls</primary>
     
    419504        <term><command>gnatmake</command></term>
    420505        <listitem>
    421           <para>is the <application>Ada</application> compiler, which performs
    422           compilaton, binding and linking.</para>
     506          <para>
     507            is the <application>Ada</application> compiler, which performs
     508            compilaton, binding and linking.
     509          </para>
    423510          <indexterm zone="gcc-ada gnatmake">
    424511            <primary sortas="b-gnatmake">gnatmake</primary>
     
    430517        <term><command>gnatname</command></term>
    431518        <listitem>
    432           <para>will list the files associated with a
    433           <application>GNAT</application> project.</para>
     519          <para>
     520            will list the files associated with a
     521            <application>GNAT</application> project.
     522          </para>
    434523          <indexterm zone="gcc-ada gnatname">
    435524            <primary sortas="b-gnatname">gnatname</primary>
     
    441530        <term><command>gnatprep</command></term>
    442531        <listitem>
    443           <para>is the <application>GNAT</application> external
    444           preprocessor.</para>
     532          <para>
     533            is the <application>GNAT</application> external preprocessor.
     534          </para>
    445535          <indexterm zone="gcc-ada gnatprep">
    446536            <primary sortas="b-gnatprep">gnatprep</primary>
     
    452542        <term><command>gnatxref</command></term>
    453543        <listitem>
    454           <para>is similar to <command>gnatfind</command>, but generates
    455           a full report of all cross-references.</para>
     544          <para>
     545            is similar to <command>gnatfind</command>, but generates
     546            a full report of all cross-references.
     547          </para>
    456548          <indexterm zone="gcc-ada gnatxref">
    457549            <primary sortas="b-gnatxref">gnatxref</primary>
Note: See TracChangeset for help on using the changeset viewer.