From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id CC7E8385B83B; Wed, 1 Sep 2021 09:53:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CC7E8385B83B Received: by mail-wr1-x429.google.com with SMTP id b6so3523345wrh.10; Wed, 01 Sep 2021 02:53:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=8rgUUns7UNq9FcnBgxZ5I9/EmBnZQRz42fGHLwlIeqY=; b=Yh7/dYSM3Y3BSL5/wbbMAu3kuu+knsMLXSmalRlf5IJxhhx+YYuV7oZCno8r1qMk/O m8tfhrV5VLigWEox1S3OhUz38lBrb3VA9kTBYGC6tBms5RzBTxcM+rJhNydU3FD0CyWE N3zzFD2tnskOkvdrcIwsVHCi/WxpdtdSWKzzu9u2tk31jLZ2kgXo875KdWngMbAWICOI v/ovCxWTiPyT1N6ggaR8cGVdvbGSa1BXh0Jf7R/XrNV23n395xKtMISZF9vuQFBxk4iP nUFJ72uj1a8Ah9eMt0cFKrXN7XAnelZfdFIruarQYpiO/IlfVHygSIlP7DPXDfUHL42S hzEw== X-Gm-Message-State: AOAM530qxU00qM/auLWOaVsPOQpwqD7PKLj7S/bPYdN9rxhrLbsqaco1 7BdYefFE/JUc5LDe1wGN5G+OGeEoaF9S9+ImnlE= X-Google-Smtp-Source: ABdhPJwY0XbPYbsd6+lKmQ3AUQBh3mkhfbj5JuXPtxKe266DeO4imePdHwMVsKaXE8Xi2A7lddmhM0ktZeqKPWFMWZM= X-Received: by 2002:adf:8102:: with SMTP id 2mr35291996wrm.89.1630489979985; Wed, 01 Sep 2021 02:52:59 -0700 (PDT) MIME-Version: 1.0 References: <1519030763.2942755.1275455464.4F3B5B67@webmail.messagingengine.com> In-Reply-To: From: Jonathan Wakely Date: Wed, 1 Sep 2021 10:52:48 +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.3 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: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2021 09:53:11 -0000 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 e= nabled: > > > > /* 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)