Patchwork Ada(GNAT) support in OE

login
register
mail settings
Submitter Andrey Smirnov
Date Feb. 6, 2011, 10:16 a.m.
Message ID <87r5blzcgl.fsf@gmail.com>
Download mbox | patch
Permalink /patch/463/
State Deferred
Delegated to: Khem Raj
Headers show

Comments

Andrey Smirnov - Feb. 6, 2011, 10:16 a.m.
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

Patch

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
--- /home/ndreys/Workspace/oe/sources/openembedded/recipes/gcc/gcc-configure-common.inc	2011-02-04 20:34:08.841641002 +0600
+++ /home/ndreys/Workspace/oe/sandbox/recipes/oe-ada/gcc-configure-common.inc	2011-02-05 20:39:08.857900000 +0600
@@ -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