Okay, upon reading deeper into the manual (*gasp*), I found a very similar
issue in the "Writing libraries for C++". There it indicates that C++
libraries have the same problems calling initializers and finalizers. For
now, I'm going to try to hack my version of libtool to use include the two
.o files, but it seems like this is a bigger problem.
In this particular case, it's because pragmas may be used in C code to
effectively do what global ctor/dtors do in C++ (add stuff to .init or
.fini)... which requires that the cc compiler be used to link intead of ld
directly. Why doesn't ld *WANT* to use ld directly? Is there a win there
in portability? This seems to be exactly the same problem the C++ support
is facing (and actually, there is an optional C++ extension to the
library I'm working on... :).
Thanks for the advice/insight,
-Chris
On 18 May 2000, Alexandre Oliva wrote:
> On May 17, 2000, Chris Lattner <[EMAIL PROTECTED]> wrote:
>
> > What should I do?
>
> You'd have to change archive_cmds in the appropriate place of
> ltconfig. However, I'm not sure whether it's best to run `cc' instead
> of `ld' or to add the object files to archive_cmds explicitly. In any
> case, this may have to be done as a special case for sequent-sysv4, as
> other sysv4s may not work exactly the same.
>
> --
> Alexandre Oliva Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
> Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
> Free Software Developer and Evangelist CS PhD student at IC-Unicamp
> oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me
>