Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora Development (http://www.linux-archive.org/fedora-development/)
-   -   Passing arguments into LDFLAGS (http://www.linux-archive.org/fedora-development/430314-passing-arguments-into-ldflags.html)

"Paul F. Johnson" 09-22-2010 12:08 PM

Passing arguments into LDFLAGS
 
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. I'm trying to pass --build-id using

export LDFLAGS="$LDFLAGS --build-id"

It's about the only way I can get mono to build currently!

TTFN

Paul
--
Vertraue mir, ich weiss, was ich mache...

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Ralf Corsepius 09-22-2010 12:30 PM

Passing arguments into LDFLAGS
 
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
details.

> 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).

Ralf
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel


All times are GMT. The time now is 11:30 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.