Passing arguments into LDFLAGS

Ralf Corsepius rc040203 at
Wed Sep 22 12:30:06 UTC 2010

On 09/22/2010 02:08 PM, Paul F. Johnson wrote:
> Hi,
> I know I can do the likes of
> export CFLAGS="$CFLAGS -blah" and it will pass whatever CFLAGS is plus
> the argument "-blah" to the compiler.
> How do I do this with LDFLAGS.
Depends on a build-system's internals.

> I'm trying to pass --build-id using
> export LDFLAGS="$LDFLAGS --build-id"
In many cases, this is _the way_ how to do it.

Another possibility would be to add linker flags to CFLAGS.
Something similar to -Wl,<flags to pass to the linker>, c.f. man gcc for 

> It's about the only way I can get mono to build currently!
... no clues about mono on my part.

... and I am not sure if --build-id is a linker option or a general GCC
option (This would mean it should be added to CFLAGS).


More information about the devel mailing list