libtool
[Top][All Lists]
Advanced

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

Re: Convenieve libraries and applications.


From: Howard Chu
Subject: Re: Convenieve libraries and applications.
Date: Thu, 12 Aug 2004 12:19:32 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040714

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]