This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Follow-up to PR bootstrap/54820
- From: Cary Coutant <ccoutant at google dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: Eric Botcazou <ebotcazou at adacore dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 19 Dec 2012 18:13:31 -0800
- Subject: Re: Follow-up to PR bootstrap/54820
- References: <1659365.rXFWKSb4nS@polaris> <CAKOQZ8zzcXPOYxxctj2wMwgOXQmU9FVZcWOTEKPDtmTZicyEBQ@mail.gmail.com>
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?
-cary
On Tue, Oct 23, 2012 at 2:54 PM, Ian Lance Taylor <iant@google.com> wrote:
> On Tue, Oct 23, 2012 at 2:11 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
>>
>> 2012-10-23 Eric Botcazou <ebotcazou@adacore.com>
>>
>> PR bootstrap/54820
>> * configure.ac (have_static_libs): Force 'no' for GCC version < 4.5.
>> * configure: Regenerate.
>
> This is OK.
>
> Thanks.
>
> Ian