Patch: Check if -lc is needed.

Mark Kettenis kettenis@wins.uva.nl
Wed Jul 19 05:00:00 GMT 2000


2000-07-18  H.J. Lu  (hjl@gnu.org)

        * ltmain.in: Add -lc when building shared libary only if
        necessary.

        * ltconfig.in: Check if -lc is necessary for building shared
        libary. Set build_libtool_need_lc to indicate it.

While this patch as such probably isn't such a bad idea, it doesn't
really solve solve the problem HJ is trying to solve.  You'll now end
up with two copies of the EH frame info registration functions on GNU
systems.  While the link order will probably guarantee that the ones
in libstdc++.so will be used in C++ programs linked with -lstdc++,
I'm not sure if it'll work right in C++ libs dlopen()'ed from code
that isn't linked with libstdc++, and when combining code written in
two or more different languages that use exception handling.

Mark


More information about the Gcc-patches mailing list