Joe Orton wrote:
A good solution I found seemed to be to use partial linking rather than
convenience libraries, which libtool was happy to do if you use:

libtool --mode=link gcc -o libpart.o some.lo random.lo objs.lo

But I don't know how portable ld -r is.

All Unix linkers have supported this for at least the past 25 years.

(I don't know if it's actually OK/portable to assume that objects with
symbols not referenced from main MUST get pulled into an executable if
that object is passed on the link line, but we rely on that already)

I actually hacked my libtool 1.4.3 to use partial linking to create shared libraries as well. E.g. it now spits out
ld -r -o libfoo.lo $(OBJS)
ld -G -o libfoo.so libfoo.lo


This makes things go a lot faster when you run libtool --mode=install if it needs to relink the target library.
--
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
http://www.symas.com http://highlandsun.com/hyc
Symas: Premier OpenSource Development and Support



_______________________________________________ Libtool mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to