Stephane Carrez <[email protected]> writes: > Having a gnat-10 and gnat-11 package can bring confusion to users. Most Ada > libraries > will be targeted at gnat-11 and they won't work with gnat-10.
Agreed. > Then, what about providing an asis-gcc package that only provides the > gcc+gnat compiler > renamed to whatever we want to fit the asis implementation as suggested by JP. Nicolas tries to leverage the existing work that was done to package gcc-10, which seems the obvious thing to do. But for ASIS we don't need any cross-compilation targets, we don't need any language besides Ada, and we don't want to find that the Debian GCC maintainers want to remove gcc-10 from Debian (which they will do, eventually). So, like Stéphane I think the solution is proper packaging of a minimal asis-gcc that we control, that can only produce tree files and not object files (and I suspect asis-tools from GNAT Pro is just that, in fact). This packaging and future maintenance is quite a big thing and I don't expect Nicolas to do it on his own. I suggest that all people who want ASIS in Debian step up to this challenge. > One point that is not clear for me concerns the Ada libraries that such > compiler/tree > generator would access. By "Ada libraries" I assume you mean "Debian packages providing precompiled Ada libraries", because if you mean "source files installed in the user's $HOME directory" then Debian has no control over them. The "asis-gcc" compiler/tree generator would access the same library source files as the gnat-11 compiler. However the Library_ALI_Dir and Library_Dir declared in the .gpr file for the library belong to a Debian package, and to the root user, and they do not contain any tree files. Also, all the precompiled libraries from Debian packages declare that they are Externally_Built. Therefore, if someone wants to recompile their program and the libraries with asis-gcc (or gnat-10 or whatever it is called), they will have to recompile everything into their own build directory, under $HOME. I suspect they might have to write their own project file for this. But perhaps we can assume that developers are not interested in analyzing the conformance of Debian packages to AdaControl rules, so they are not interested in recompiling libraries from Debian packages. They are only interested in recompiling their own source files (that use said precompiled libraries). ISTR that AdaControl does not require the tree files of units that are not the ones being analyzed. This simplifies the problem. If Debian can solve this simpler problem, then I think we can declare victory. > If we compile with gcc-11 and run asis with a gcc-10, will it have access to > the same Ada > libraries? You need to be specific about which *files* they will look for and ask your question more precisely. Similarly, "we run asis with a gcc-10" really means "we recompile some source files with gcc-10 to produce tree files". -- Ludovic Brenta.
