GNAT module

Simon Brenner simon.brenner at home.se
Sun Jan 29 04:00:24 UTC 2006


Hi lunar devs!

I've been working on a GNAT module based on gcc 4.0.2, and have a few 
questions about how the special parts of GNAT compilation/installations 
should be done.

Nowadays, with Ada support in the gcc main source code tree, the 
difference isn't all that large between building an Ada-capable compiler 
and building an ordinary gcc compiler, so the gnat 4.0 module should 
really be a part of the gcc 4.0 module.

However, building GNAT requires a working installation of GNAT (GNAT is 
written in Ada! :P), so my gnat module is set to download a binary gcc 
installation (for now, I've settled for fedora core's 4.0.2-8 rpm 
packages) - this binary installation is "installed" into the source 
directory for the duration of the compilation and used to compile all 
Ada parts.

Thing is, this extra 15 megs or so of packages is only needed when 
making Ada, so even though the exact same module could easily build any 
set of languages (as set during configuration), like the ordinary gcc 
modules, these extra packages should preferably only be downloaded when 
Ada language support has been selected.

Which brings us to the questions:
* Is it possible to add conditionals to the DETAILS file so that the 
extra SOURCE* variables are only set when the ada language is selected?

If that's possible, this one module would be perfectly capable of 
building ada-capable gcc's as well as ada-incapable (i.e. standard) 
ones. In that case, this'd better be a generic gcc4 module instead of a 
gnat module.

* The question about integration is still left - to actually use the 
compiler in its new location (I've set it to install into 
/opt/lunar/gnat/ - I guess the gcc4 module would install into 
/opt/lunar/gcc/4) - you have to modify your PATH, setting the new bin 
directory as the first path and your LD_LIBRARY_PATH to find the new 
dynamic libraries. In the future, it might be nice to add gcc4 as an 
option to the gcc2/3 compiler choice too.

Ah, Well, here's the GNAT module - attached as a patch similar to what 
the lvu submit script does.

// Simon
PS. Sorry for all the text :-)

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gnat.patch
Url: http://foo-projects.org/pipermail/lunar/attachments/20060129/922dd306/gnat.ksh


More information about the Lunar mailing list