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.
pull/892/head
Daniele Lacamera 2026-09-15 18:04:21 +02:00
parent c1a7d89b2d
commit dcc6c64bd7
1 changed files with 4 additions and 0 deletions

View File

@ -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