[SCM] invada-ladspa/master: Added patch to pass flags correctly.

Reinhard Tartler siretart at gmail.com
Tue Mar 4 13:10:43 UTC 2014


On Tue, Mar 4, 2014 at 8:07 AM, Fabian Greffrath <fabian at greffrath.com> wrote:
> Am Dienstag, den 04.03.2014, 10:01 -0300 schrieb Felipe Sateler:
>> >>         >> ++LDFLAGS               +=      -shared -lc -lm -L.
>> >>         -linv_common
>
>> -Wl means "pass this option to the linker". So options that are
>> consumed by the linker need -Wl (like the as needed option), and
>> options consumed by the compiler don't.
>
> But it is also the linker that does the actual linking and thus consumes
> the flags quoted above, isn't it?
>
>> This is very unfortunate. I would have assumed that LDFLAGS means
>> "flags for the linker", but it appears it means "flags for gcc when
>> invoked for linking stuff".
>
> That's still strange. I don't get why telling the linker "link the
> binary to libfoo" via "-lfoo" does not require the "-Wl," prefix whereas
> telling the compiler "don't link if you don't actually have to" via
> "-as-needed" does. :/

Because the option -l is special, and the "gcc" compiler and linker
driver understands it without having it to prefix with "-Wl". The
other option are likely to conflict with other compiler options.

Yes, it is messy and confusing...

-- 
regards,
    Reinhard



More information about the pkg-multimedia-maintainers mailing list