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 Wed, Nov 24, 2010 at 10:48:46PM +0200, Aleksey Cheusov wrote:
> 0 ~>gcc -DPIC -fPIC -shared -o libmy1.so my.c -lcompat -lutil -lm
>
> 0 ~>gcc -DPIC -fPIC -Wl,--as-needed -shared -o libmy2.so my.c -lcompat
> -lutil -lm
>
> 0 ~>ldd ./libmy1.so
> ./libmy1.so:
> -lutil.7 => /usr/lib/libutil.so.7
> -lc.12 => /usr/lib/libc.so.12
> -lm.0 => /usr/lib/libm.so.0
>
> 0 ~>ldd ./libmy2.so
> ./libmy2.so:
> -lc.12 => /usr/lib/libc.so.12
I thought that behavior was the default (for ELF libs anyway) since
years and years ago?
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index