Ada Language Support in sparc-rtems-gdb

Ralf Corsepius ralf_corsepius at rtems.org
Fri Sep 24 08:29:14 UTC 2004


On Thu, 2004-09-23 at 20:48, Per Dalgas Jakobsen wrote:
> > FSF/GNAT in general is in poor shape (newer versions aren't even
> > buildable) and so is Ada support in RTEMS.
> 
> Hmm, I have test-builded the 3.4.x series with C and Ada support on a
> i386-Linux system, and of 3.4.1 Ada passed the ACATS tests with flying
> colors (that goes for 3.4.2 as well - I don't know about the latest 3.4.3
> prereleases though).
I.e. you probably built a native GNAT using a previously installed very
recent GCC.

>  However I must admit that I have not checked which
> tests are actually included/excluded from the tests, but Ada is definitely
> buildable and runnable.
Try cross-building GNAT.

With GCC versions between 3.0 and ~3.2 this was only possible applying a
couple of nasty building tricks.

Since some time around gcc-3.2.0 through gcc-3.4.0 (I haven't tried
3.4.[1|2|3pre] cross-build gnatlib has been impossible, because GNAT
mixes up target and build-host configuration, i.e. in general,
cross-building GNAT has been (is?) impossible.

However, on some build-hosts cross-building to some targets (in
particular cross-building to linux-targets) succeeds by random accident,
because, build-host and target resemble sufficiently.
For RTEMS this does not apply.

Since gcc-3.3.x, cross-building GNAT failed because GNAT's configuration
was trying to use the native tools for cross-building. In some
situations (e.g. when building for different but similar OSes for same
architecture, e.g. i686-cygwin -> i386-rtems), this succeeds, bogusly
giving you the impression building succeeds, despite almost everything
inside and underneath is broken.

Finally there is the infamous (GNAT-1) dependency of building GNAT
(Build GNAT requires to have native GNAT installed which is no older tha
the version to be build - 1).
I for one have not been able to build Joel's rtems-gnat-toolchains for
ages (I am currently using FC2) and therefore have not been able to test
any RTEMS/Ada related code in RTEMS sources.

The cause for all this is the GNAT configuration and Makefiles being
used in GCC to be fundamentally bugged and broken. Having tried to help
the FSF/GNAT maintainers to fix this, had not been the most pleasant
experience of my life.

> > So if you should have managed to *run* any RTEMS Ada code you're
> > probably further than anybody else on this planet ;)
> 
> I would like to help make it work with gcc-3.4.2. If I could just get a
> couple of hints of just exactly what I should look out for, integrating
> RTEMS with GCC, I would certainly give it a try.
> 
> I hope I'm eventually able to make two toolchains: a Cygwin/RTEMS and an
> i686-Linux/RTEMS, with Ada and C support, but as stated, I don't know how to
> get on with it.
> 
> In addition, I hope to get an ACATS up and running in a Windows/Bochs/RTEMS
> environment, so it can be verified somewhat.

Ralf





More information about the users mailing list