From 7d0456d510090ee90634486702a73c75102e99f1 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 29 Aug 2025 16:34:05 +0200 Subject: [PATCH] package/libkrb5: fix GCC 15.x build issues Backport upstream commit 4b9d7f7c107f01a61600fddcd8cde3812d0366a2 would allow to solve GCC 15.x issues, but it's a 313 KB patch. So instead, let's build with -std=gnu99. It requires a bit of reorganization on how CFLAGS are handled. Fixes: http://autobuild.buildroot.net/results/4460089f5989277e6143f6e3d66f71371913ee4b/ Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/libkrb5/libkrb5.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package/libkrb5/libkrb5.mk b/package/libkrb5/libkrb5.mk index e57a2b98a2..d0ec877d35 100644 --- a/package/libkrb5/libkrb5.mk +++ b/package/libkrb5/libkrb5.mk @@ -16,6 +16,8 @@ LIBKRB5_CPE_ID_PRODUCT = kerberos_5 LIBKRB5_DEPENDENCIES = host-bison $(TARGET_NLS_DEPENDENCIES) LIBKRB5_INSTALL_STAGING = YES +LIBKRB5_CFLAGS = $(TARGET_CFLAGS) -std=gnu99 + # The configure script uses AC_TRY_RUN tests to check for those values, # which doesn't work in a cross-compilation scenario. Therefore, # we feed the configure script with the correct answer for those tests @@ -38,9 +40,11 @@ LIBKRB5_CONF_OPTS = \ # Error: selected processor does not support `mcr p15,0,r2,c7,c10,5' in Thumb mode # so, we deactivate Thumb mode ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y) -LIBKRB5_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -marm" +LIBKRB5_CFLAGS += -marm endif +LIBKRB5_CONF_ENV += CFLAGS="$(LIBKRB5_CFLAGS)" + # Enabling static and shared at the same time is not supported ifeq ($(BR2_SHARED_STATIC_LIBS),y) LIBKRB5_CONF_OPTS += --disable-static