From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id 7A7783858010; Wed, 15 Sep 2021 08:53:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7A7783858010 Received: by mail-wm1-x32c.google.com with SMTP id j17-20020a05600c1c1100b002e754875260so1409947wms.4; Wed, 15 Sep 2021 01:53:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=aayxpHdbm5owWTo3EigGb9KrOOyBphKsWze93OVl6P0=; b=um7gHkEnvRlm7eAp9iK/q6BebtyBv25i7BKn7MChN80ALlhMgkx1CRS234+Eeq+gmb /948u5UPCRI4Zve0hQNYnuFy/IqPUF6GVvelKmSCocTP4EkCcrwu7ml+tUgQX4ts7ZM5 7H0wdDdOObaijxLMcUbkvqPP0J67hWxeaiqT0jM/9ZEJga3unOmViVIxvzNttL2G2AN7 q5UOFRiZAdW5RO2FrlD8/mi1lQWEbRpfjgqyKKTspG2vAn5hLU0cnm9tqirwzpUFf9NC eRQmi3J3IDFYFl+PvjBhO0Jki3X1m2+w7TwtjTDsYEmIUUHTNPaB6kSjq5K5B+7Xlkoz HTTg== X-Gm-Message-State: AOAM533B8JSOZ/LRBQf9lMWRv46Yj9JBDV0/xMt1vP2DgGQSV9ipbXPN dWD6hG8GiLSv3zbKhOh79rrAd147S0j6/d+OqBk= X-Google-Smtp-Source: ABdhPJxp1qdoOBmn0yBHQS/MdYUCona7YsSu+8cefryiyvUCjeGeXy3Zm0LIgVXYyNuQ6sIuTkcs4CHb3fM+BGk5apI= X-Received: by 2002:a1c:2246:: with SMTP id i67mr2714437wmi.157.1631695999450; Wed, 15 Sep 2021 01:53:19 -0700 (PDT) MIME-Version: 1.0 References: <1519030763.2942755.1275455464.4F3B5B67@webmail.messagingengine.com> In-Reply-To: From: Jonathan Wakely Date: Wed, 15 Sep 2021 09:53:07 +0100 Message-ID: Subject: Re: [PATCH] libstdc++-v3: Check for TLS support on mingw To: Jonathan Yong <10walls@gmail.com> Cc: =?UTF-8?Q?Hugo_Beauz=C3=A9e=2DLuyssen?= , gcc-patches , "libstdc++" , NightStrike , lh_mouse Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Sep 2021 08:53:22 -0000 On Wed, 1 Sept 2021 at 10:52, Jonathan Wakely wrote= : > > On Wed, 1 Sept 2021 at 02:44, Jonathan Yong <10walls@gmail.com> wrote: > > > > On 8/31/21 9:02 AM, Jonathan Wakely wrote: > > > It looks like my questions about this patch never got an answer, and > > > it never got applied. > > > > > > Could somebody say whether TLS is enabled for native *-*-mingw* > > > builds? If it is, then we definitely need to add GCC_CHECK_TLS to the > > > cross-compiler config too. > > > > > > For a linux-hosted x86_64-w64-mingw32 cross compiler I see TLS is not= enabled: > > > > > > /* Define to 1 if the target supports thread-local storage. */ > > > /* #undef _GLIBCXX_HAVE_TLS */ > > > > > > > > > > > > > > > On Mon, 19 Feb 2018 at 08:59, Hugo Beauz=C3=A9e-Luyssen wrote: > > >> > > >> libstdc++-v3: Check for TLS support on mingw > > >> > > >> 2018-02-16 Hugo Beauz=C3=A9e-Luyssen > > >> > > >> * crossconfig.m4: Check for TLS support on mignw > > >> * configure: regenerate > > >> > > >> Index: libstdc++-v3/crossconfig.m4 > > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > >> --- libstdc++-v3/crossconfig.m4 (revision 257730) > > >> +++ libstdc++-v3/crossconfig.m4 (working copy) > > >> @@ -197,6 +197,7 @@ case "${host}" in > > >> GLIBCXX_CHECK_LINKER_FEATURES > > >> GLIBCXX_CHECK_MATH_SUPPORT > > >> GLIBCXX_CHECK_STDLIB_SUPPORT > > >> + GCC_CHECK_TLS > > >> ;; > > >> *-netbsd*) > > >> SECTION_FLAGS=3D'-ffunction-sections -fdata-sections' > > > > According to MSYS2 native from > > https://mirror.msys2.org/mingw/ucrt64/mingw-w64-ucrt-x86_64-gcc-10.3.0-= 5-any.pkg.tar.zst: > > > > x86_64-w64-mingw32/bits/c++config.h:#define _GLIBCXX_HAVE_TLS 1 > > > > So yes. > > Thanks! I'll test the patch on a cross-compiler and apply it soon then. > > (Thanks also to LH for the answer) I've pushed this to trunk now. Thanks for the patch, Hugo. Sorry it took so long to process.