[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pkg-conf and LD* variables

From: Thomas Jahns
Subject: Re: pkg-conf and LD* variables
Date: Sun, 28 Oct 2018 22:36:14 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0


On 10/28/18 1:42 AM, Harlan Stenn wrote:
pkg-conf offers the following ways to get "link flags":

  --libs                All link flags

use the above and put it in the LIBS variable. No need to make this more complicated.

  --libs-only-L  The -L/-R stuff
  --libs-only-l The -l stuff
  --static      Output ilbraries suitable for static linking

and then says the union of -only-L and -only-l may be smaller than the
output of -libs because the latter might include flags like -rdynamic.

We're already having to parse the output of pkg-config to try and
separate LDADD stuff from LDFLAGS stuff,  And this is before we start to
address static v. dynamic things.

This is because we really don't want -L stuff in LDADD, because we end
up with things like:

  No rule to make: -L /usr/local/lib

(or something).

Which is why the LIBS variable exists, where you can put all this and be done with it.

Regards, Thomas

reply via email to

[Prev in Thread] Current Thread [Next in Thread]