summaryrefslogtreecommitdiff
path: root/config/coreboot/default/patches/0040-Fix-build-with-GCC-15-as-host-compiler.patch
AgeCommit message (Collapse)Author
24 hourscoreboot: Add patch to fix build with GCC 15 as host compilerAlper Nebi Yasak
Building coreboot host tools with GCC 15 results in build errors: In file included from .../lbmk/src/coreboot/default/util/cbfstool/console/console.h:7, from .../lbmk/src/coreboot/default/src/commonlib/fsp_relocate.c:3: .../lbmk/src/coreboot/default/src/commonlib/include/commonlib/loglevel.h:170:26: error: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (6 chars into 5 available) [-Werror=unterminated-string-initialization] 170 | [BIOS_EMERG] = "EMERG", | ^~~~~~~ .../lbmk/src/coreboot/default/src/commonlib/include/commonlib/loglevel.h:171:26: error: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (6 chars into 5 available) [-Werror=unterminated-string-initialization] 171 | [BIOS_ALERT] = "ALERT", | ^~~~~~~ [...] ../cbfstool/common.c: In function 'bintohex': ../cbfstool/common.c:195:43: error: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (17 chars into 16 available) [-Werror=unterminated-string-initialization] 195 | static const char translate[16] = "0123456789abcdef"; | ^~~~~~~~~~~~~~~~~~ Add a patch that marks the latter with the "nonstring" attribute, and disable the warning for the former because I couldn't figure out how to add that attribute there. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>