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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Building an encapsulated library that uses GNAT sockets under Windows Date: Sat, 23 Apr 2016 22:16:51 +0100 Organization: A noiseless patient Spider Message-ID: References: <58a4942a-452a-4f32-b39b-f8f1fdbfe9fb@googlegroups.com> <68353b5d-94dc-4604-bdb1-00b48396ec1b@googlegroups.com> <33e880a1-df5f-450c-89e0-9b1d1a95e12f@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="662021c26e9874221b9d4575b1be8b1e"; logging-data="23029"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX186QG5GS8xpP7BaHYLembTfMhNgTmaYqso=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:1YDbLezVCYaOqfNsz1Cw/tLoabE= sha1:cYGlN5w6VxTU+S9yNXaVP1Y7JPs= Xref: news.eternal-september.org comp.lang.ada:30263 Date: 2016-04-23T22:16:51+01:00 List-Id: "Dmitry A. Kazakov" writes: > Can [gprlib] build a static equivalent too? I.e. a static library > containing a closure of all referenced objects plus initialization > code. I'm not sure it's relevant, but I posted a bug[1] on gnatmake & static standalone libraries; I sent AdaCore a similar report on gprbuild, no reply. The problem was, for a static SAL, the using Ada main program needs to see all the ALIs for it to be sure to call in all the dylibs required by the library; so if e.g. libgnarl was only called by non-interface units it would get linked but not elaborated. I wanted to use SALs because they automatically populate the include directory with relevant source. The GNAT GPL 2015 version of the patch is diff --git a/src/gprlib.adb b/src/gprlib.adb --- a/src/gprlib.adb +++ b/src/gprlib.adb @@ -555,7 +555,7 @@ Status : Boolean; begin - if Standalone = No then + if Standalone = No or Static then for Index in 1 .. ALIs.Last loop declare Destination : constant String := [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56616