binutils Newspaper
JUNE 15, 2026
binutils Proposed

Fix build under glibc 2.43

H.J. Lu proposes backporting patches to binutils 2.46 to fix build issues with glibc 2.43 due to stricter const checking.

H.J. Lu proposes backporting several patches from the master branch to binutils 2.46 to address build failures encountered with glibc 2.43. The failures are due to stricter const qualifier checks in glibc’s string.h when compiling code against the C23 standard. The patches fix -Wdiscarded-qualifiers errors in ldlang.c, ld.c, binutils, and gprof.

In Details

This patch series addresses build failures in binutils 2.46 when compiled against glibc 2.43. The root cause is stricter enforcement of const correctness in glibc's headers, specifically the strrchr declaration. The patches backport fixes for -Wdiscarded-qualifiers errors.

For Context

Binutils, the binary utilities, are a collection of tools used for working with binary files, such as executables and object code. Glibc, the GNU C Library, provides the standard C library functions used by programs. This series of patches fixes a build problem where older versions of binutils fail to compile against newer versions of glibc. The problem stems from stricter rules about the use of the const keyword in the C language, which indicates that a value should not be modified.

Filed Under: buildglibcconstbackport