[Clfs-support] Is a Cross-Toolchain with Ada Possible using CLFS Procedure?

Steve Jones sjml at slohj.org
Sun Apr 10 07:34:32 PDT 2011


On Sat, 09 Apr 2011, Layne Cook wrote:

> My goal is to create a GNU-based cross-toolchain for powerpc with Ada
> and C front-ends.
> 
> I've successfully created a powerpc toolchain using CLFS book 1.1.0. I
> then tried to add Ada as a language by adding --enable-languages=c,c
> ++,ada to the final step (5.9 Cross GCC-4.2.4 - Final, with shared
> libraries).  I'm using my distribution's native gnat tools (Ubuntu 10.10
> with gcc 4.4.5 and GNATBIND 4.4.5 20100909).
> 
> I ran into some Ada problems which I was able to patch, then I hit one
> that just won't budge.  I'm not an Ada programmer so I can't understand
> what it doesn't like about the source.
> 
> But my question is more general.  Just this: Has anyone used the CLFS
> procedure to create a cross-compiler with an Ada front end?  I'd really
> like to discuss how this could best be done with someone.  I've tried
> doing this "by hand" for a few months without success.  I got excited
> when I saw the CLFS website, and it's been helpful, but the Ada stuff
> still brings me to my knees.
> 
> I've found nothing in the mail archives. Anyone willing to consult about
> this?  
> 

I've done it before.  First you need a native gnat of the same exact
version of your cross compiler. So you need to install 4.2.4 into /opt
or /usr/local and put that into your path before the system gcc.

Add ada to --enable languages like you did to Cross Gcc shared.

There are some tricks to build the /tools/gcc.  Yout need to add 

export GNATMAKE="${CLFS_TARGET}-gnatmake"
export GNATBIND="${CLFS_TARGET}-gnatbind"

to build variables in chapter 6. Don't forget to add them to .bashrc.
Ada should build in chapter 6 and 7.  There may be a few other issues
that I can't remeber, but those are the tow big issues.  gnat cross wont
build except from the same version and the gnat native has to find
gnatmake and gnatbind cross.


-- 
Steve Jones
sjml at slohj.org



More information about the Clfs-support mailing list