FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 09-22-2010, 01:58 PM
Stephen Gallagher
 
Default Passing arguments into LDFLAGS

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/22/2010 08:08 AM, 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. 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

Try
export LDFLAGS="$LDFLAGS -Wl,--build-id"

- -Wl, means "pass the part after the comma directly to the linker"

- --
Stephen Gallagher
RHCE 804006346421761

Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkyaC6MACgkQeiVVYja6o6P8YACggeE31YsEfv Ur288y/gbndzSz
gVMAn3xWeN1IOcjNogysRM/g326GegEc
=KXwX
-----END PGP SIGNATURE-----
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-22-2010, 02:30 PM
Garrett Holmstrom
 
Default Passing arguments into LDFLAGS

Stephen Gallagher wrote:
> On 09/22/2010 08:08 AM, Paul F. Johnson wrote:
>> 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
>
> Try
> export LDFLAGS="$LDFLAGS -Wl,--build-id"
>
> - -Wl, means "pass the part after the comma directly to the linker"

This. When gcc is used to indirectly call ld, it won't always pass the
$LDFLAGS to the linker. To force it to you have to use the -Wl switch
and replace all spaces in the switch with commas. For example:

LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl--build-id -s"
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 09-23-2010, 08:33 PM
Roland McGrath
 
Default Passing arguments into LDFLAGS

As I said before, this is almost certainly the wrong fix. If you share
your code already, you will get the help you need quickly. As long as you
don't, and just ask over-specific questions rather than let people see the
context to help you properly, you will get only frustration.


Thanks,
Roland

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

Thread Tools




All times are GMT. The time now is 12:43 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org