Building Ada for RTEMS

Joel Sherrill joel at rtems.org
Fri Jan 25 14:53:57 UTC 2019


On Wed, Jan 23, 2019 at 12:22 AM Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> Hello Joel,
>
> On 22/01/2019 23:04, Joel Sherrill wrote:
> > Hi
> >
> > I put this on hold for the Christmas holidays and wanted to post what
> > worked and didn't for me. This is on Centos 7 building C, C++ and Ada
> > to target sparc-rtems5 using the RSB master.
> >
> > I tried various gcc versions with Ada support. I ensured which gcc I
> > was using by putting it at the front of my PATH and doing "gcc
> > --version" before I started the RSB build.
> >
> > + RSB build fails with base gcc from CentOS. It is gcc 4.8.5
> > + RSB build fails with gcc from git master.
> > + RSB build fails with gcc 8.2.0
> > + RSB build succeeds with gcc 7.4.0
> > Notice that the build succeeds when using a native version that
> > matches the version being built cross. This is in keeping with
> > long-standing advice.
>
> the current situation for GCC 9 is less good. I was not able to build it
> on Debian:
>
> https://gcc.gnu.org/ml/gcc/2019-01/msg00141.html
>
> On openSUSE it worked.
>

I ended up with a lot of tool fail emails to the build@ mailing list so I
wanted
to come back and summarize.  Using a locally built gcc 7.4.0, I managed
to build Ada crosses for the following targets using the RSB:

aarch64-rtems5 arm-rtems5 bfin-rtems5 i386-rtems5 m68k-rtems5
microblaze-rtems5 mips-rtems5 moxie-rtems5 powerpc-rtems5
sparc64-rtems5 sparc-rtems5 v850-rtems5 x86_64-rtems5

That leaves epiphany, lm32, nios2, or1k, riscv, and sh as not building.

riscv is using a gcc with a hash so it may be hard to get a gnat
that matches. Ignoring that since it may settle out in the future.

sh has always had issues with single precision float and Ada (and Fortran).

epiphany fails with an error building targetext.c. No reason to think
anyone cares about this target and Ada anyway. It is likely too
small to support Ada.

nios2 also fails building targetext.c. Maybe both it and epiphany are
not doing something 100% right in the target code.

or1k is using a gcc hash so again hard to get a matching native gcc.

In summary, the target code has to really following the rules,
not having double precision is an issue, and it needs to be on
a "real" gcc version to be worth building a matching native
Ada.

I'm going to disable Ada and enable Fortran and see how that
goes over the weekend.

--joel


> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany
> Phone   : +49 89 189 47 41-16
> Fax     : +49 89 189 47 41-09
> E-Mail  : sebastian.huber at embedded-brains.de
> PGP     : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20190125/6761d912/attachment-0002.html>


More information about the devel mailing list