From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 0BF0B385B510 for ; Fri, 17 Feb 2023 13:46:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0BF0B385B510 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31HCv8xd014514 for ; Fri, 17 Feb 2023 13:46:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : subject : to : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=Bp58zvtUtSJEOzyBI/Cob9tDEdtPdkqMGYeF23fZwlE=; b=NK0XMLyV1roNFfiYAvR3AH+kctF2nMqh+duZLfvze0gv08kJjgQU69C+Z4UiV5kbfpuV vmXXBJ/qXYDHd1MD03MKpH3Z+kYBfMLHq3/VMO1TdjI+QfNMRnbrYwkPXlHRUQBevpoL H/3tX1LmrwRNFPiEMVLo8+v512QwL0U3lTjOWT5GRsGl4yz8p8UcVrtw7AM7oGrN5NGI aKARaKsZT6mbQxP/Luy0fr3WIEopPQOUekpbeBKZWEBwNhSLmLmaVgrskSg1utYa1pqT +KxxQwXUV1mwfOn18W94ZvAct4kOyzYcWsQroPSo6u53edzruZZEeBDx2fodHXKFwSpB Jg== Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3nt15wvx0b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 17 Feb 2023 13:46:19 +0000 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 31GLIe1q008524 for ; Fri, 17 Feb 2023 13:46:17 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma05fra.de.ibm.com (PPS) with ESMTPS id 3np2n6dy19-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 17 Feb 2023 13:46:17 +0000 Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 31HDkFoC26345854 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 17 Feb 2023 13:46:15 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 144932004D for ; Fri, 17 Feb 2023 13:46:15 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DFBA320040 for ; Fri, 17 Feb 2023 13:46:14 +0000 (GMT) Received: from [9.171.88.45] (unknown [9.171.88.45]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTP for ; Fri, 17 Feb 2023 13:46:14 +0000 (GMT) Message-ID: <9e8a1491-e778-674c-5d4f-71f473e2aa53@linux.ibm.com> Date: Fri, 17 Feb 2023 14:46:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: Fix ifunc-impl-list.c build for s390 Content-Language: en-US To: libc-alpha@sourceware.org References: <4e5aeda7-899e-5bc6-b2d-c9e2359f4e3@codesourcery.com> From: Stefan Liebler In-Reply-To: <4e5aeda7-899e-5bc6-b2d-c9e2359f4e3@codesourcery.com> Content-Type: text/plain; charset=UTF-8 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: uuVAo-cYjR06atLK0OozHpilZFxxHvGJ X-Proofpoint-GUID: uuVAo-cYjR06atLK0OozHpilZFxxHvGJ Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.170.22 definitions=2023-02-17_08,2023-02-17_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 clxscore=1015 suspectscore=0 malwarescore=0 adultscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 mlxscore=0 mlxlogscore=999 spamscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302170122 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,GIT_PATCH_0,KAM_NUMSUBJECT,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,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: On 16.02.23 22:39, Joseph Myers wrote: > 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. > Thanks Joseph for catching it. In case of building with latest -march argument, I've removed the last user with my recent commit: "S390: Influence hwcaps/stfle via GLIBC_TUNABLES." https://sourceware.org/git/?p=glibc.git;a=commit;h=41f67ccbe92b4fd09e1062b383e55e407ae5bfa1 Reviewed-by: Stefan Liebler > 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 > I will have a look. Independently I've recognized a fail on x86_64/s390x with -O3 starting with commit 32c7acd46401530fdbd4e98508c9baaa705f8b53 "Replace rawmemchr (s, '\0') with strchr": In function ‘nis_local_host’, inlined from ‘nis_local_host’ at nis_local_names.c:147:1: nis_local_names.c:171:11: error: ‘strncpy’ output may be truncated copying between 0 and 1023 bytes from a string of length 1024 [-Werror=stringop-truncation] 171 | strncpy (cp, nis_local_directory (), NIS_MAXNAMELEN - len -1); But so far I had no further time to look into it. > 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; > >