Skip to contentSkip to conversation

Ada(GNAT) support in OE

PATCH Andrey Smirnov 2 participants 2 messages Feb 6, 2011 – Feb 24, 2011

lore
Share & tools
lore
#0 lore raw

Hi, everyone!

Bitbake-1.10.2 and OE from git here and I am trying to add some rudimentary support of Ada language(GNAT) to OE(for now it is just building a cross compiler)

As of this moment I managed to build some semblance of a cross compiler (it builds simple "hello world" executable) by creating a verbatim copy of gcc-cross_4.4.4.bb, all files it depends upon to my local recipes directory and making slight modification to gcc-configure-common.inc (see modifications.patch) but this rises a couple of questions:

- Would anyone be interested in adding such changes? If so, am I going in right direction or is there another more elegant and preferred way to add compiler support?

- Ada compiler bootstrapping process requires host system to have working Ada compiler implementation, how can this, and should it all be reflected in the recipe?

- Provided I am successful in my endeavor, writing BitBake recipe for Ada program would require gnatmake, gnatbind, gnatlink tools to be accessible through some variables(the same way C compiler is available via CC) how can this be implemented?

Thanks in advance for answering!

Andrey Smirnov

home/ndreys/Workspace/oe/sandbox/recipes/oe-ada/gcc-configure-common.inc renamed from home/ndreys/Workspace/oe/sources/openembedded/recipes/gcc/gcc-configure-common.inc +7 -1
diff -u -w /home/ndreys/Workspace/oe/sources/openembedded/recipes/gcc/gcc-configure-common.inc /home/ndreys/Workspace/oe/sandbox/recipes/oe-ada/gcc-configure-common.inc
@@ -15,6 +15,12 @@
 OBJC_mips ?= ""
 OBJC_mipsel ?= ""
 OBJC ?= ",objc"
+ADA ?= ",ada"
+ADA_arm ?= ""
+ADA_armeb ?= ""
+ADA_mipsel ?= ""
+ADA_sh3 ?= ""
+
 # disable --enable-target-optspace for powerpc SPE
 # at -Os libgcc.so.1 creates references into
 # hidden symbols in libgcc.a which linker complains
@@ -23,7 +29,7 @@
 OPTSPACE = "${@base_contains('TARGET_ARCH', 'powerpc', '', '--enable-target-optspace',d)}"
 # gcc 3.x expects 'f77', 4.0 expects 'f95', 4.1 and 4.2 expect 'fortran'
 FORTRAN ?= ",f77"
-LANGUAGES ?= "c,c++${OBJC}${FORTRAN}${JAVA}"
+LANGUAGES ?= "c,c++${OBJC}${FORTRAN}${JAVA}${ADA}"
 
 EXTRA_OECONF_BASE ?= ""
 EXTRA_OECONF_PATHS ?= ""

Diff finished. Sun Feb 6 15:19:32 2011

#1 lore raw
Quoted 5 lines · Andrey Smirnov

Hi, everyone!

Bitbake-1.10.2 and OE from git here and I am trying to add some rudimentary support of Ada language(GNAT) to OE(for now it is just building a cross compiler)

OK

Quoted 11 lines

As of this moment I managed to build some semblance of a cross compiler (it builds simple "hello world" executable) by creating a verbatim copy of gcc-cross_4.4.4.bb, all files it depends upon to my local recipes directory and making slight modification to gcc-configure-common.inc (see modifications.patch) but this rises a couple of questions:

 - Would anyone be interested in adding such changes? If so, am I going in right direction or is there another more elegant and preferred way to add compiler support?

it would be interesting however I think this should be a default optout feature with possibility to optin
so probably what you have is an ok approach. Somehow we should have a global knob controlled
by distros to specify what language environments to enable

Quoted 3 lines

 - Ada compiler bootstrapping process requires host system to have working Ada compiler implementation, how can this, and should it all be reflected in the recipe?

yeah those are complications either you can demand those from build distro by adding them to required_software in sanity class or you can provide a -native recipe and then DEPEND on that one first one would be easier

Quoted 5 lines

 - Provided I am successful in my endeavor, writing BitBake recipe for Ada program would require gnatmake, gnatbind, gnatlink tools to be accessible through some variables(the same way C compiler is available via CC) how can this be implemented?

they would be in bitbake.conf or base class.

Quoted 11 lines

Thanks in advance for answering!

Andrey Smirnov

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel