]> git.ipfire.org Git - thirdparty/glibc.git/commit
Fix sysdeps/mips/dl-machine-reject-phdr.h build with GCC 16
authorJoseph Myers <josmyers@redhat.com>
Wed, 3 Sep 2025 16:04:49 +0000 (16:04 +0000)
committerJoseph Myers <josmyers@redhat.com>
Wed, 3 Sep 2025 16:04:49 +0000 (16:04 +0000)
commitb7f904012afa12969615651d6f0eadce14353ccb
treec68d7345f8da39ccc3bde94cec0f2ffde9d939c4
parent8ced7815fbff7bec9af2b7611a3478af27b57d13
Fix sysdeps/mips/dl-machine-reject-phdr.h build with GCC 16

Building for MIPS has been broken with GCC mainline since mid-July,
probably GCC commit 0eac9cfee8cb0b21de866a04d5d59685ab35208f "c, c++:
Extend -Wunused-but-set-* warnings [PR44677]", because the variable
perfect_match in elf_machine_reject_phdr_p is set unconditionally, but
only used if _MIPS_SIM == _ABIO32.  Mark it with __attribute__ ((unused)),
which seems cleaner in such a conditionally-used case than making all
other logic relating to this variable conditional.

Tested with build-many-glibcs.py (compilers build, which previously
failed) for mips64-linux-gnu.
sysdeps/mips/dl-machine-reject-phdr.h