link problems under darwin5.2

Andreas Tobler toa@pop.agri.ch
Fri Jan 11 11:29:00 GMT 2002



Tom Tromey wrote:
 
> I think I've found my problem.
> According to the GNU ar info page:
> 
>      However, too many different systems assume quick append rebuilds
>      the index, so GNU ar implements `q' as a synonym for `r'.

Here on darwin the q option says that it does not lookup if the file is
already in the archive therefore it is quicker. And it is not a synonym
for r. (Darwins ar is based on BSD)

> 
> It turns out that if you do something like:
> 
>     ar cru libdumb.a foo.o z/foo.o
> 
> ... then GNU ar will put both into the archive.

Same here.

> 
> But if you do this:
> 
>     ar cru libdumb.a foo.o
>     ar cru libdumb.a z/foo.o
> 
> ... then only one foo.o will end up in the archive.  This is odd, and
> apparently undocumented.

Same here.
 
> Any opinions on whether we should try to fix this in ar or in libtool?
> Or maybe in the libjava Makefile?  Whatever we do, it's going to be a
> pain...

Hmm, would it be worth to implement a quick mode into GNU ar, not only a
synonym for r?
Or can we treat the libjava Makefile to ar the three Attributes.o in one
approach? Or are there more instances around?


> 
> I found one weird possibility.  We could use GNU ar's MRI
> compatibility mode.  What's nice about this mode is that, in it, GNU
> ar reads commands from stdin.  So this nicely sidesteps line length
> limits and the like.  Hacking libtool to do this might be really hard
> though.

About this nothing is written in my ar.

Thanks,

Andreas



More information about the Java mailing list