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

Re: Preferred way to build shared objects from PIC archives?



Daniel Jacobowitz <dan@debian.org> writes:

> No, that should work fine.  I don't know what's broken... you may wish
> to try extracting all the objects via ar and relinking them; that
> should be pretty easy, but I'm not sure it will help.

That's actually how upstream does it, but then there are complications
due to the fact that some libraries only contain *.glo instead of *.o
(the former having OpenGL support enabled).

Anyway, I managed to find the problem: on arm, the linker honors
--no-whole-archive but silently ignores -no-whole-archive, so GCC's
insertion of -lgcc -lc -lgcc leads to those errors when the linker
sees the second -lgcc.  (Sigh.)  I have no idea why it's decided to
become so picky, or why the problem only happens on arm, though I have
to admit that the man page for ld only lists the double-dash form.

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
Finger amu@monk.mit.edu (NOT a valid e-mail address) for more info.



Reply to: