From patchwork Thu Feb 16 21:39:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 65135 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9A313383FB91 for ; Thu, 16 Feb 2023 21:40:06 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 2A6B73858D33 for ; Thu, 16 Feb 2023 21:39:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2A6B73858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.97,302,1669104000"; d="scan'208";a="97129119" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 16 Feb 2023 13:39:48 -0800 IronPort-SDR: YaVhizyqDEviujaHLiEIu1ZlEAKLgSDxw3u3XPGFq99W/n6R0u8J5sPErMYTSjkry8r4bn3ocv mppyTPJJNtZfzeg5y4S2bXpQ7ojA/RG3JXhcO5cjHqY1r1shrUo0AKY7yGGDXAx/b+enpSHyQv r0+Hu1rBcZA4wRLcOxLW1SZk6v4MFH8YDSlhkxjsuNXByyPphIuVch0ng/eGeVUAmDt38KR+o3 J87ICuL95MTXsDaOKfRjN46a9GpgdvG4SSsYdxIfutIClxU7JfMq59ykCpKbsRiYs3yS8ENqC3 Y0c= Date: Thu, 16 Feb 2023 21:39:43 +0000 From: Joseph Myers To: Subject: Fix ifunc-impl-list.c build for s390 Message-ID: <4e5aeda7-899e-5bc6-b2d-c9e2359f4e3@codesourcery.com> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-13.mgc.mentorg.com (139.181.222.13) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3114.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_NUMSUBJECT, SPF_HELO_PASS, 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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Builds for s390 recently started failing with: ../sysdeps/s390/multiarch/ifunc-impl-list.c: In function '__libc_ifunc_impl_list': ../sysdeps/s390/multiarch/ifunc-impl-list.c:83:21: error: unused variable 'dl_hwcap' [-Werror=unused-variable] 83 | unsigned long int dl_hwcap = features->hwcap; | ^~~~~~~~ https://sourceware.org/pipermail/libc-testresults/2023q1/010855.html Add __attribute__ ((unused)) as already done for another variable there. Tested with build-many-glibcs.py (compilers and glibcs) for s390x-linux-gnu and s390-linux-gnu. Note: s390x-linux-gnu-O3 started failing with a different error earlier; that problem may still need to be fixed after this fix is in. https://sourceware.org/pipermail/libc-testresults/2023q1/010829.html Reviewed-by: Stefan Liebler diff --git a/sysdeps/s390/multiarch/ifunc-impl-list.c b/sysdeps/s390/multiarch/ifunc-impl-list.c index 1532258af2..faa428f9ab 100644 --- a/sysdeps/s390/multiarch/ifunc-impl-list.c +++ b/sysdeps/s390/multiarch/ifunc-impl-list.c @@ -80,7 +80,7 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array, /* Get hardware information. */ const struct cpu_features *features = &GLRO(dl_s390_cpu_features); - unsigned long int dl_hwcap = features->hwcap; + unsigned long int dl_hwcap __attribute__ ((unused)) = features->hwcap; const unsigned long long * __attribute__((unused)) stfle_bits = features->stfle_bits;