]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix ifunc-impl-list.c build for s390
authorJoseph Myers <joseph@codesourcery.com>
Fri, 17 Feb 2023 17:23:50 +0000 (17:23 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Fri, 17 Feb 2023 17:23:50 +0000 (17:23 +0000)
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

sysdeps/s390/multiarch/ifunc-impl-list.c

index 1532258af2c3efe0ec04e61d5da5ade3a4dab67f..faa428f9abe23d08e679b0081a19465707fdd1c6 100644 (file)
@@ -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;