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, 16 Feb 2018 08:29:41 +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> <39a68743-624e-4dd9-8691-8e884f6b74d4@googlegroups.com> <411643190.540429197.080395.laguest-archeia.com@nntp.aioe.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: reader02.eternal-september.org; posting-host="be671bbce2d432ea7994a55a12da3b11"; logging-data="26132"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18BNfPJHITjYUpp3CpZ76zjaG3I5n2LcKM=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:H/alx+v5hmsazvPf/fZrcXx92sg= sha1:9mlJli2E6715g9skzOTEBTy1AQA= Xref: reader02.eternal-september.org comp.lang.ada:50468 Date: 2018-02-16T08:29:41+00:00 List-Id: Luke A. Guest writes: > Simon Wright wrote: >> Lucretia writes: >> >>> 1. GPRBuild whines about the Linker package in the library gpr, WTF? >>> 2. GPRInstall removes the Linker package on install, WTF? That's >>> really useful! >> >> Inside package Linker, you need to use Linker_Options rather than >> Default_Switches ("ada") >> >> > > Strange. Ok, I’ll try it. Is there an equivalent one for c compiler > options? Just in case someone tries to rebuild the lib once it’s > installed? >From the gprbuild references, Linker_Options "specifies a list of additional switches to be given to the linker when linking an executable. It is ignored when defined in the main project and taken into account in all other projects that are imported directly or indirectly. These switches complement the Linker'Switches defined in the main project. This is useful when a particular subsystem depends on an external library: adding this dependency as a Linker_Options in the project of the subsystem is more convenient than adding it to all the Linker'Switches of the main projects that depend upon this subsystem. so (a) it only really applies to a library, (b) it's language-independent. We already have Compiler'[Default_]Switches ("c").