--Wl, -z, relro in LDFLAGS required?/Inconsistency when not using %configure

Ralf Corsepius rc040203 at freenet.de
Tue Oct 22 09:03:03 UTC 2013


On 10/22/2013 10:26 AM, Ville Skyttä wrote:
> On Mon, Oct 21, 2013 at 3:08 PM, Michael Schwendt <mschwendt at gmail.com> wrote:
>> On Mon, 21 Oct 2013 04:01:15 +0200, Kevin Kofler wrote:
>>> We already have one, it's called %{__global_ldflags}. You are indeed
>>> supposed to set LDFLAGS of handwritten makefiles to that. The guidelines
>>> need to be updated.
>> Also raises the question whether we want more such packages to do
> [...]
>
> In many cases the values aren't picked up from the environment but
> need to be passed in by other means (such as arguments to make etc).
Also, the meaning of "LDFLAGS" is ambigous, which means implicitly 
passing it is somewhat dangerous.

It may mean flags to be passed to the linker through the compiler", but 
there also exist Makefiles/build environment, which treat LDFLAGS as 
"flags to be directly passed to the linker".

-Wl,-z,relo is from the former family (-Wl ... gcc options to be passed 
to the linker through gcc).

gmake defines it as (from "info make"):

`LDFLAGS'
      Extra flags to give to compilers when they are supposed to invoke
      the linker, `ld'.

Ralf





More information about the devel mailing list