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)
>> According to upstream's website, (at least) lib{bonobo{,ui},gnomeui}
>> and ORBit2 are not needed. Attached patch seems to work well for
>> me; no build- or run-time errors occur. It would be nice if someone
>> could double-check and/or commit this or something similar.
> Thanks, good catch -- committed and PKGREVISION bumped.
> Thomas
Adding --as-needed option to the GNU linker may allow to detect this
kind of problems automatically at bulk build time. Thoughts?
0 ~>cat my.c
#include <stdio.h>
void five (void);
void five (void)
{
printf ("5\n");
}
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
0 ~>
--
Best regards, Aleksey Cheusov.
Home |
Main Index |
Thread Index |
Old Index