public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/108225] canadian compilation of gdb error for libstdc++'s std_mutex.h on x86_64-w64-mingw32 host
Date: Wed, 11 Jan 2023 10:16:09 +0000	[thread overview]
Message-ID: <bug-108225-4-JI7AdJ3pMA@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108225-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108225

--- Comment #24 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Maybe we want something like this:
> 
> diff --git a/libstdc++-v3/config/os/mingw32-w64/os_defines.h
> b/libstdc++-v3/config/os/mingw32-w64/os_defines.h
> index ee02ff82e86..68ac100acc8 100644
> --- a/libstdc++-v3/config/os/mingw32-w64/os_defines.h
> +++ b/libstdc++-v3/config/os/mingw32-w64/os_defines.h
> @@ -96,4 +96,13 @@
>  // See libstdc++/94268
>  #define _GLIBCXX_BUFSIZ 4096
>  
> +#if _WIN32_WINNT < 0x0600
> +// For the win32 thread model, setting _WIN32_WINNT to an old version might
> +// invalidate the value of _GLIBCXX_HAS_GTHREADS decided during configure.
> +# include <gthr.h>
> +# ifndef __GTHREADS_CXX0X
> +#  undef _GLIBCXX_HAS_GTHREADS
> +# endif
> +#endif
> +
>  #endif

IMO either you do not test _WIN32_WINNT but just __GTHREADS_CXX0X, or you just
test _WIN32_WINNT and avoiding including <gthr.h> & testing __GTHREADS_CXX0X.

  parent reply	other threads:[~2023-01-11 10:16 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-25 23:40 [Bug libstdc++/108225] New: cross build " unlvsur at live dot com
2022-12-31 18:54 ` [Bug libstdc++/108225] " unlvsur at live dot com
2022-12-31 18:57 ` unlvsur at live dot com
2022-12-31 19:04 ` unlvsur at live dot com
2022-12-31 19:12 ` unlvsur at live dot com
2022-12-31 19:22 ` unlvsur at live dot com
2022-12-31 19:24 ` unlvsur at live dot com
2023-01-04 12:25 ` [Bug libstdc++/108225] canadian compilation of " ebotcazou at gcc dot gnu.org
2023-01-04 13:23 ` redi at gcc dot gnu.org
2023-01-04 13:26 ` redi at gcc dot gnu.org
2023-01-04 13:32 ` redi at gcc dot gnu.org
2023-01-06  0:15 ` unlvsur at live dot com
2023-01-06  0:15 ` unlvsur at live dot com
2023-01-06  0:24 ` redi at gcc dot gnu.org
2023-01-06  0:27 ` redi at gcc dot gnu.org
2023-01-07 21:23 ` unlvsur at live dot com
2023-01-07 21:31 ` ebotcazou at gcc dot gnu.org
2023-01-07 21:34 ` unlvsur at live dot com
2023-01-07 21:35 ` unlvsur at live dot com
2023-01-07 21:41 ` unlvsur at live dot com
2023-01-07 21:58 ` unlvsur at live dot com
2023-01-07 22:15 ` redi at gcc dot gnu.org
2023-01-11  4:31 ` unlvsur at live dot com
2023-01-11  4:31 ` unlvsur at live dot com
2023-01-11  4:32 ` unlvsur at live dot com
2023-01-11  9:55 ` redi at gcc dot gnu.org
2023-01-11 10:16 ` ebotcazou at gcc dot gnu.org [this message]
2023-01-11 10:24 ` redi at gcc dot gnu.org
2023-01-11 14:45 ` ebotcazou at gcc dot gnu.org
2023-01-12 12:46 ` redi at gcc dot gnu.org
2023-01-12 12:52 ` redi at gcc dot gnu.org
2023-01-12 13:46 ` redi at gcc dot gnu.org
2023-01-12 13:49 ` redi at gcc dot gnu.org

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=bug-108225-4-JI7AdJ3pMA@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).