Possible path to bootstrap GNAT, the Ada compiler
Hello there, Recently, Alexandre Oliva kindly sent me this message, which I’m forwarding with his permission: > The other day, we talked on the Fediverse about bootstrapping GNAT in > Guix, and I wasn't aware of any way to accomplish that. I've had > occasion to talk to some AdaCore old-timers this week and learned about > two paths: > > SETL is the older one. It was the environment used to get GNAT from the > ground up. I'm pretty sure I've seen mentions thereof in Guix > discussions already, so I'll assume you already knew about it. > > The one that may be more promising for now, but that I'm not sure solves > the problem at all, is CCG. > https://docs.adacore.com/live/wave/gnat_ccg/html/gnatccg_ug/gnat_ccg/gnat_ccg.html > > IIUC, it's GNAT-llvm with the backend set to generate C code. So, with > a preexisting CCG, one could (presumably) translate GNAT to C, verify > the translation as much as desired, and use the result to build a > bootstrapping compiler, that could then be used as a starting point to > build recent and future versions of GNAT. Food for thought! Ludo’.
Re: Ada compiler
On Thu, Jan 19, 2017 at 03:23:47PM +0100, Danny Milosavljevic wrote: > Hi, > > would it be possible to provide the GCC Ada compiler? > > I would do it myself - however, it seems that GNAT requires GNAT which is a > bootstrapping problem. > > diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm > index cfd33f85a..ef4136fa4 100644 > --- a/gnu/packages/gcc.scm > +++ b/gnu/packages/gcc.scm > @@ -861,3 +861,18 @@ to be a tutorial of the language. Rather, it outlines > all of the constructs > of the language. Library functions are not included.") > (home-page "http://www.gnu.org/software/gnu-c-manual";) > (license fdl1.3+))) > + > +(define-public gnat-4.9 > + (custom-gcc gcc-4.9 "gnat" '("gnat") > + %generic-search-paths)) > + > +(define-public gnat-6 > + (custom-gcc gcc-6 "gnat" '("gnat") > + %generic-search-paths)) > + > +(define-public gnat > + ;; Note: Update this when GCC changes! We cannot use > + ;; (custom-gcc gcc "gnat" …) because that would lead to a package object > + ;; that is not 'eq?' with gnat-4.9, and thus 'fold-packages' would > + ;; report two gnat@4.9 that are in fact identical. > + gnat-4.9) > Sometimes I have to wonder, to me that just sounds like a fun bootstrapping problem that involves diving into the annals of computing history. I found https://people.debian.org/~lbrenta/debian-ada-policy.html this, not sure if it helps any. -- Efraim Flashner אפרים פלשנר GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted signature.asc Description: PGP signature
Ada compiler
Hi, would it be possible to provide the GCC Ada compiler? I would do it myself - however, it seems that GNAT requires GNAT which is a bootstrapping problem. diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index cfd33f85a..ef4136fa4 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -861,3 +861,18 @@ to be a tutorial of the language. Rather, it outlines all of the constructs of the language. Library functions are not included.") (home-page "http://www.gnu.org/software/gnu-c-manual";) (license fdl1.3+))) + +(define-public gnat-4.9 + (custom-gcc gcc-4.9 "gnat" '("gnat") + %generic-search-paths)) + +(define-public gnat-6 + (custom-gcc gcc-6 "gnat" '("gnat") + %generic-search-paths)) + +(define-public gnat + ;; Note: Update this when GCC changes! We cannot use + ;; (custom-gcc gcc "gnat" …) because that would lead to a package object + ;; that is not 'eq?' with gnat-4.9, and thus 'fold-packages' would + ;; report two gnat@4.9 that are in fact identical. + gnat-4.9)