diff --git a/Makefile b/Makefile index f6cacd272b..af66d717f8 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ BR_LINK = https://github.com/buildroot/buildroot/archive BR_FILE = /tmp/buildroot-$(BR_VER).tar.gz BR_CONF = $(TARGET)/openipc_defconfig TARGET ?= $(PWD)/output +export CMAKE_POLICY_VERSION_MINIMUM := 3.5 CONFIG = $(error variable BOARD not defined) TIMER := $(shell date +%s) diff --git a/general/package/all-patches/m4/0001-fix-gnulib-nodiscard-gcc15.patch b/general/package/all-patches/m4/0001-fix-gnulib-nodiscard-gcc15.patch new file mode 100644 index 0000000000..42b8e988af --- /dev/null +++ b/general/package/all-patches/m4/0001-fix-gnulib-nodiscard-gcc15.patch @@ -0,0 +1,21 @@ +From: OpenIPC +Subject: [PATCH] Fix gnulib _GL_ATTRIBUTE_NODISCARD for GCC 15 / C23 + +GCC 15 defaults to C23 where __STDC_VERSION__ > 201710L, causing gnulib +to use [[__nodiscard__]] C23 attribute syntax. This syntax doesn't work +when placed between 'inline' and the return type in older gnulib code. + +Fall back to __attribute__((warn_unused_result)) which works in all +positions. + +--- a/lib/config.hin ++++ b/lib/config.hin +@@ -2586,7 +2586,7 @@ + # define _GL_ATTRIBUTE_MALLOC + #endif + +-#if 201710L < __STDC_VERSION__ ++#if 0 && 201710L < __STDC_VERSION__ + # define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]] + #elif _GL_HAS_ATTRIBUTE (warn_unused_result) + # define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__))