Best version of gnat-4.X port to start a port to arm eabi?

Joel Sherrill joel.sherrill@oarcorp.com
Fri May 2 13:06:00 GMT 2008


Laurent GUERBY wrote:
> On Thu, 2008-05-01 at 19:10 +0100, Martin Guy wrote:
>   
>> Hi!
>>   I'm about to lower the gangplanks to get a native gnat on ARM EABI
>> through an unholy succession of cross-compilers, with the object of
>> getting gnat-4.1 4.2 and 4.3 into the new Debian port for ARM EABI.
>>
>>     
Do you mean the gcc target is arm-eabi?

FWIW that's my assumption below.
>>  The only arm-targetted gnat I could find is adacore's Windows
>> cross-compiler for xscale (gag retch) but at least that suggests that
>> it's possible, and the Debian ADA person made optimistic noises when I
>> asked, but I thought I'd better consult the oracle first :)
>>   I've seen the recommendation about using the same version of gnat as
>> the version you're cross-compiling, and I gather that each version
>> will natively compile later versions ok, but maybe not the other way
>> round, so I'm assuming that I need to use an existing x86-native
>> gnat/gcc to make x86->arm-cross of the same version, then use that
>> canadianly to make arm-native, then use that to build the debian-gnat
>> package or the same and later versions.
>>
>>   At the moment I am assuming to start with 4.1 to get all 3, but I
>> know that gcj only works on ARM EABI from 4.3, and C++ still has
>> problems with exceptions (try-catch) on EABI, maybe less so in later
>> versions (?) So, before I set out on the journey, does anyone know of
>> gnat-reasons or ARM EABI-reasons that would make it wiser to start
>> with a later version than 4.1?
>>     
>
> Joel Sherrill of RTEMS fame managed to get working Ada for a cross
> compiler to arm-rtems4.8, for instructions see here:
>
> http://www.rtems.com/wiki/index.php/RTEMSAda
>
>   
I have build 4.2.3 and SVN trunk and maybe 4.3.0 for
arm-rtems4.9.  I don't remember if I have run acats
on it though.  I usually run on i386, sparc, powerpc,
and mips.  I haven't quite gotten skyeye to the point
I trust running testsuites on it completely automated
> The main issue for Ada with respect to other GCC languages
> is the lack of support of "multilibs". I don't know much
> about multilibs so I can't tell you if this will be a problem
> for native arm-debian porting. If you're familiar with multilibs
> I assume Joel would be very happy to resume his efforts to get
> Ada multilib'ed.
>
>   
This has been on my wish list a long time. :-D
> As for the version used I would start from trunk and not from older
> versions, we're in "stage 2" so we're supposed to be not that unstable
>
> http://gcc.gnu.org/develop.html
>
> As you read, you always have to be careful to bootstrap a native
> compiler first and then use it exclusively (avoid mixing at all cost the
> system Ada compiler or an older one). This also has the advantage
> that you make sure first your base Ada compiler is in working shape
> before porting it.
>
> I don't think you need canadian cross, in the old times there were
> targets in the Ada Makefile to help moving from a cross to a native
> compiler. I don't know if they're still around, may be Arnaud
> or Eric could help you here.
>   
I don't think he needs this either.  Just build a native
compiler with Ada of the same version you are building
cross.  It makes things more reliable.  Sometimes
the native versus cross versions are far enough apart to
cause problems and this just avoids the issue entirely.
> I don't know svn much but if you do I assume you could create an ada-arm
> branch for this porting effort.
>
>   
I don't think that is necessary.   arm-eabi should be very close
to working (with newlib as the C library).  You will not have
tasking, networking, etc.  If you want that functionality,
arm-rtems is the answer.  You (optionally) get the same basic
environment with tasking, gnat sockets, file systems, etc.
>>   I confess I know little about Ada except that it has a formal syntax
>> longer than the bible...
>>     
>
> Ah religions :)
>
>   
But the Ada LRM is better specified than the Bible and
doesn't have as many ambiguities. LOL! 

And programming language wars are nothing compared
to their religious couterparts.
> If you want to compile on a bi-quad Xeon at 3GHz with 16GB of RAM (and
> many other machines) running debian you can apply for an account on the
> GCC Compile farm:
>
> http://gcc.gnu.org/wiki/CompileFarm
>
> Joel and I have accounts there so it might help. I did run once
> debian-sparc under qemu, I assume debian-arm would do too.
>
> Hope this helps,
>
> Laurent
>
>
>   


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill@OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985




More information about the Gcc mailing list