All of lore.kernel.org
 help / color / mirror / Atom feed
* Ada(GNAT) support in OE
@ 2011-02-06 10:16 Andrey Smirnov
  2011-02-24  2:38 ` Khem Raj
  0 siblings, 1 reply; 2+ messages in thread
From: Andrey Smirnov @ 2011-02-06 10:16 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 1199 bytes --]

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Crude attempt to add Ada support to OE --]
[-- Type: text/x-diff, Size: 1135 bytes --]

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Ada(GNAT) support in OE
  2011-02-06 10:16 Ada(GNAT) support in OE Andrey Smirnov
@ 2011-02-24  2:38 ` Khem Raj
  0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2011-02-24  2:38 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Andrey Smirnov

On Sun, Feb 6, 2011 at 2:16 AM, Andrey Smirnov <andrew.smirnov@gmail.com> wrote:
> 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

>
> 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

>  - 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

>
>  - 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.

>
> Thanks in advance for answering!
>
> Andrey Smirnov
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>
>



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-24  2:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-06 10:16 Ada(GNAT) support in OE Andrey Smirnov
2011-02-24  2:38 ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.