[yocto] gcc enable-languages

Paul Eggleton paul.eggleton at linux.intel.com
Fri Jun 14 09:35:08 PDT 2013


On Friday 14 June 2013 04:04:07 Dat Tran wrote:
> Anyone know of any clues that will help us? Thanks.
> 
> Edward Vidal <vidal.develone at ...> writes:
> > Dat Tran <dtran11 at gmail.com> wrote 
> > > Hello,
> > > 
> > > I want to add support for FORTRAN in my image.
> > > On target gcc -v shows --enable-languages=c,c++
> > > This needs to --enable-languages=c,c++,fortran.based on my host system.
> > > How does the variable FORTRAN in
> > 
> > /home/vidal/POKY/build032813_panda/poky/meta/recipes-devtools/gcc/gcc-
> > configure-common.inc get set?  Can this be done in the local.conf file?
> > 
> > > Does the FORTRAN ?= ",f77" this need to be FORTRAN ?= ",fortran" since
> > > we are building gcc4.7?

I have no direct knowledge of how to enable language support, but if you look 
at meta/recipes-devtools/gcc/gcc-4.7.inc you'll see it sets FORTRAN = "", 
which means setting it with = in local.conf won't work (since local.conf 
parsing comes before recipes) nor will the FORTRAN ?= setting in meta/recipes-
devtools/gcc/gcc-configure-common.inc. 

I'd suggest bbappending the appropriate gcc recipe and set FORTRAN there 
(which one depends on where you want to compile fortran code; gcc-cross would 
be the right one for building a recipe for fortran software to run on the 
target). You may need to set other variables in the bbappend as well, I'm not 
entirely sure.

An example of a layer that does something similar would be the meta-ada layer:

https://github.com/Lucretia/meta-ada

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the yocto mailing list