Attention is currently required from: Jakub Czapiga. Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/57009 )
Change subject: tests: Fix function mocking for clang ......................................................................
Patch Set 1:
(1 comment)
File tests/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/57009/comment/ae277143_1dfc1fc1 PS1, Line 60: TEST_CFLAGS += $(if $(filter clang,$(shell $(HOSTCC) --version)),,-Werror)
We could add a new diagnostic flag e.g. "-Wno-weak-identifier-undeclared" and add check:
I mean, the problem is that those flags don't exist right now, on the versions people are using. Even if clang was fixed to support this better we would still need to wait for that patch to make it into an official release, and then people would still need to actually install that very newest bleeding edge version. (In practice, I think it's pretty common to see people using compiler versions many years old -- a while ago we got huge complaints when coreboot compilation broke for GCC older than 6.0.0, I believe.)
I'm certainly not opposed to someone adding this flag to clang, and once it's available we can expand this code to work better for the newer versions. But I think we still need to carry around the ugly fix for anyone with an older version for quite a while.