Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 110597 - Wish: Incorporate gnat (Ada compiler) into gcc ebuild
Summary: Wish: Incorporate gnat (Ada compiler) into gcc ebuild
Status: RESOLVED LATER
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-26 23:55 UTC by Dirk Heinrichs
Modified: 2015-05-21 08:57 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Heinrichs 2005-10-26 23:55:33 UTC
I wonder why there is a separate ebuild for GNAT while all other languages   
supported by GCC can be built together by means of USE flags for the gcc   
ebuild.  
  
Having gnat be part of the gcc ebuild would have some benefits:  
  
1) Versions of GNAT and the rest of GCC would be in sync (currently its  
   3.4.3 vs 3.4.4).  
2) Users could simply use gcc instead of gnatgcc to compile ada stuff.  
3) One ebuild less to maintain. 
4) GNAT is an official part of GCC anyway. 

Reproducible: Always
Steps to Reproduce:
Comment 1 Kevin F. Quinn (RETIRED) gentoo-dev 2005-10-27 13:30:51 UTC
There are several reasons for a separate gnat build; the main one is that
AdaCore considered Ada in the GCC main trunk before GCC 3.4 to be broken and
advised against its use (this is no longer the case, from GCC 3.4 on).

Having said that, I'd also like to see Ada supplied as part of our GCC since
AdaCore consider 3.4 to be suitable for student use (which is as far as they
ever went with gnat-3.15p for free use).  However, a couple of things:

1) SSP and GNAT don't play nice together in the 3.x incarnation of SSP
   (see bug #74347, although don't believe everything I've said there!)
   As of 4.1, an SSP implementation is part of mainline GCC, so it's probable
   they'll play together better then.

2) There's ongoing work upstream to tidy up cross-compilation in 4.1 so
   that it'll work the same as other compilers in GCC.  This may also involve
   tidy-ups of the actual Ada build process, which currently has a few
   foibles.

which means this will probably be easier when we get to 4.1 (obviously that's
won't be soon).
Comment 2 Dirk Heinrichs 2005-10-27 22:44:12 UTC
Thank you for the information. I'll look forward to 4.1, then :-) 
Comment 3 Mark Loeser (RETIRED) gentoo-dev 2005-12-18 11:03:50 UTC
So, from what I gather, we'll look into this later when it becomes feasible.
Comment 4 Kevin F. Quinn (RETIRED) gentoo-dev 2005-12-18 13:07:29 UTC
Yeah; assuming the Ada team don't strenuously object (haven't heard anything from them so I don't know what they think yet).

I think the problem with SSP is the same one affecting C++ (bug #74457), where my investigations lead me to believe it relates to passing non-scalar types by value, something not frequently done in C++ (where people prefer to use references everywhere), but is a frequent occurrence in Ada.
Comment 5 David Kredba 2008-12-23 19:57:34 UTC
Hello.

Am I wrong if I am thinking about two steps needed to get ada integrated with other frontends for gcc-4.3?

Make gnat, gnat-tools and gnatlib available in the stage1-3 snapshots
and write a few changes to the gcc ebuild file?

Thank you.

(I really like to have Ada frontend integrated with default gcc).
Comment 6 George Shapovalov (RETIRED) gentoo-dev 2008-12-23 20:39:18 UTC
Yes. 
The major thing is that gnat requires an Ada-enabled compiler in order to be built. So, it has to be properly bootstrapped. Please take a look at the gnatbuild.eclass for more details. In short, in the process of building gnat it pulls in prepared bootstrap compiler and carefully sets the environment to use that one and isolate system gcc during the build. There are few more particulars - with having two "separate" Ada compilers provided by ACT and FSF, plus some SLOTting going on - some of it related to gcc backend, some of it related to Ada-2005 having been recently released.

On top of technical issues there is that observation of needing Ada-enabled compiler. So, making Ada a part of sys-devel/gcc would require us to ship Ada-enabled gcc by default and pretty much prohibiting -ada setting for it. I am not sure this will fly with toolchain people. Plus, the actual transition may not be so trivial, I guess we'd have to wait for another gentoo release (and likely more than one) - to get the Ada-enabled gcc out. In parallel we would anyway have to come up with some backwards compatibility plan, to keep gcc and gnat from breaking in transition..

And, in the end, we would only be able to collite gnat-gcc with gcc. gnat-gpl would have to live on as a separate package (they use their own gcc backend that is usually 1-2 major versions behind, definitely not synced with gcc and is certainly different form FSF's Ada). This, in turn, would require redoing the (gnat) multilib logic in gnat.eclass, in order to provide what it does now..