comp.lang.ada
 help / color / mirror / Atom feed
From: "Björn Persson" <bjorn@xn--rombobjrn-67a.se>
Subject: Re: Controlling the linking of shared libraries
Date: Wed, 27 Jul 2011 01:37:54 +0200
Date: 2011-07-27T01:37:54+02:00	[thread overview]
Message-ID: <9991f3FkbeU1@mid.individual.net> (raw)
In-Reply-To: 3b1702a7-c533-40a8-ad8e-a01cd083f948@m6g2000prh.googlegroups.com

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



      reply	other threads:[~2011-07-26 23:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-21 18:01 Controlling the linking of shared libraries Björn Persson
2011-07-21 23:14 ` anon
2011-07-22  6:36 ` Stephen Leake
2011-07-22 23:50   ` Simon Wright
2011-07-24 11:08 ` Björn Persson
2011-07-24 18:03   ` anon
2011-07-24 19:07   ` Project file version: was " anon
2011-07-24 19:13   ` Simon Wright
2011-07-25  1:05     ` anon
2011-07-26  8:18     ` Björn Persson
2011-07-25 11:43   ` Stephen Leake
2011-07-25 12:06     ` Simon Wright
2011-07-25 12:29       ` Dmitry A. Kazakov
2011-07-26  8:19     ` Björn Persson
2011-07-28 10:18       ` Stephen Leake
2011-07-29 22:47         ` Vincent
2011-07-26  9:20 ` Vincent
2011-07-26 23:37   ` Björn Persson [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox