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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,df7cea30536a085f X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Path: g2news2.google.com!news2.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: =?UTF-8?B?QmrDtnJu?= Persson Newsgroups: comp.lang.ada Subject: Re: Controlling the linking of shared libraries Followup-To: comp.lang.ada Date: Wed, 27 Jul 2011 01:37:54 +0200 Message-ID: <9991f3FkbeU1@mid.individual.net> References: <98r7sbFs66U1@mid.individual.net> <3b1702a7-c533-40a8-ad8e-a01cd083f948@m6g2000prh.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: individual.net IJkY2yOzmGu6WpitUcH54wWWEJkVx/lByqn4lQ/o3oyfQbHnOd Cancel-Lock: sha1:6mL9UBQ9IBDnWq0JxYgdzX/OyfI= User-Agent: KNode/4.4.11 Xref: g2news2.google.com comp.lang.ada:21346 Date: 2011-07-27T01:37:54+02:00 List-Id: Vincent wrote: > However, if you specify the value of one of these attribute with an > external_as_list, you will be able to specify library options with a > switch -X. > > Example: > > project Prj is > for Library_Name use "prj"; > for Library_Dir use "lib"; > for Library_Kind use "relocatable"; > for Library_Options use external_as_list ("LOPTS", ","); > end Prj; > > $ gprbuild -P prj.gpr "-XLOPTS=-v,-v" It would be great if everybody would make a habit of always including that in library project files, only with two changes: Use the established name "LDFLAGS", not "LOPTS", and use a space for separator, not a comma: for Library_Options use external_as_list ("LDFLAGS", " "); That would make it easy for users and packagers to add any linker options they might need in their environment. Writing and maintaining custom patches to add support for LDFLAGS to x packages in y distributions is not so great. -- Björn Persson PGP key A88682FD