Files
glfs/archive/gnat-binary.xml

153 lines
5.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../../general.ent">
%general-entities;
<!ENTITY gnat-binary-amd64-download-http "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-&gcc-version;-1/gnat-x86_64-linux-&gcc-version;-1.tar.gz">
<!ENTITY gnat-binary-amd64-download-ftp " ">
<!ENTITY gnat-binary-i686-download-http "https://community.download.adacore.com/v1/c5e9e6fdff5cb77ed90cf8c62536653e27c0bed6?filename=gnat-gpl-2014-x86-linux-bin.tar.gz&amp;rand=1247">
<!ENTITY gnat-binary-i686-download-ftp " ">
]>
<sect1 id="gnat-binary" xreflabel="Binary GNAT">
<?dbhtml filename="gnat-binary.html"?>
<title>Binary GNAT</title>
<indexterm zone="gnat-binary">
<primary sortas="a-gnat-binary">gnat-binary</primary>
</indexterm>
<sect2 role="package">
<title>About GNAT</title>
<para>
Ada is a modern programming language designed for large, long-lived
applications &mdash; and embedded systems in particular &mdash; where
reliability and efficiency are essential. It has a set of unique technical
features that make it highly effective for use in large, complex and
safety-critical projects.
</para>
<para>
The compiler and associated tools on this page are known as the
GNAT technology, developed by the Adacore
company, using the GCC backend. Since
parts of the Ada compiler are written in Ada, there is a circular
dependency on an Ada compiler. The instructions below install a
binary compiler. You do not need to do that if you already have built
GNAT tools. The next section covers how to
build GNAT once the circular dependency is satisfied.
</para>
<itemizedlist spacing="compact">
<listitem>
<para>
Binary Download (x86): <ulink url="&gnat-binary-i686-download-http;"/>
</para>
</listitem>
</itemizedlist>
<itemizedlist spacing="compact">
<listitem>
<para>
Binary Download (x86_64): <ulink url="&gnat-binary-amd64-download-http;"/>
</para>
</listitem>
</itemizedlist>
<note>
<para>
If you are currently in a TTY and relying on command-line
tools to obtain software, it is recommended to open the
x86 GNAT download link with
<ulink url="https://www.linuxfromscratch.org/blfs/view/svn/basicnet/lynx.html">
lynx</ulink> or
<ulink url="https://www.linuxfromscratch.org/blfs/view/svn/basicnet/links.html">
links</ulink>. You can use
<xref linkend="wget"/> but not <xref linkend="curl"/>.
If you do end up using wget
regardless of the recommendation against it, please run
the following the command before unpacking:
</para>
<screen><userinput>mv c5e9e6fdff5cb77ed90cf8c62536653e27c0bed6\?filename\=gnat-gpl-2014-x86-linux-bin.tar.gz\&amp;rand\=1247 \
gnat-gpl-2014-x86-linux-bin.tar.gz</userinput></screen>
</note>
<important>
<para>
If you are doing multilib, just download the x86_64
GNAT binary tarball.
The instructions in the next section for multilib will
work as expected and GCC
will continue to have multilib support.
</para>
</important>
</sect2>
<sect2 role="installation">
<title>Installation of GNAT Binaries</title>
<para>
Install the x86_64 GNAT
binaries by running the following commands as the
<systemitem class="username">root</systemitem> user
while still in the directory the tarball is in:
</para>
<screen role="root"><userinput>export GNATTBPATH=$PWD &amp;&amp;
cd /opt &amp;&amp;
tar -xpvf "$GNATTBPATH"/gnat-x86_64-linux-&gcc-version;-1.tar.gz &amp;&amp;
ln -sv gnat-x86_64-linux-&gcc-version;-1 gnat &amp;&amp;
chown -R root:root gnat &amp;&amp;
cd $GNATTBPATH &amp;&amp;
unset GNATTBPATH</userinput></screen>
<para>
Or install the x86 GNAT
binaries by running the following commands as the
<systemitem class="username">root</systemitem> user
while still in the directory the tarball is in:
</para>
<screen role="root"><userinput>export GNATTBPATH=$PWD &amp;&amp;
cd /opt &amp;&amp;
tar xpvf "$GNATTBPATH"/gnat-gpl-2014-x86-linux-bin.tar.gz &amp;&amp;
ln -sv gnat-gpl-2014-x86-linux-bin gnat &amp;&amp;
chown -R root:root gnat &amp;&amp;
cd $GNATTBPATH &amp;&amp;
unset GNATTBPATH</userinput></screen>
<para>
Now adjust the <filename>PATH</filename> variable so
the GNAT software can be found
and used:
</para>
<screen><userinput>PATH_HOLD=$PATH &amp;&amp;
export PATH=/opt/gnat/bin:$PATH_HOLD</userinput></screen>
<para>
Ensure <command>ld</command> and <command>as</command>
from the GNAT package aren't
used as to prevent issues with aging by issuing the
following as the <systemitem class="username">root
</systemitem> user:
</para>
<screen><userinput>find /opt/gnat -name ld -exec mv -v {} {}.old \; &amp;&amp;
find /opt/gnat -name as -exec mv -v {} {}.old \;</userinput></screen>
</sect2>
</sect1>