From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3634A3858D33; Sat, 7 Jan 2023 22:04:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3634A3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673129071; bh=kaalop1EqlJQOVofy4ssE6uxwZ/Vcqw2H36DR4lKbXs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KvgvRKZUh0KR1pU/Tp2XOm27aCLRG4uh2nxOd7MRcvhw1D61gVTNzRfM0ULSwJLDi CSeykTuKXMOZGndcyjP72a7KbuMfGbH10KZ6Umjnw5b9W5Zogydt7SapmNNi43P6WD b2lHim2mRpdBlyg+dM33Y6CVEo4qcxvQ8imq8Ea4= From: "jwakely.gcc at gmail dot com" To: gdb-prs@sourceware.org Subject: [Bug build/29966] Cannot build anymore for win32 thread model of gdb Date: Sat, 07 Jan 2023 22:04:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: build X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jwakely.gcc at gmail dot com X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29966 --- Comment #14 from Jonathan Wakely --- The problem is that common.m4 does this: # Check for std::thread. This does not work on some platforms, like # mingw and DJGPP. AC_LANG_PUSH([C++]) AX_PTHREAD([threads=3Dyes], [threads=3Dno]) save_LIBS=3D"$LIBS" LIBS=3D"$PTHREAD_LIBS $LIBS" save_CXXFLAGS=3D"$CXXFLAGS" CXXFLAGS=3D"$PTHREAD_CFLAGS $save_CXXFLAGS" AC_CACHE_CHECK([for std::thread], gdb_cv_cxx_std_thread, [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[#include void callback() { }]], [[std::thread t(callback);]])], gdb_cv_cxx_std_thread=3Dyes, gdb_cv_cxx_std_thread=3Dno)]) if test "$threads" =3D "yes"; then # This check must be here, while LIBS includes any necessary # threading library. AC_CHECK_FUNCS([pthread_sigmask pthread_setname_np]) fi LIBS=3D"$save_LIBS" CXXFLAGS=3D"$save_CXXFLAGS" if test "$want_threading" =3D "yes"; then if test "$gdb_cv_cxx_std_thread" =3D "yes"; then AC_DEFINE(CXX_STD_THREAD, 1, [Define to 1 if std::thread works.]) fi fi AC_LANG_POP For the win32 thread model in GCC 13, that will compile using the default v= alue of _WIN32_WINNT. So configure decides that std::thread is available. But in comon-defs.h you explicitly define _WIN32_WINNT to an older value, which me= ans std::thread is not available. The configure check should use the same value of _WIN32_WINNT. --=20 You are receiving this mail because: You are on the CC list for the bug.=