From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by sourceware.org (Postfix) with ESMTPS id D392B385E828 for ; Thu, 19 Mar 2020 14:07:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D392B385E828 Received: by mail-wr1-x444.google.com with SMTP id h9so3153273wrc.8 for ; Thu, 19 Mar 2020 07:07:34 -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; bh=wX8/Rvvr6BgJrPcLr3bj4S7iNHd4HzXKO8geoWQy1xc=; b=n/QB4KzCSCpU87ypmSH/jFp50eL+FwoYnYleDVGlnJH63VccAUCjT9quBFzbCjcHmx g5dssAjm0kY7FGLGyhJaYa3x4z7Zm0dDojYGC0BM/RtzOqbUqfvwv6uC8mvXuaIwmYSR Jsw83c+FNTbM3T4ht5xFAjYq7WjSLbeRL4B627MOYcGg6tRvpIyIREoEk0mpSIqYb9A1 +q2ANOjcqbpup7JeE//RbsHPNf4emKOh/4CZw8MBDigXrMZ0Lt+Emd9xtlNPEbB2N2lB OQrGimfJu9Lz/6jvD5VRmJi3QgSmFEaXAkaIkfOFk/CdnafgngX7PzvtUmABilSJNzZp Kt3A== X-Gm-Message-State: ANhLgQ1szjD01FGNEtalp3uvIs4fHdpi73LeI/q5IvDLl3BV4xqYP8kk EHOQiN/NaFW7XUAV8aKa5LoMDCw2Qk/LBM1FgyA= X-Google-Smtp-Source: ADFU+vvskOQWHtsnYemaTs8bpb7TTzL6bwYLRLiOMWNGB18/sv5X0ZlJZLH70iqbTHa3oS34tzcHFYGRanfGM/UUyyI= X-Received: by 2002:a5d:4088:: with SMTP id o8mr4616751wrp.144.1584626853909; Thu, 19 Mar 2020 07:07:33 -0700 (PDT) MIME-Version: 1.0 References: <1798014688.138646.1584558854773@email.ionos.com> <96CBB48D-EACC-4D56-A827-CFAD8D9785ED@googlemail.com> <94274860.169386.1584626094837@email.ionos.com> In-Reply-To: <94274860.169386.1584626094837@email.ionos.com> From: Jonathan Wakely Date: Thu, 19 Mar 2020 14:07:22 +0000 Message-ID: Subject: Re: Building on Mac with --enable-tls To: Tom N Cc: Iain Sandoe , gcc-help Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Mar 2020 14:07:36 -0000 On Thu, 19 Mar 2020 at 13:54, Tom N wrote: > > > On March 18, 2020 at 7:53 PM Iain Sandoe wrote: > > > > Jonathan Wakely wrote: > > > > > > I would expect the default to be correct for the target i.e.--disable-tls. If enabling it worked correctly, it would be the default. > > > That makes no sense, neither std::mutex nor std::unique_lock uses TLS. > > > > Darwin uses emulated TLS on all versions (powerpc, i686, x86_64) the correct default (to use emulatedTLS) is selected without requiring any additional configure options. Selecting --enable-tls will undoubtedly produce an invalid configuration. > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52268 is an enhancement PR to add native TLS for 10.7+ (but that would still not work on earlier versions, of course). > > Thank you both for the quick responses! Knowing that lack of --enable-tls is normal on Mac set me in the right direction. The synchronization problem was due to an equally bad assumption. All working as expected now. Accidentally creating a temporary unique_lock that immediately goes out of scope? :-) http://kayari.org/cxx/antipatterns.html#locking-mutex