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 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?

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.)

Furthermore, pkgsrc needs to keep track of the distinction between
programs that directly use a particular lib and programs that do only
indirectly -- if this distinction is not maintained and reflected
properly into the package depends, revbumps for shared library changes
end up incomplete and things break.

I don't see any compelling reason not to enable it. What sorts of
breakages are you thinking of?

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index