From b2dda651348161c271cc05bf9698f213f20b59f0 Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Sat, 30 May 2026 11:10:18 +0200 Subject: [PATCH] package/libdill: fix build with gcc-15.x 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 Signed-off-by: Arnout Vandecappelle --- package/libdill/libdill.mk | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package/libdill/libdill.mk b/package/libdill/libdill.mk index bea9aaeecb..453031a471 100644 --- a/package/libdill/libdill.mk +++ b/package/libdill/libdill.mk @@ -13,6 +13,13 @@ LIBDILL_INSTALL_STAGING = YES LIBDILL_DEPENDENCIES = host-pkgconf 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