Gentoo Archives: gentoo-dev

From: Samuli Suominen <ssuominen@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:27:19
Message-Id: 4AC7B3BD.3030903@gentoo.org
In Reply to: Re: [gentoo-dev] RFC: LD_AS_NEEDED="1" in profiles/targets/developer/make.defaults? by Fabian Groffen
1 Fabian Groffen wrote:
2 > On 03-10-2009 22:35:58 +0300, Samuli Suominen wrote:
3 >> Ciaran McCreesh wrote:
4 >>> On Sat, 03 Oct 2009 22:13:59 +0300
5 >>> Samuli Suominen <ssuominen@g.o> wrote:
6 >>>> Since new binutils will support LD_AS_NEEDED="1" to force ld behave
7 >>>> asneeded we could use this for the developer -target in profiles?
8 >>>>
9 >>>> Speak up if you think it's a terrible idea.
10 >>> Well, it does break correct code, so it's about on par with forcing
11 >>> -ffast-math or -fno-exceptions or -fvisibility-inlines-hidden on
12 >>> globally...
13 >>>
14 >> Be reasonable. We can add -Wl,--no-as-needed for those packages with
15 >> valid code. And I'm certainly not suggesting adding it to base/, _only_
16 >> for the developer target.
17 >
18 > Please recall that this is a GNU binutils flag. I prefer the
19 > environment flag over the command-line option, because it doesn't break
20 > other linkers, but if it implies many ebuilds getting -Wl,--no-as-needed
21 > append-ldflagged, then I'm not getting happy as that breaks my builds.
22 >
23 >
24
25 The amount of pkgs in tree with valid code that fails with asneeded is
26 close to zero. We can use this,
27
28 if use userland_GNU; then
29 append-ldflags -Wl,--no-as-needed
30 fi
31
32 logic so it won't cause you troubles. Or the obvious shorter && version
33 of it.

Replies