From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: Current statu of ASIS for GNAT 2012, please ?
Date: Fri, 30 Sep 2011 08:11:45 +0200
Date: 2011-09-30T08:11:45+02:00 [thread overview]
Message-ID: <87fwjev9su.fsf@ludovic-brenta.org> (raw)
In-Reply-To: m21uuz10b6.fsf@pushface.org
Simon Wright writes on comp.lang.ada:
> "Yannick Duchêne (Hibou57)" <yannick_duchene@yahoo.fr> writes:
>
>> Ludovic, I finally did what I should have tried first: simply use the
>> ASIS source from http://libre.adacore.com/libre/download/ (shame on
>> me) It compiled fine with this freshly compiled GCC+GNAT-4.6
>
> Did it actually _work_?
>
> I managed to build ASIS GPL 2010 with GCC 4.5.0, and get it to work,
> without a huge amount of trouble; my notes say
>
> ASIS for GNAT reads .adt files, which contain the binary
> representation of the program. This includes numbers that correspond
> to syntax elements.
>
> These numbers are determined for a particular compiler release by
> particular compiler components, Sinfo and Snames, so to make ASIS
> work you need to include the appropriate files from your compiler.
> Sinfo is just the source files sinfo.ads, sinfo.adb. Snames is
> created from template files snames.ads-tmpl and snames-adb.tmpl.
>
> As well as this, you'll need to copy gnatvsn.ads from your compiler,
> and edit gnatvsn.adb to match (for example, GNAT GPL 2010 source
> includes GNATPro as a build possibility, which isn't allowable in the
> FSF sources for GCC 4.5.0).
>
> So, to adapt ASIS GPL 2010 for use with GCC 4.5.0, in
> asis-2010-src/gnat/:
> * replace sinfo.ad[bs] by gcc-4.5.0/gcc/ada/sinfo.ad[bs]
> * replace snames.*-tmpl by gcc-4.5.0/gcc/ada/snames.*-tmpl
> * replace gnatvsn.ads by gcc-4.5.0/gcc/ada/gnatvsn.ads
> * edit gnatvsn.adb to remove the 'gnatpro' choices, not in the .ads
>
> The same process didn't work for ASIS GPL 2010 or 2011 vs GCC 4.6.0,
> because of Tree_Format_Error exceptions; not surprising for 2011,
> because Tree_IO.ASIS_Version_Number is 26 for 2011 and 23 for 4.6.0, but
> unexpected for 2010 whose ASIS_Version_Number is also 23.
>
> If I need to do ASIS things, it's easiest to use the matching GNAT GPL!
Debian solves that problem by introducing libgnatvsn, a library compiled
from GCC sources and containing gnatvsn.ads, sinfo.ad[bs], snames.ad[bs]
and everything they depend on. libasis is compiled against libgnatvsn.
AFAICT, asis 2010 works with gnat-4.6 on Debian but I'd like to have a
good test case. Simon, could you explain how you got the
Tree_Format_Error exceptionss so I can try the same thing that you did?
--
Ludovic Brenta.
next prev parent reply other threads:[~2011-09-30 6:11 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-28 9:56 Current statu of ASIS for GNAT 2012, please ? Yannick Duchêne (Hibou57)
2011-09-28 12:10 ` Yannick Duchêne (Hibou57)
2011-09-28 17:40 ` Ludovic Brenta
2011-09-28 21:21 ` Yannick Duchêne (Hibou57)
2011-09-29 6:44 ` Ludovic Brenta
2011-09-29 18:39 ` Yannick Duchêne (Hibou57)
2011-09-30 13:23 ` Ludovic Brenta
2011-09-30 22:11 ` Yannick Duchêne (Hibou57)
2011-10-01 9:11 ` Ludovic Brenta
2011-10-01 14:17 ` Yannick Duchêne (Hibou57)
2011-10-01 16:12 ` Ludovic Brenta
2011-10-01 16:34 ` Ludovic Brenta
2011-10-02 18:41 ` Yannick Duchêne (Hibou57)
2011-10-03 7:07 ` Ludovic Brenta
2011-10-02 18:58 ` Yannick Duchêne (Hibou57)
2011-10-02 10:29 ` Georg Bauhaus
2011-10-02 16:38 ` Ludovic Brenta
2011-10-02 17:44 ` Georg Bauhaus
2011-10-02 18:28 ` Ludovic Brenta
2011-09-29 12:57 ` Stephen Leake
2011-09-29 18:46 ` Yannick Duchêne (Hibou57)
2011-09-30 10:10 ` Stephen Leake
2011-09-30 13:29 ` Ludovic Brenta
2011-09-29 21:54 ` Simon Wright
2011-09-30 6:11 ` Ludovic Brenta [this message]
2011-10-01 6:39 ` Simon Wright
2011-10-01 9:01 ` Ludovic Brenta
2011-10-15 13:50 ` Simon Wright
2011-10-15 14:05 ` Ludovic Brenta
2011-10-15 14:36 ` Simon Wright
2011-10-15 2:21 ` Lucretia
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox