tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ld --as-needed (math/gnumeric110 has unnecessary dependencies)



On Sun, Nov 28, 2010 at 05:25:04AM +0000, David Holland wrote:
> On Thu, Nov 25, 2010 at 02:06:19AM +0100, Joerg Sonnenberger wrote:
>  > > I thought that behavior was the default (for ELF libs anyway) since
>  > > years and years ago?
>  > 
>  > No, simply because --as-needed has created quite a few breakages...
>  > What you mean is normal transitive closure.
> 
> No, what I mean is
> 
>    % echo 'int main() { return 0; }' > foo.c
>    % gcc foo.c -lcurses -o foo
>    % ldd foo
> 
> should not show curses. When did this get reverted, or was it never
> true in NetBSD ELF and I just didn't notice?

It was never true with shared linkage AFAIK.

> Anything this breaks is wrong. (It's the same principle as always
> including header files you need and not relying on someone else
> exposing them for you.)

Depends. It can change the behavior if constructors are involved or if
you are using dlopen.

Joerg


Home | Main Index | Thread Index | Old Index