On Wed, Dec 19, 2012 at 6:13 PM, Cary Coutant <ccout...@google.com> wrote:
> Two test cases, debug_msg_so.err and debug_msg_ndebug.err, are still
> broken by the original patch, because (a) debug_msg.so has a DT_NEEDED
> entry for libstdc++.so, (b) the use of -static-libstdc++ means that
> that DT_NEEDED entry is unknown when we link the executable, and (c)
> the undefined symbols in debug_msg.so will not be printed.
>
> The obvious solution would be to add an option to cancel
> -static-libstdc++, but there doesn't seem to be one. (There is a
> -shared-libgcc option, but no -shared-libstdc++.) I've tested two
> alternatives that work:
>
> (1) Force the issue by explicitly adding -Bdynamic -lstdc++ to the
> link flags for debug_msg_so and debug_msg_ndebug.
>
> (2) Remove the DT_NEEDED entry from debug_msg.so by linking it with
> -static-libstdc++ also.
>
> Which one seems preferable? Any better ideas?

Adding -Bdynamic seems fine to me.

And I guess GCC should have a -shared-libstdc++ option.

Ian

Reply via email to