public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/100429] threading support on windows. _GLIBCXX_HAS_GTHREADS macro is not 1 but libgcc is correct Date: Wed, 05 May 2021 12:11:47 +0000 [thread overview] Message-ID: <bug-100429-4-LNgS8ivBqD@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-100429-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100429 --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to cqwrteur from comment #0) > It looks like libgcc DOES provide threading support for windows. However, > _GLIBCXX_HAS_GTHREADS does not get defined for libstdc++, I guess it is > another libtool issue. > > SO GOOD, if we fix them, we will have our own threading support for GCC on > windows. > > > https://github.com/gcc-mirror/gcc/blob/master/libgcc/config/i386/gthr-win32.h > > > _GLIBCXX_HAS_GTHREADS Just read the comments in libgcc/gthr.h If the following are also defined, you should #define __GTHREADS_CXX0X 1 to enable the c++0x thread library. None of the required functions are defined by gthr-win32.h so it (correctly) doesn't define __GTHREADS_CXX0X and so libstdc++ doesn't use it. > In file included from > d:\toolchains\include\c++\12.0.0\x86_64-w64-mingw32\bits\gthr.h:148, > from b.cc:4: > d:\toolchains\include\c++\12.0.0\x86_64-w64-mingw32\bits\gthr-default.h: In > function 'int __gthread_setspecific(__gthread_key_t, const void*)': > d:\toolchains\include\c++\12.0.0\x86_64-w64-mingw32\bits\gthr-default.h:629: > 27: error: types may not be defined in casts > 629 | if (TlsSetValue (__key, CONST_CAST2(void *, const void *, __ptr)) > != 0) > | ^~~~~~~~~~~ > > BTW. there is another bug in libgcc. This does not work. > > An alternative code should be if (TlsSetValue (__key, void*( __ptr)) != 0) This seems like an entirely separate issue.
next prev parent reply other threads:[~2021-05-05 12:11 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-05 7:54 [Bug libstdc++/100429] New: threading support on windows unlvsur at live dot com 2021-05-05 7:56 ` [Bug libstdc++/100429] threading support on windows. _GLIBCXX_HAS_GTHREADS macro is not 1 but libgcc is correct unlvsur at live dot com 2021-05-05 12:11 ` redi at gcc dot gnu.org [this message] 2021-05-05 16:14 ` unlvsur at live dot com
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-100429-4-LNgS8ivBqD@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: linkBe 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).