From dcc6c64bd7063b434317204d09a95fc6ab47f490 Mon Sep 17 00:00:00 2001 From: Daniele Lacamera Date: Tue, 15 Sep 2026 18:04:21 +0200 Subject: [PATCH] unit-tests: pin -std=gnu17 for host test builds GCC 14+ defaults to gnu23, where glibc string.h defines memchr and memcpy as _Generic macros that clash with wolfBoot's own declarations in tests that #include a .c file (unit-string). gnu17 matches the CI toolchain default. --- tools/unit-tests/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/unit-tests/Makefile b/tools/unit-tests/Makefile index 22a411d8..d6360938 100644 --- a/tools/unit-tests/Makefile +++ b/tools/unit-tests/Makefile @@ -41,6 +41,10 @@ CFLAGS+=-ftest-coverage CFLAGS+=--coverage CFLAGS+=-DUNIT_TEST_COVERAGE CFLAGS+=-DUNIT_TEST -DWOLFSSL_USER_SETTINGS +# Pin the standard: GCC 14+ defaults to gnu23, where glibc string.h defines +# memchr/memcpy as _Generic macros that clash with wolfBoot's own declarations +# in tests that #include a .c file. gnu17 matches the CI toolchain default. +CFLAGS+=-std=gnu17 LDFLAGS+=-fprofile-arcs LDFLAGS+=-ftest-coverage