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 20:34:16
Message-Id: 20091003203343.GO19056@gentoo.org
In Reply to: Re: [gentoo-dev] RFC: LD_AS_NEEDED="1" in profiles/targets/developer/make.defaults? by Samuli Suominen
1 On 03-10-2009 23:27:41 +0300, Samuli Suominen wrote:
2 > The amount of pkgs in tree with valid code that fails with asneeded is
3 > close to zero. We can use this,
4 >
5 > if use userland_GNU; then
6 > append-ldflags -Wl,--no-as-needed
7 > fi
8 >
9 > logic so it won't cause you troubles. Or the obvious shorter && version
10 > of it.
11
12 Not really, because the userland is GNU, the compiler too, but the
13 linker is not. We once played with a version of append-ldflags that
14 tested the flag against the linker to see if it would work, but that's
15 expensive as well as allowing real typos/bugs to go unnoticed.
16
17 We currently do either a CHOST check, or call ld to see if it's GNU for
18 all packages that hardcode -Wl,--{,no-}as-needed usage.
19
20
21 --
22 Fabian Groffen
23 Gentoo on a different level

Replies