Gentoo Archives: gentoo-dev

From: Fabian Groffen <grobian@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] RFC: LD_AS_NEEDED="1" in profiles/targets/developer/make.defaults?
Date: Sat, 03 Oct 2009 21:13:39
Message-Id: 20091003211306.GP19056@gentoo.org
In Reply to: Re: [gentoo-dev] RFC: LD_AS_NEEDED="1" in profiles/targets/developer/make.defaults? by Samuli Suominen
1 On 04-10-2009 00:11:06 +0300, Samuli Suominen wrote:
2 > Perhaps we could add a new function to the flag-o-matic that does the
3 > > CHOST check, and appends the flag, so the check code wouldn't have to be
4 > > duplicated in ebuilds? It should be rather trivial.
5 > >
6 >
7 > ok, chost check would be cheap. how about,
8 >
9 > no-as-needed() {
10 > case $($(tc-getLD) -v 2>&1 </dev/null) in
11 > *GNU*) # GNU ld
12 > echo "-Wl,--no-as-needed" ;;
13 > esac
14 > }
15 >
16 > usage: append-ldflags $(no-as-needed)
17
18 that would work fine for me, and all possible future cases I can think
19 of
20
21
22 --
23 Fabian Groffen
24 Gentoo on a different level

Replies