Re: Building Ada System DLLs

David Gressett <[email protected]> Sat, 3 Jun 2017 15:47:56 +0000
Newsgroups gmane.comp.gnu.mingw.devel
Message-ID <CY1PR13MB06300A090FAED5211D5E83F0D4F40@CY1PR13MB0630.namprd13.prod.outlook.com>
On Friday, June 2, 2017 3:58 PM, Keith Marshall wrote:

>David,

>On 01/06/17 19:03, Keith Marshall wrote:
>> I do get libgnat-6.dll and libgnarl-6.dll, (but corresponding
>> import libraries are not built, because there is nothing in the
>> corresponding Makefile to build them).

>I note that "make install-strip" does not strip these DLLs; should it?
>(Ditto, for libgcc_s_dw2-1.dll).

No, stripping an Ada DLL will cause it to lose its relocatability.

>I can hack the Makefile.in to create import libs.  Do we need them?
>(The upstream maintainer says we don't).
It wouldn't hurt to have them, but I expect that any use of them
would be very , very infrequent.

>I also note that "make install", (or "make install-strip"), sequesters
>all gnat libraries, whether static, import, or DLL, in:

>  $prefix/lib/gcc/mingw32/6.3.0/adalib/

>I assume that the gnat tools expect to find them there, but surely any
>dynamically linked application, built with them, will need the DLLs in
>a runtime path?  Where should mingw-get install them?  Come to that, how
>do the gnat tools select between static and dynamic linking?  (The GNU
>linker will not associate, say, libgnat-6.dll with -lgnat, so if we do
>not provide libgnat.dll.a, surely it will pick libgnat.a, which is a
>static library).  Does this imply that gnat applications always default
>to static linking?

Static linking is the default. I never do dynamic linking, so I 
don't remember the gnat tool syntax needed; there is a specific
command-line option used to dynamically link the runtime, but
you would have to find it in the Ada user guide. The libgnat 
and libgnarl DLL's should be left where "make install" puts them.
You could put copies in some place easier to find for people
who need to distribute them, but documentation that shows
where they are to be found would be adequate.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot