This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Ada] GCC Ada bootstrap suggestion


Arnaud Charlet wrote:
For half a year now, I've been working on the GCC Fortran front-end; but I'm also quite interested in Ada as a language. However, I don't quite like the idea that one needs a working Ada compiler to bootstrap the Ada front-end. Well, it's the same with a C compiler to bootstrap GCC, but anyways :D

Also, at some point GCC will require C++ to bootstrap, so the same issues will arise there.

Well, the point is, I'm using a GNU/Linux system I mainly built from scratch, so there's no easy package-installer available for me and I've to built everything from source (which is, of course, "my own fault"). My system started out with a gcc C compiler, so I could easily bootstrap and install any newer GCC, including C++, Java or Fortran, as I wanted.


And even if gcc eventually moves on to C++, there will still be an older gcc I could bootstrap with a C compiler only and use that version's C++ compiler for the newest release.

With Ada, however, I'm at least not aware of another compiler I could bootstrap using my C compiler and use that one subsequentally to bootstrap GNAT. At the moment, I'm trying to bootstrap it using a binary GNAT 3.15p which was also somewhat hard to find on the net; and this does not quite work out at the moment, as the included gcc (2.8.1 IIRC) is far too old and buggy to build even gcc-3.1 with Ada support for bootstrapping the gcc-4.3 release. At least I don't quite find it an easy task to get a recent GNAT build from source...

I had the idea, based upon how gfortran works, that one could implement some basic AST-to-C translation component (it would be quite easy for the Fortran AST) that could then be used as a very basic Ada-to-C compiler re-using most of the existing Ada compiler. With this new tool, one could compile the Ada front-end sources to C files.

Sure, this could theoretically be done, but so far, there has not been much interest in doing that, given that cross compiling GCC is always available as an option.

So you think I should boot into Microsoft Windows, install the cygwin GNAT binaries and use those to cross-compile gcc-4.3 for my GNU/Linux system? Or at least boot up a live-cd that has the option to use a package installer for an existing GNAT and compile GCC with that? At least to me this sounds somewhat disgusting.


I believe it would be at least some nice idea to make some binary-distributions easily available (and in a place they can be found).

If I give my idea some further thoughts (and finally manage to build GNAT on my system) and it seems to be quite easily doable, are you interested in results of my research and experiments?

Cheers,
Daniel

--
Done:     Arc-Bar-Sam-Val-Wiz, Dwa-Elf-Gno-Hum-Orc, Law-Neu-Cha, Fem-Mal
Underway: Cav-Dwa-Law-Fem
To go:    Cav-Hea-Kni-Mon-Pri-Ran-Rog-Tou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]