[Top][All Lists]

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

Re: -objectlist in compile mode

From: Ralf Wildenhues
Subject: Re: -objectlist in compile mode
Date: Thu, 21 May 2009 11:38:30 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Christopher,

* Christopher Hulbert wrote on Wed, May 20, 2009 at 01:19:10AM CEST:
> On Tue, May 19, 2009 at 6:24 PM, Ralf Wildenhues <address@hidden> wrote:
> > * Christopher Hulbert wrote on Tue, May 19, 2009 at 06:38:10PM CEST:

> > However, how would you cope with recompiles and changes in the
> > set of sources?

> I thought about that a little today after sending the email. After
> testing on a few systems, I updated my rule to
> .c.lo:
>     $(LTCOMPILE) -c -o $@ $< && ( ( test -f libvsip.objlist && test -n
> "`$(GREP) $@ libvsip.objlist`" ) || echo $@ >> libvsip.objlist )

Hmm.  This has problems if the object file name contains any character
which is special in a grep regular expression (like a dot).  Also, it
lacks anchoring, so if you had objects bar.lo and foobar.lo, the code
would do the wrong thing.

More generally though, this code has already more overhead (more forks)
than the alternative rules I proposed in my previous message.  So I do
not think this is worthwhile to purse in this form.

> > Please note that the general tool that libtool provides you with to cope
> > with line length issues is the convenience archive: you just collect
> > subsets of objects in convenience archives, and in a final step link
> > them together to form a real library (depending on your source language,
> > you might want to keep one real object around for the final link).  If
> > that is not sufficient yet, you can also link convenience archives into
> > bigger convenience archives.  Of course this approach is typically less
> > efficient.
> I haven't looked into using convenience libraries. I'd have to see how
> it works on Windows.

That would be good anyway.  They are used in many situations.


reply via email to

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