From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id E3A2F385803D for ; Fri, 28 Oct 2022 17:35:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E3A2F385803D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ot1-x32c.google.com with SMTP id a13-20020a9d6e8d000000b00668d65fc44fso3345612otr.9 for ; Fri, 28 Oct 2022 10:35:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=aEqZsFnmWtQ8+HtQ8PHr3LfGGki/Jn/+C55yVPH24AA=; b=Yu0nExxNRb4yMj4AGP0WfCXRAOZFQ/sdOhSzm5tlYeZ0vIBIUH894clU8GcIydq+v1 XUa0B0gkMLL8ctQjGJKJ2G4mSvGxBWfT9QVSDwfFofUS4ladEdxVXC5lznu8xOYWKJm6 owqxiPNnndmnnqwtjD1y6pNNxBbsCL/oon9jlUq/wBQK5+OnljSH5w6imnqcQmxrBwl5 qILRxUyCgL3GYSwrOmr8o2Yas3jexNH8WIvsuOWjz7fBZuwJ6TDewtt1OTk+vCGvepRi qk+Su7HeQDduagBzVicjneaZZctLyttDYAIStsSurCodYTWKgcIn3DzrxnHe2GfiRIJ4 uH0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aEqZsFnmWtQ8+HtQ8PHr3LfGGki/Jn/+C55yVPH24AA=; b=ikxtHpyFi/qW7q9m0q8AfmpLL7x6MyJK2l+e2zWq/LcNd/+lf2tEO2ccrVkkddWhig thGoCpFLoruHAH5DsOWDIdzPh2kTetvwa0F/U5raFaWNNXK+vaQXuFiWBMTuOq5eatpL oPnRs1dj0KFjxxYhGmzdRXMrR+6n6yMdBqoTd7mRWPj1bxl2p24iE2fh3mYOyMS7nQ3C R7dJC+0rppD8h56ICHxCO4Dg2rVJEvW82RzrRx614EjTz5mYkFNSZy1OmGoTPZiMP9Bw giKMUjkpsQcVIY3HnSSVB6h2E+qqvWCQCVaTukuf1SzMSosC74qbJrEApybABFMd3tve faQg== X-Gm-Message-State: ACrzQf0KUT/K0pXWKE4e4IJZSAsteipMFj9Zy0Ks7aCmcE6zBcRUzHNL 5+kasOCOCBwRBMoA7XHiW5Bsu9pAvWb/MB3T X-Google-Smtp-Source: AMsMyM7hnWCxO5F785nijzqBcGGJy7tMPabR8JsjO/tIfascq9wMx0667LiOCZbTelVMWV+G7BNGcA== X-Received: by 2002:a9d:2909:0:b0:661:9cae:6f08 with SMTP id d9-20020a9d2909000000b006619cae6f08mr226376otb.277.1666978554247; Fri, 28 Oct 2022 10:35:54 -0700 (PDT) Received: from mandiga.. ([2804:1b3:a7c0:17c8:6484:1100:1451:7f3f]) by smtp.gmail.com with ESMTPSA id v10-20020a056870b50a00b0012779ba00fesm2434998oap.2.2022.10.28.10.35.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Oct 2022 10:35:54 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 11/11] nptl: Fix pthread_create.c build with clang Date: Fri, 28 Oct 2022 14:35:32 -0300 Message-Id: <20221028173532.876027-12-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221028173532.876027-1-adhemerval.zanella@linaro.org> References: <20221028173532.876027-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,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 List-Id: clang complains that libc_hidden_data_def (__nptl_threads_events) creates an invalid alias: pthread_create.c:50:1: error: alias must point to a defined variable or function libc_hidden_data_def (__nptl_threads_events) ^ ../include/libc-symbols.h:621:37: note: expanded from macro 'libc_hidden_data_def' It seems that clang requires that a proper prototype is defined prior the hidden alias creation. --- nptl/pthread_create.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c index 32ae2f4b2f..34a41a0fdf 100644 --- a/nptl/pthread_create.c +++ b/nptl/pthread_create.c @@ -45,13 +45,15 @@ /* Globally enabled events. */ -td_thr_events_t __nptl_threads_events; +extern td_thr_events_t __nptl_threads_events; libc_hidden_proto (__nptl_threads_events) +td_thr_events_t __nptl_threads_events; libc_hidden_data_def (__nptl_threads_events) /* Pointer to descriptor with the last event. */ -struct pthread *__nptl_last_event; +extern struct pthread *__nptl_last_event; libc_hidden_proto (__nptl_last_event) +struct pthread *__nptl_last_event; libc_hidden_data_def (__nptl_last_event) #ifdef SHARED -- 2.34.1