From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b2b519fb2d20e8d1 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.68.50.133 with SMTP id c5mr44473479pbo.2.1317363106851; Thu, 29 Sep 2011 23:11:46 -0700 (PDT) Path: lh7ni8076pbb.0!nntp.google.com!news1.google.com!goblin3!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Current statu of ASIS for GNAT 2012, please ? Date: Fri, 30 Sep 2011 08:11:45 +0200 Organization: A noiseless patient Spider Message-ID: <87fwjev9su.fsf@ludovic-brenta.org> References: <87sjngwoo6.fsf@ludovic-brenta.org> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="yfztnFHP37pao5F39tC/hw"; logging-data="20497"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/KjD0NM03Q2LUbuxD1D/Mf" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:MneH/Y5qt3HEubTXiVExLhrahNI= sha1:yJWNG/adZIL9IJanPHVupFjElEg= Xref: news1.google.com comp.lang.ada:18220 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Date: 2011-09-30T08:11:45+02:00 List-Id: Simon Wright writes on comp.lang.ada: > "Yannick DuchĂȘne (Hibou57)" 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.