public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [Ada] GCC Ada bootstrap suggestion
       [not found] ` <20080731154721.GA48769@adacore.com>
@ 2008-07-31 17:22   ` Daniel Kraft
  2008-07-31 17:24     ` Arnaud Charlet
  2008-07-31 17:27     ` Laurent GUERBY
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel Kraft @ 2008-07-31 17:22 UTC (permalink / raw)
  To: Arnaud Charlet; +Cc: gcc

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

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

* Re: [Ada] GCC Ada bootstrap suggestion
  2008-07-31 17:22   ` [Ada] GCC Ada bootstrap suggestion Daniel Kraft
@ 2008-07-31 17:24     ` Arnaud Charlet
  2008-07-31 17:27     ` Laurent GUERBY
  1 sibling, 0 replies; 3+ messages in thread
From: Arnaud Charlet @ 2008-07-31 17:24 UTC (permalink / raw)
  To: Daniel Kraft; +Cc: gcc

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

Right, so when building such system from scratch, doing a cross compiler is
not really the hardest part.

> 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 have no idea what your set up is.
I'd suggest using whatever environment you can cross compile from (which
includes any standard linux box, or any windows box).

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

Sure, there are some binaries available from libre.adacore.com and from some
other sites.

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

Not sure what 'my idea' is here. If you're talking about creating a C
generator, that does not fit into the 'quite easily doable' category.

Arno

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

* Re: [Ada] GCC Ada bootstrap suggestion
  2008-07-31 17:22   ` [Ada] GCC Ada bootstrap suggestion Daniel Kraft
  2008-07-31 17:24     ` Arnaud Charlet
@ 2008-07-31 17:27     ` Laurent GUERBY
  1 sibling, 0 replies; 3+ messages in thread
From: Laurent GUERBY @ 2008-07-31 17:27 UTC (permalink / raw)
  To: Daniel Kraft; +Cc: Arnaud Charlet, gcc

On Thu, 2008-07-31 at 18:42 +0200, Daniel Kraft wrote:
> 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...

Most  Linux distributions have been packaging GNAT binaries
for a while now so you just need to take any recent gcc/gnat (4.1 and
above) .deb or .rpm, extract the gcc/gnat binaries following the
documented way for the given packaging format (ar and tar for .deb, cpio
for rpm) and use them on your system to build your own GCC.

Sincerely,

Laurent


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

end of thread, other threads:[~2008-07-31 17:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4891C5CF.1090008@domob.eu>
     [not found] ` <20080731154721.GA48769@adacore.com>
2008-07-31 17:22   ` [Ada] GCC Ada bootstrap suggestion Daniel Kraft
2008-07-31 17:24     ` Arnaud Charlet
2008-07-31 17:27     ` Laurent GUERBY

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).