From: Eli Zaretskii <eliz@gnu.org>
To: Pedro Alves <palves@redhat.com>
Cc: brobecker@adacore.com, simon.marchi@polymtl.ca,
gdb-patches@sourceware.org
Subject: Re: GDB 7.99.91 MinGW compilation error in cli-script.c
Date: Fri, 26 May 2017 07:57:00 -0000 [thread overview]
Message-ID: <83shjsjbib.fsf@gnu.org> (raw)
In-Reply-To: <436bb773-a9b2-6c32-2b9c-7d3a6297d634@redhat.com> (message from Pedro Alves on Thu, 25 May 2017 11:05:00 +0100)
> Cc: brobecker@adacore.com, simon.marchi@polymtl.ca, gdb-patches@sourceware.org
> From: Pedro Alves <palves@redhat.com>
> Date: Thu, 25 May 2017 11:05:00 +0100
>
> >> I'm surprised mingw does this, because that's a libstdc++
> >> internal symbol...
> >
> > I'm guessing that was done because releases of MinGW runtime and the
> > MinGW port of GCC are not in sync. So people who have a GCC
> > installation and upgrade to a later MinGW runtime expect to have this
> > problem solved, but the way you seem to assume tjis to happen is by
> > them having to build an updated GCC or wait for an update of the GCC
> > distribution.
>
> Your use of "have to wait" above doesn't make sense to me, to be
> honest. mingw.org maintainers chose to update the runtime and not
> the compiler. It's their choice. Users have to update some component to
> fix this, but the decision that the component that needs updating is
> the runtime is mingw.org maintainer's. It would have been equally possible to
> provide an updated GCC release of the exact same GCC version / vintage
> that defined _GLIBCXX_USE_C99 itself (or some other similar localized
> hack or even a backport of the proper fix upstream) instead of
> defining a libstdc++ internal symbol in the runtime and potentially
> causing trouble when/if folks update to newer GCCs that
> treat _GLIBCXX_USE_C99 differently, exactly because, as you say,
> the runtime and the compiler are not released in sync.
I think there's some misunderstanding here. The MinGW runtime needed
to be updated in any case, because the root cause of not defining
_GLIBCXX_USE_C99 for MinGW was a deficiency in the MinGW runtime: a
specific stdio function in the MS runtime wasn't behaving in
ANSI-compliant way, and needed a replacement for it to be added to
MinGW. The _GLIBCXX_USE_C99 macro was undefined in the libstdc++
headers because of that problem, and the decision whether to define it
is made at libstdc++ build time, based on the MinGW runtime that was
present at that time.
Once that change in the MinGW runtime was made, there were two
possible ways of fixing the to_string problem in libstdc++:
. build and release a new distribution of GCC, and tell everyone
that they must upgrade their GCC, together with MinGW runtime; or
. force _GLIBCXX_USE_C99 to be defined in the MinGW runtime headers
The MinGW maintainers decided to do the latter, most probably because
it is easier on both users and the maintainers.
> > mingw.org's MinGW currently doesn't offer GCC newer than 5.3.0, so
> > this solution is not yet available to MinGW users. Maybe soon it will
> > be.
>
> The point was that the compiler fix will make std::to_string available
> even when _GLIBCXX_USE_C99 ends up not defined, AFAICS. Meaning that with
> newer compilers we'll replace std::to_string when it's not necessary,
> AFAICS, given:
>
> +#ifdef __MINGW32__
> +# include <_mingw.h>
> +# ifndef _GLIBCXX_USE_C99
> +# undef REPLACE_TO_STRING
> +# define REPLACE_TO_STRING 1
> +# endif
> +#endif
>
> >From the ChangeLog entry seen on that bugzilla url, I'd think that
> skipping the replacement when GLIBCXX_USE_C99_STDIO is defined
> would work.
I'm okay with adding the newer symbols to the patch I already
installed, if that's what you want. the latest GCC that's currently
available for MinGW is 5.3.0, where these newer symbols don't yet
appear.
next prev parent reply other threads:[~2017-05-26 7:57 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-04 19:44 GDB 7.99.91 available for testing Joel Brobecker
2017-05-08 14:53 ` Eli Zaretskii
2017-05-17 11:36 ` Yao Qi
2017-05-17 14:39 ` Eli Zaretskii
2017-05-08 15:00 ` GDB 7.99.91 MinGW compilation error in cli-script.c Eli Zaretskii
2017-05-14 3:19 ` Simon Marchi
2017-05-14 14:13 ` Eli Zaretskii
2017-05-17 14:31 ` Joel Brobecker
2017-05-17 16:01 ` Eli Zaretskii
2017-05-19 9:10 ` Eli Zaretskii
2017-05-19 9:49 ` Pedro Alves
2017-05-19 11:17 ` Eli Zaretskii
2017-05-19 11:23 ` Pedro Alves
2017-05-21 15:33 ` Eli Zaretskii
2017-05-22 15:26 ` Pedro Alves
2017-05-22 18:43 ` Eli Zaretskii
2017-05-23 9:53 ` Pedro Alves
2017-05-24 2:44 ` Eli Zaretskii
2017-05-25 10:05 ` Pedro Alves
2017-05-26 7:57 ` Eli Zaretskii [this message]
2017-05-26 11:52 ` Pedro Alves
2017-05-26 12:57 ` Eli Zaretskii
2017-05-26 13:58 ` Pedro Alves
2017-05-24 18:28 ` Eli Zaretskii
2017-05-24 19:37 ` Joel Brobecker
2017-05-25 10:12 ` Pedro Alves
2017-05-26 7:47 ` Eli Zaretskii
2017-05-26 10:54 ` Pedro Alves
2017-05-26 13:03 ` Eli Zaretskii
2017-05-26 14:10 ` Pedro Alves
2017-05-26 14:35 ` Eli Zaretskii
2017-05-26 14:45 ` Pedro Alves
2017-05-08 15:02 ` GDB 7.99.91 MinGW compilation warning in tui.c Eli Zaretskii
2017-05-09 10:17 ` Yao Qi
2017-05-13 8:12 ` Eli Zaretskii
2017-05-17 16:26 ` Yao Qi
2017-05-17 16:45 ` Eli Zaretskii
2017-05-17 18:21 ` Joel Brobecker
2017-05-19 8:02 ` Eli Zaretskii
2017-05-19 9:54 ` Pedro Alves
2017-05-19 11:14 ` Eli Zaretskii
2017-05-19 11:25 ` Pedro Alves
2017-05-19 12:51 ` Eli Zaretskii
2017-05-19 13:58 ` Pedro Alves
2017-05-19 14:40 ` Eli Zaretskii
2017-05-19 17:50 ` DJ Delorie
2017-05-19 17:55 ` Eli Zaretskii
2017-05-15 21:11 ` GDB 7.99.91 available for testing Simon Marchi
2017-05-16 13:51 ` Simon Marchi
2017-05-16 20:50 ` Yao Qi
2017-05-16 21:22 ` Simon Marchi
2017-05-16 21:40 ` Yao Qi
2017-05-17 11:31 ` [PATCH master/8.0] Add alias command to cmd_list_element Yao Qi
2017-05-17 12:16 ` Simon Marchi
2017-05-17 13:36 ` Yao Qi
2017-05-16 14:28 ` GDB 7.99.91 available for testing Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83shjsjbib.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=simon.marchi@polymtl.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox