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!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Exporting linker options from library GPR Date: Fri, 19 Jan 2018 17:25:15 +0000 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="2b89bd3d01304853b38669b28ca5b559"; logging-data="17146"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/r4eSBKmnznwZaJgDu6Pqu7lvylQGInOs=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:65JiNj8adfMUrW4P8fNvi/HUBCc= sha1:8/TxhnAt0CCGpHKFfDODhDxPCi8= Xref: reader02.eternal-september.org comp.lang.ada:50002 Date: 2018-01-19T17:25:15+00:00 List-Id: "Dmitry A. Kazakov" writes: > On 2018-01-19 15:25, Simon Wright wrote: >> I'm working with SDLAda, thanks Luke, on macOS, using a prebuilt SDL2, >> which comes as a framework. > > [...] > >> These workrounds are all very well, but is there any way of telling the >> final linker to add these switches automatically? > > AFAIK it should be > > for Library_Options use ... This in the build-library GPR tells the switches to build a shared library. Itwas present in the build-library GPR, but didn't solve my problem. I just tried again ... and ... this time it worked, perhaps because I was confused between shared & static ... it seems that things are OK at least when the built library is dynamic ... this may be Mac-related, since Darwin shared libraries (.dylib) contain references to the paths of the dylibs they themselves use. Still confused. > and/or > > for Leading_Library_Options use ... > > in the library project to be specified in "with". > > And you cannot have build-library and with-library project files > same. At least I never managed that. It seems they can be in this case (all a bit of a confusing mystery). I do seem to have come across a couple of gprbuild/gprinstall issues in this area. More investigation needed. To answer my original question - it seems that a library project file that contains a package Linker with an attribute Linker_Options was what I was looking for.