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

Steve Jones sjml at slohj.org
Mon Apr 11 09:35:37 PDT 2011


On Mon, 11 Apr 2011, bv wrote:

> On Sunday 10 April 2011 15:34:32 Steve Jones wrote:
> 
> > > 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.
> 
> suppose the host already has ada  (eg it  has say gcc-4.4.x with ada and I 
> want  to build a toolchain with gcc-4.5,x or gcc-4.6.x  with  ada enabled;  
> can this be done?  And if so how so )
> 

Current and recent gcc documentation suggests that cross gnat can should
be built by the same exact version of native gnat.  My experience is
that it can only be built with the same exact version, 4.4.3 will not
build 4.5.2 or 4.6.0.

> 
> > 
> > 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"
> > 
> 
> (Though strictly speaking slightly off topic how is this  extended to  
> gfortran  i.e. those who want to build gfortran in the toolchain as well ) { 
> When I made a half-hearted  attempt  some time ago  by adding  fortran  to --
> enable-languages="c,c++,fortran" in the final gcc compilation it compiled   
> but I was unable to install it }

Never had any problem with the other languages.

> 
> > 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
slml at slohj.org



More information about the Clfs-support mailing list