[Buildroot] [PATCH 1/1] package/libdill: fix build with gcc-15.x
Bernd Kuhls
bernd at kuhls.net
Sun Oct 26 14:39:16 UTC 2025
Updated project URL: https://github.com/sustrik/libdill/pull/228
Adding -std=gnu17 was recommended in upstream PR:
https://github.com/sustrik/libdill/issues/229#issuecomment-2865524080
Fixes:
https://autobuild.buildroot.net/results/1a5/1a5e9d7df6c83a921cae39b4dc4b601be4d18e36/
Signed-off-by: Bernd Kuhls <bernd at kuhls.net>
---
package/libdill/Config.in | 2 +-
package/libdill/libdill.mk | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/package/libdill/Config.in b/package/libdill/Config.in
index 2376fc9698..ec649c6600 100644
--- a/package/libdill/Config.in
+++ b/package/libdill/Config.in
@@ -4,4 +4,4 @@ config BR2_PACKAGE_LIBDILL
Libdill is a C library that makes writing structured
concurrent programs easy.
- http://libdill.org
+ https://sustrik.github.io/libdill/
diff --git a/package/libdill/libdill.mk b/package/libdill/libdill.mk
index 9dda81d085..e68ee819ec 100644
--- a/package/libdill/libdill.mk
+++ b/package/libdill/libdill.mk
@@ -12,6 +12,13 @@ LIBDILL_INSTALL_STAGING = YES
# Fetched from Github, with no configure script
LIBDILL_AUTORECONF = YES
+# 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)
+LIBDILL_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=gnu17"
+endif
+
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
LIBDILL_CONF_OPTS += --enable-threads
else
--
2.47.3
More information about the buildroot
mailing list