[PATCH 0/4] Fix build errors due to qualifier preserving strchr()
Simon Marchi
simon.marchi@polymtl.ca
Sun Apr 26 03:02:44 GMT 2026
On 2026-04-24 22:19, Calvin Owens wrote:
> 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 :)
In addition to those I pointed out in my other messages, I found one
more error by changing `#ifdef HAVE_DOS_BASED_FILE_SYSTEM` to `#ifndef
HAVE_DOS_BASED_FILE_SYSTEM` throughout. At binutils/bucomm.c:505,
variable `bslash` should be made const.
Thanks,
Simon
More information about the Binutils
mailing list