From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id J0laNh8nYmP8HhMAWB0awg (envelope-from ) for ; Wed, 02 Nov 2022 04:15:27 -0400 Received: by simark.ca (Postfix, from userid 112) id D08941E124; Wed, 2 Nov 2022 04:15:27 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=gynxA0wK; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 7F6CD1E0CB for ; Wed, 2 Nov 2022 04:15:27 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7A1603858008 for ; Wed, 2 Nov 2022 08:15:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7A1603858008 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667376926; bh=z6l3EHgfIoco8lfGG82q9vCgb1hPDvweHlXyGcTLUHQ=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=gynxA0wKFdhwIDq5/xMis1MEMaRk8CHLBDe3/Q4puUy0n8srTGjqG2DZSVvk8IQLX DnapWAtMBbqECa09t3y05RUlsNfhjM8WRsNxwUmld2fa3OO9cUE5c6Ag+RvGhGdvYz miPiVY68f+ApMbzSE+cszclRDUXb/dIj+175ztMA= Received: from devianza.investici.org (devianza.investici.org [198.167.222.108]) by sourceware.org (Postfix) with ESMTPS id 3BE873858400 for ; Wed, 2 Nov 2022 08:14:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3BE873858400 Received: from 1.mail-backend.investici.org (unknown [10.0.0.11]) by devianza.investici.org (Postfix) with ESMTP id 4N2KS15WXzz6v6F for ; Wed, 2 Nov 2022 08:14:41 +0000 (UTC) Received: from 1.webmail.investici.org (localhost [127.0.0.1]) (Authenticated sender: i.nixman@autistici.org) by 1.mail-backend.investici.org (Postfix) with ESMTPA id 4N2KS14rbbz5t7d for ; Wed, 2 Nov 2022 08:14:41 +0000 (UTC) MIME-Version: 1.0 Date: Wed, 02 Nov 2022 08:14:41 +0000 To: gdb@sourceware.org Subject: _WIN32_WINNT redefined? User-Agent: Roundcube Webmail Message-ID: <6485dbfe07e21a1c451b17d3fda5b3d9@autistici.org> X-Sender: i.nixman@autistici.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: niXman via Gdb Reply-To: i.nixman@autistici.org Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" hello! host: x86_64-w64-mingw32 target: x86_64-w64-mingw32 I'm trying to build GDB using GCC that I built myself. the GCC was patched and configured the way when std-threads implemented by libgcc using WINAPI directly, without winpthreads. the compiler works, as far as I can test it. but I have faced with a trouble with building GDB using the compiler. the trouble looks like this: ``` In file included from mingw64/lib/gcc/x86_64-w64-mingw32/13.0.0/include/c++/mutex:45, from ../src/gdb-11.2/gdbsupport/../gdbsupport/thread-pool.h:27, from ../src/gdb-11.2/gdbsupport/thread-pool.cc:24: mingw64/lib/gcc/x86_64-w64-mingw32/13.0.0/include/c++/bits/std_mutex.h:163:5: error: '__gthread_cond_t' does not name a type; did you mean '__gthread_once_t'? 163 | __gthread_cond_t* native_handle() noexcept { return &_M_cond; } | ^~~~~~~~~~~~~~~~ ``` the problem is a consequence of the fact that `_WIN32_WINNT` is redefined somewhere to another value that is less than necessary. but when I pass `-D_WIN32_WINNT=0x0601` for CFLAGS/CXXFLAGS - the trouble is gone. the mingw-w64-api was configured with `--with-default-win32-winnt=0x0601` and I can confirm the `_WIN32_WINNT` is actually set to the correct value. moreover, using the compiler I can successfully build a simple program that uses `std::thread` without the need to pass `-D_WIN32_WINNT=0x0601` for CFLAGS/CXXFLAGS. so my question is: could it be so the `_WIN32_WINNT` macro is reassigned somewhere in GDB sources? best!