[Buildroot] [git commit branch/2025.08.x] package/sbc: fix build with gcc-15.x
Thomas Perale
thomas.perale at mind.be
Thu Dec 4 12:23:20 UTC 2025
commit: https://git.buildroot.net/buildroot/commit/?id=bbcb39d46d9248d17130657b4545e913d9264cbe
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2025.08.x
Fixes:
https://autobuild.buildroot.net/results/2d1/2d16eb4bb0c7f095d0d52af8553c498f6f9a295c/
Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
(cherry picked from commit b871105790e071edee40fe51d76a83fa1c285540)
Signed-off-by: Thomas Perale <thomas.perale at mind.be>
---
package/sbc/sbc.mk | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/package/sbc/sbc.mk b/package/sbc/sbc.mk
index 7a37a99643..115867fa0a 100644
--- a/package/sbc/sbc.mk
+++ b/package/sbc/sbc.mk
@@ -12,6 +12,13 @@ SBC_DEPENDENCIES = host-pkgconf
SBC_LICENSE := LGPL-2.1+ (library)
SBC_LICENSE_FILES = COPYING COPYING.LIB
+# gcc-15 defaults to -std=gnu23 which introduces build failures.
+# We force "-std=gnu17" for gcc version supporting it. Earlier gcc
+# versions will work, since they are using the older standard.
+ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_8),y)
+SBC_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=gnu17"
+endif
+
ifeq ($(BR2_PACKAGE_SBC_TOOLS),y)
SBC_DEPENDENCIES += libsndfile
SBC_CONF_OPTS += --enable-tools --enable-tester
More information about the buildroot
mailing list