[Bug libstdc++/108225] canadian compilation of gdb error for libstdc++'s std_mutex.h on x86_64-w64-mingw32 host

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jan 12 13:46:34 GMT 2023


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #29 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I think if you want to build for ancient versions < 0x0600 then you should
build a custom toolchain for that. Build the whole compiler with
--enable-cxx-flags="-O2 -g -D_WIN32_WINNT=0x0500" and that way libstdc++'s
configure will correctly detect at build time that you are from prehistoric
times. It will correctly disable uses of C99 stdlib.h and C++11 mutexes and
threads etc.

Building a compiler for modern Windows versions and expecting it to also
compile for ancient versions is not going to work. Treat the ancient versions
as a cross-compilation target and use a custom toolchain instead.

So I'm closing this again.


More information about the Gcc-bugs mailing list