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: Thu, 15 Feb 2018 11:39:25 +0000 Organization: A noiseless patient Spider Message-ID: References: <981893565.540207668.848900.laguest-archeia.com@nntp.aioe.org> <101626dd-bbd5-4e10-a383-3c5e29d4bc88@googlegroups.com> <1663297707.540284845.822306.laguest-archeia.com@nntp.aioe.org> <301425720.540294866.314644.laguest-archeia.com@nntp.aioe.org> <836a0b01-419e-4b53-a15c-75bc7d41b462@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="85dcee59ce540dd7d5106e1e10fed727"; logging-data="29830"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18z0vTC8inQKLciCtEsn4LYhOkGnt7gYhA=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:Rcde5cjdBimbfvRspczFpeKCsZw= sha1:lt7qI04JE93Mj6NpILwqXiWEvVQ= Xref: reader02.eternal-september.org comp.lang.ada:50452 Date: 2018-02-15T11:39:25+00:00 List-Id: Lucretia writes: > On Thursday, 15 February 2018 08:49:44 UTC, Simon Wright wrote: >> Lucretia writes: >> > I have it building on Mac OS X as a static lib, but the options are >> > controlled from the makefile. >> >> When I built it as a dynamic library, I got (with some builds) an ACCVIO >> during elaboration, which I took to be down to failing to initialize >> libsdlada.dylib (it's not built as an SAL). > > What is ACCVIO and SAL? ACCVIO : access violation SAL: gprbuild term for a shared library that automatically runs init to do elaboration on load. So, although the binder calls in elaboration for the library components that are explicitly used, it doesn't do complete elaboration for the library, and you are open to runtime errors. http://docs.adacore.com/live/wave/gprbuild/html/gprbuild_ug/gprbuild_ug/gnat_project_manager.html#stand-alone-library-projects >> > So, before I push the changes, can anyone tell me if this is possible? >> >> As a possible alternative, the attached makefile fragment works out >> whether you're on Darwin or not, so you could decide in the makefile how >> to get the options & then pass them through to the gpr. > > TBH, putting this stuff in the gpr is better. It would be if it worked! but I don't see any way