From 00fa6003038b4c4483f52dded1f8b9cf2fa57e5a Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Mon, 11 Aug 2025 17:32:57 +0200 Subject: [PATCH] package/bash: fix build with gcc 15 Commit 6d09b25d08fe (package/bash: fix build with host GCC 15) did apply a workaround for when the host gcc is gcc-15 (or later), but missed the fact that the target compiler also exhibits build issues. For the same reasons as explained in 6d09b25d08fe, don't try and fix those issues, but just paper over the problem by using an older C standard. Fixes: https://autobuild.buildroot.net/results/1ee74d546182695d3411358f028fcce8ccbb74c3/ Signed-off-by: Yann E. MORIN Cc: Adam Duskett Cc: Florian Larysch Cc: Julien Olivain Reviewed-by: Florian Larysch Signed-off-by: Thomas Petazzoni --- package/bash/bash.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package/bash/bash.mk b/package/bash/bash.mk index 2747802592..7fb43c52c0 100644 --- a/package/bash/bash.mk +++ b/package/bash/bash.mk @@ -26,6 +26,11 @@ BASH_CONF_ENV = \ bash_cv_func_sigsetjmp=present \ bash_cv_printf_a_format=yes +# Can be dropped when bash is bumped to 5.3 or newer. +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_15),y) +BASH_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=gnu17" +endif + ifeq ($(BR2_HOST_GCC_AT_LEAST_15),y) BASH_CONF_ENV += CFLAGS_FOR_BUILD="$(HOST_CFLAGS) -std=gnu17" endif