1 |
Fabian Groffen wrote: |
2 |
> On 03-10-2009 23:27:41 +0300, Samuli Suominen wrote: |
3 |
>> The amount of pkgs in tree with valid code that fails with asneeded is |
4 |
>> close to zero. We can use this, |
5 |
>> |
6 |
>> if use userland_GNU; then |
7 |
>> append-ldflags -Wl,--no-as-needed |
8 |
>> fi |
9 |
>> |
10 |
>> logic so it won't cause you troubles. Or the obvious shorter && version |
11 |
>> of it. |
12 |
> |
13 |
> Not really, because the userland is GNU, the compiler too, but the |
14 |
> linker is not. We once played with a version of append-ldflags that |
15 |
> tested the flag against the linker to see if it would work, but that's |
16 |
> expensive as well as allowing real typos/bugs to go unnoticed. |
17 |
> |
18 |
> We currently do either a CHOST check, or call ld to see if it's GNU for |
19 |
> all packages that hardcode -Wl,--{,no-}as-needed usage. |
20 |
> |
21 |
|
22 |
Ah. I wasn't aware of that. |
23 |
|
24 |
Perhaps we could add a new function to the flag-o-matic that does the |
25 |
CHOST check, and appends the flag, so the check code wouldn't have to be |
26 |
duplicated in ebuilds? It should be rather trivial. |