GCC version for RTEMS 6? (Can Ada be used?)

Joel Sherrill joel at rtems.org
Wed Apr 27 18:22:22 UTC 2022


On Wed, Apr 27, 2022 at 1:12 PM Frank Kühndel <
frank.kuehndel at embedded-brains.de> wrote:

> Hi Karel,
>
> On 4/27/22 19:46, Karel Gardas wrote:
> > On 4/27/22 19:25, Frank Kühndel wrote:
> >> I do not need ADA but ADA may be worth considering. With GCC 10 one
> >> needed to have a GNAT 10 compiler installed to build the tools incl.
> >> --with_ada. I presume, one would need a GNAT 12 to build ADA with the
> >> GCC 12 sources? The current Fedora 35 has GNAT 11. All other distros I
> >> know of have GNAT 10 at best (I have not checked on tumbleweed yet).
> >> OpenSUSE may get ADA 12 from an unusual repro???
> >
> > On https://gcc.gnu.org/install/prerequisites.html there is a text:
> >
> > "
> > GNAT
> >
> >     In order to build GNAT, the Ada compiler, you need a working GNAT
> > compiler (GCC version 5.1 or later).
> >
> > ...
> > "
> >
> > is it outdated? If so, this would require some bugreport to gcc team?
>
> The text says too: "Other native compiler versions may work but this is
> not guaranteed and will typically fail with hard to understand
> compilation errors during the build."
>
> I tried last year to build the tools "--with_ada" on Ubuntu, OpenSUSE,
> Fedora, AlmaLinux and Debian. Moreover, I tried all versions of GNAT
> each of the OS offered "normal" users to install. Only GNAT 10 worked
> for me. Nothing else.
>
> The text in the chapter your cited can be understood this way: Compiling
> ADA with a native compiler of the same version will work. If the native
> compiler has a higher version it, is rather unlikely to work. If the
> native compiler has a lower version, it may work or not. So, I do not
> think you can file a bug with GCC.
>

When I more regularly built Ada, I always used the native Ada compiler
to build the same version of GCC I was going to use with RTEMS natively
with  Ada enabled. I didn't care what version of GCC/Ada was from the OS.

+ OS GCC/Ada ->
+  native using RTEMS GCC version
+ cross compiler for RTEMS with Ada

At least now you don't have to build RTEMS to have some headers and
libraries before you build Ada. Long ago, you had to build a cross C/C++
compiler first to build RTEMS, then use the RTEMS libraries as part of
building the toolchain with Ada.

Also as I mentioned to Sebastian privately, Ada is likely to build for
all targets except those where float and double are the same size. I
only remember sh as having a multilib like this but I feel like there
is another case.

As for trivia, GNAT/RTEMS first passed the ACVC formally in March
1997 on the sparc/erc32. It's been around a long time. ;)

--joel


> Greetings
> fk
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list