From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7187 invoked by alias); 12 Jul 2018 19:41:32 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 7141 invoked by uid 89); 12 Jul 2018 19:41:30 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-ua0-f193.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zQT+ntTFJbKes9D5AnTuPM5eKrpG2MUc+FcG/Nl/vr0=; b=Z35GsNwvIM3D0NrEF/Ibbex5aeN1HFhAhEVHNoiHlsXXnHFE8tj5yoBjABn04Q/k11 ezJMfHGXvVfg2xdBTegKDwZRR6/7m/DsP1QmnS+Lttc8S8/IPIOXRN1e7BGqTi0e3yyG f0LWcmiEujnZdDWgDNv8yFYPP5/G7ackLuhMg= Return-Path: Subject: Re: [PATCH v8 1/8] nptl: Add C11 threads thrd_* functions To: Florian Weimer , libc-alpha@sourceware.org References: <1517591084-11347-1-git-send-email-adhemerval.zanella@linaro.org> <1517591084-11347-2-git-send-email-adhemerval.zanella@linaro.org> <8c257a2d-60b4-e12d-28a5-d7a4fc4408de@redhat.com> <837df3e1-dbcf-ecc4-55ab-e89d7c447bba@linaro.org> <291f3ef9-0312-2f50-4c66-b3efda628cda@redhat.com> From: Adhemerval Zanella Openpgp: preference=signencrypt Message-ID: Date: Thu, 12 Jul 2018 19:41:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <291f3ef9-0312-2f50-4c66-b3efda628cda@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2018-07/txt/msg00346.txt.bz2 On 12/07/2018 16:26, Florian Weimer wrote: > On 07/12/2018 09:19 PM, Adhemerval Zanella wrote: >> Also on GCC BZ#53769 [1] Joseph wrote that check for __STDC_VERSION__ >> and/or __STDC_NO_THREADS__ is not meaningful to documented incomplete >> compiler support for language standard.  This is at least for GCC >> standpoint, not sure about other compilers. >> >> We could add a check like: >> >> #if (defined (__GNUC__) && !__GNUC_PREREQ (4.9)) >>      || (!defined (__cpluscplus) &&  __cplusplus < 201103L) >> #  define __STDC_NO_THREADS__   1 >> #endif >> >> [1]https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53769 > > I think your first patch was fine.  The header exists after your change. > > We could polish the definition of thread_local in the header file with some conditionals, though, so that we fall back to __thread for GCC prior to 4.9.  The definition of the thread_local macro will be non-confirming, but that's what you get for using a non-conforming implementation. > > (If the C compiler is not known to be C, we need to use _Thread_local, even though __thread probably covers more old implementations out there.) > > Thanks, > Florian Right, I will keep the definition as is then.