This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.
> 
>  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

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.

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 know svn much but if you do I assume you could create an ada-arm
branch for this porting effort.

>   I confess I know little about Ada except that it has a formal syntax
> longer than the bible...

Ah religions :)

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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]