package/binutils: never build readline to fix GCC 15.x build issue
PATCH 1/1 package/binutils: never build readline to fix GCC 15.x build issue
The binutils-gdb code base in Git does have a copy of readline that is used by gdb.
The release tarballs of binutils do NOT contain readline as it's not needed for binutils itself (only gdb).
However, when we build the ARC binutils, taken from Git, the readline/ folder is present, and therefore readline is built even if it is not actually needed.
This causes build failures as the copy of readline in ARC binutils 2024.12 (based on binutils 2.43) does not build with GCC 15.x.
To work around this problem, we use a suggestion from Waldemar
Brodkorb: pass --with-system-readline. Indeed, this disables the build of readline... but it does not actually check that we have a system readline, since we're not building gdb.
Fixes:
https://autobuild.buildroot.net/results/976243181f7000fe2790b3450bdae51e8c12769e/
--- package/binutils/binutils.mk | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-)
package/binutils/binutils.mk +18 -2
@@ -47,6 +47,13 @@ BINUTILS_DISABLE_GDB_CONF_OPTS = \ --disable-gdb # We need to specify host & target to avoid breaking ARM EABI +# +# --with-system-readline to never build readline, as binutils doesn't +# need it (only gdb does). For binutils release tarballs, readline +# is not shipped, but when we get it from git, it is present and +# gets built which can cause build issues, so force skipping +# it. Note: the configure script will not check for readline as it +# doesn't need it. BINUTILS_CONF_OPTS = \ --disable-multilib \ --disable-werror \
@@ -58,7 +65,8 @@ BINUTILS_CONF_OPTS = \ --disable-gprofng \ $(BINUTILS_DISABLE_GDB_CONF_OPTS) \ $(BINUTILS_EXTRA_CONFIG_OPTIONS) \ - --without-zstd + --without-zstd \ + --with-system-readline ifeq ($(BR2_STATIC_LIBS),y) BINUTILS_CONF_OPTS += --disable-plugins
@@ -82,6 +90,13 @@ endif # "host" binutils should actually be "cross" # We just keep the convention of "host utility" for now +# +# --with-system-readline to never build readline, as binutils doesn't +# need it (only gdb does). For binutils release tarballs, readline +# is not shipped, but when we get it from git, it is present and +# gets built which can cause build issues, so force skipping +# it. Note: the configure script will not check for readline as it +# doesn't need it. HOST_BINUTILS_CONF_OPTS = \ --disable-multilib \ --disable-werror \
@@ -95,7 +110,8 @@ HOST_BINUTILS_CONF_OPTS = \ --enable-lto \ $(BINUTILS_DISABLE_GDB_CONF_OPTS) \ $(BINUTILS_EXTRA_CONFIG_OPTIONS) \ - --without-zstd + --without-zstd \ + --with-system-readline ifeq ($(BR2_BINUTILS_GPROFNG),y) HOST_BINUTILS_DEPENDENCIES += host-bison
Signature · 6 lines
2.50.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Romain Naour via buildroot
AppliedHello Thomas, All,
Le 18/08/2025 à 10:41, Thomas Petazzoni via buildroot a écrit :
Quoted 18 lines
The binutils-gdb code base in Git does have a copy of readline that is used by gdb.
The release tarballs of binutils do NOT contain readline as it's not needed for binutils itself (only gdb).
However, when we build the ARC binutils, taken from Git, the readline/ folder is present, and therefore readline is built even if it is not actually needed.
This causes build failures as the copy of readline in ARC binutils 2024.12 (based on binutils 2.43) does not build with GCC 15.x.
To work around this problem, we use a suggestion from Waldemar
Brodkorb: pass --with-system-readline. Indeed, this disables the build of readline... but it does not actually check that we have a system readline, since we're not building gdb.
Quoted 5 lines
Fixes:
https://autobuild.buildroot.net/results/976243181f7000fe2790b3450bdae51e8c12769e/
Signed-off-by Thomas Petazzoni <[email protected]>
Applied to master, thanks.
Best regards,
Romain
Quoted 47 lines
--- package/binutils/binutils.mk | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-)package/binutils/binutils.mk +16
-1@@ -47,6 +47,13 @@ BINUTILS_DISABLE_GDB_CONF_OPTS = \ --disable-gdb # We need to specify host & target to avoid breaking ARM EABI +# +# --with-system-readline to never build readline, as binutils doesn't +# need it (only gdb does). For binutils release tarballs, readline +# is not shipped, but when we get it from git, it is present and +# gets built which can cause build issues, so force skipping +# it. Note: the configure script will not check for readline as it +# doesn't need it. BINUTILS_CONF_OPTS = \ --disable-multilib \ --disable-werror \@@ -58,7 +65,8 @@ BINUTILS_CONF_OPTS = \ --disable-gprofng \ $(BINUTILS_DISABLE_GDB_CONF_OPTS) \ $(BINUTILS_EXTRA_CONFIG_OPTIONS) \ - --without-zstd + --without-zstd \ + --with-system-readline ifeq ($(BR2_STATIC_LIBS),y) BINUTILS_CONF_OPTS += --disable-plugins@@ -82,6 +90,13 @@ endif # "host" binutils should actually be "cross" # We just keep the convention of "host utility" for now +# +# --with-system-readline to never build readline, as binutils doesn't +# need it (only gdb does). For binutils release tarballs, readline +# is not shipped, but when we get it from git, it is present and +# gets built which can cause build issues, so force skipping +# it. Note: the configure script will not check for readline as it +# doesn't need it. HOST_BINUTILS_CONF_OPTS = \ --disable-multilib \ --disable-werror \
package/binutils/binutils.mk HOST_BINUTILS_CONF_OPTS = \ · line 117
Quoted 9 lines
package/binutils/binutils.mk +2
-1@@ -95,7 +110,8 @@ HOST_BINUTILS_CONF_OPTS = \ --enable-lto \ $(BINUTILS_DISABLE_GDB_CONF_OPTS) \ $(BINUTILS_EXTRA_CONFIG_OPTIONS) \ - --without-zstd + --without-zstd \ + --with-system-readline ifeq ($(BR2_BINUTILS_GPROFNG),y) HOST_BINUTILS_DEPENDENCIES += host-bison
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot