Message ID | 20230930123353.2575906-1-steve@sk2.org |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp359369vqb; Sat, 30 Sep 2023 05:34:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHEXMAzxs4xEexTDGPyL+IBDowoZE4pOQAA7EUmtz5vx7Sdj+Dyy7r86B8xt0lXKqRfQcLy X-Received: by 2002:a05:6402:14ce:b0:534:8bdf:a258 with SMTP id f14-20020a05640214ce00b005348bdfa258mr6522246edx.31.1696077297053; Sat, 30 Sep 2023 05:34:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696077297; cv=none; d=google.com; s=arc-20160816; b=YcoAFhcpM4YDM4Hn4+FKfjKUp/fMTHOidqJXczKaANWXu3Bl8wz3bfWCopj68IgPs3 bK2cibKKe+XKQ0RXXYmnmexce46Ki4OPZ/ERSO924eA8XgJjKOxGiJemqfylmivw7qD8 um8BqWyVHozaHHP8yFRPzrnkvqrQRxBbQ2m2PPgG6f/uQmPUAc+qKjVXhrdOx+508YSH EiioSis817nk5Sp6LJMcpvblWA+3WUfBgNRrpxmJXkp8sIWbTo9RqxbhQdDN8ChHCG9E 9i6C0J4ONKoC0YGmKCVsyGvC7+jJeOltvQ1dpuUnqavNoSNb/FWXtSA623eaeLOIMATW sUxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dmarc-filter :delivered-to; bh=MwA0ClyR75sBadYf1y+tOPU+M0aJdxHbNGRW4DRr/no=; fh=tVKHHFGk8y7+mcFEP1LRzDCNA6I3/wnJCm5oR9yU9pE=; b=zrsiLHzob5eJiw0FwRY4jrWGom2l0RenR1f6QCLpDjO79YaTbihR/ffIKZM+6k+2zZ V9zpfJFSZFgVjsCT6wYX/wUmzQGTFwcWSeujMIKwqi5/r9601Jk9a2kb2CnqsJ1fBDog KBxzaN2Qgf+by/odv/iIgBXx9mFEKQbsDsV8QM9r7bLw3W6eVkk+0pTyWZW/PHuTRzo2 EQgnfjZi3eL+6YcCU03Dn+GHkzrGurZBxHl4ME+o41NXvxbDh8y3EZ/rBrY1mc7uSEKF f2sLznz4HKV08XLzgQibw9OmH0JnIjPVOGfa+zZIDjg0c6TNrK2cBfLtZJHsx7WdEBTr YuSA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id r12-20020aa7d58c000000b00530bad54f0esi16390813edq.561.2023.09.30.05.34.56 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 05:34:57 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 53CD93858C20 for <ouuuleilei@gmail.com>; Sat, 30 Sep 2023 12:34:44 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from 1.mo575.mail-out.ovh.net (1.mo575.mail-out.ovh.net [46.105.41.146]) by sourceware.org (Postfix) with ESMTPS id 99FA23858C20 for <gcc-patches@gcc.gnu.org>; Sat, 30 Sep 2023 12:34:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 99FA23858C20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sk2.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sk2.org Received: from director4.ghost.mail-out.ovh.net (unknown [10.108.16.29]) by mo575.mail-out.ovh.net (Postfix) with ESMTP id 490562598B for <gcc-patches@gcc.gnu.org>; Sat, 30 Sep 2023 12:34:18 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-t2k5z (unknown [10.110.171.34]) by director4.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 1643F1FD88; Sat, 30 Sep 2023 12:34:18 +0000 (UTC) Received: from sk2.org ([37.59.142.101]) by ghost-submission-6684bf9d7b-t2k5z with ESMTPSA id PHTDAsoVGGWZBAEAnmHt8A (envelope-from <steve@sk2.org>); Sat, 30 Sep 2023 12:34:18 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-101G0043a6886c9-04bc-4793-96b4-f6b1000b32bc, 10411C1C120163AF23A4499D0E0B4D6CE375B5E5) smtp.auth=steve@sk2.org X-OVh-ClientIp: 82.65.25.201 From: Stephen Kitt <steve@sk2.org> To: gcc-patches@gcc.gnu.org Cc: Stephen Kitt <steve@sk2.org> Subject: [PATCH] mingw-w64: avoid undefining _REENTRANT Date: Sat, 30 Sep 2023 14:33:53 +0200 Message-Id: <20230930123353.2575906-1-steve@sk2.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 1570067423789942406 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvkedruddtgdeftdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecunecujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepufhtvghphhgvnhcumfhithhtuceoshhtvghvvgesshhkvddrohhrgheqnecuggftrfgrthhtvghrnhepleegteeujeffjeefjeevhfdtudefjefgteelgedtudekleeiledvvdetudevjedtnecukfhppeduvdejrddtrddtrddupdekvddrieehrddvhedrvddtuddpfeejrdehledrudegvddruddtudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehsthgvvhgvsehskhdvrdhorhhgqedpnhgspghrtghpthhtohepuddprhgtphhtthhopehgtggtqdhprghttghhvghssehgtggtrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehjeehpdhmohguvgepshhmthhpohhuth X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778465947600591814 X-GMAIL-MSGID: 1778465947600591814 |
Series |
mingw-w64: avoid undefining _REENTRANT
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Stephen Kitt
Sept. 30, 2023, 12:33 p.m. UTC
When pthread is used by default, _REENTRANT should be defined in all
cases except -no-pthread. When pthread is not used by default,
_REENTRANT should only be defined with -pthread.
The current spec for mingw-w64 for default pthread is
%{!no-pthread:-D_REENTRANT} %{pthread:-U_REENTRANT}
and for non-default pthread is
%{pthread:-D_REENTRANT} %{!no-pthread:-U_REENTRANT}
This means that when pthread is used by default, specifying -pthread
undefines _REENTRANT! Applying the mingw32 specs instead produces the
desired result,
%{!no-pthread:-D_REENTRANT} %{pthread: }
for default pthread, and
%{pthread:-D_REENTRANT} %{!no-pthread: }
for non-default pthread.
gcc/ChangeLog:
* config/i386/mingw-w64.h (CPP_SPEC): Never undefine
_REENTRANT, only define it when appropriate.
Signed-off-by: Stephen Kitt <steve@sk2.org>
---
gcc/config/i386/mingw-w64.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
base-commit: 1e6815071fd137424f79ca79a6ba66b776a98778
diff --git a/gcc/config/i386/mingw-w64.h b/gcc/config/i386/mingw-w64.h index 0146ed4f793..39e7ec2ea1e 100644 --- a/gcc/config/i386/mingw-w64.h +++ b/gcc/config/i386/mingw-w64.h @@ -25,7 +25,7 @@ along with GCC; see the file COPYING3. If not see #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT} " \ "%{municode:-DUNICODE} " \ "%{" SPEC_PTHREAD1 ":-D_REENTRANT} " \ - "%{" SPEC_PTHREAD2 ":-U_REENTRANT} " \ + "%{" SPEC_PTHREAD2 ": } " \ "%{mcrtdll=crtdll*:-U__MSVCRT__ -D__CRTDLL__} " \ "%{mcrtdll=msvcrt10*:-D__MSVCRT_VERSION__=0x100} " \ "%{mcrtdll=msvcrt20*:-D__MSVCRT_VERSION__=0x200} " \