[PATCH 0/4] Fix build errors due to qualifier preserving strchr()
Calvin Owens
calvin@wbinvd.org
Sat Apr 25 02:19:43 GMT 2026
Hello all,
Building binutils with glibc 2.43 and GCC 15.2 fails due to the new
qualifier preserving strchr() and strrchr(), which now return a const
pointer when passed one as their first argument.
This small series fixes the errors. Unfortunately, one requires a little
bit of refactoring (the second patch), but it is still straightforward.
The patches are against current master, but also applied cleanly to the
2.46 branch when I checked earlier today.
Commit SHAs 9cb12adfb54, b3679b82926, 36974d77e95, and 38e9187d24b have
already fixed many such build errors: hopefully I have found all the
remaining issues in this patchset :)
Thanks,
Calvin
Calvin Owens (4):
gprof: Fix discarded-qualifiers problems in source.c
ld: Refactor input_statement_is_archive_path() to not touch its argument
ld: Fix discarded-qualifiers problems in ldlang.c
ld: Fix discarded-qualifiers problems in ldelf.c
gprof/source.c | 7 ++++---
ld/ldelf.c | 4 ++--
ld/ldlang.c | 18 ++++++++++--------
3 files changed, 16 insertions(+), 13 deletions(-)
--
2.47.3
More information about the Binutils
mailing list