]> xenbits.xensource.com Git - xen.git/commit
CI: Fix cppcheck parallel build more
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 31 Oct 2024 16:14:40 +0000 (16:14 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 31 Oct 2024 17:25:40 +0000 (17:25 +0000)
commite27436fba7f52ddc00c33e569ef91a07da433067
treef2700cc7a684d5f09bdd03a35292202b9cc5f8e4
parent7a88871aac3feb9736dedc1f7e3c343166b676d2
CI: Fix cppcheck parallel build more

A recent cppcheck run was found to fail:

  https://gitlab.com/xen-project/people/andyhhp/xen/-/jobs/8237167472

with:

  "type mismatch! call is<type>() before get<type>()" && is<std::string>()
  make[3]: *** [arch/x86/boot/Makefile:28: arch/x86/boot/reloc-trampoline.32.o] Error 1

This turns out to be a parallel build issue, combined with a recent change to
x86.  Notably, we now have a case where we build both:

  CC      arch/x86/boot/reloc-trampoline.32.o
  CC      arch/x86/boot/reloc-trampoline.o

from the same original C file, and cppcheck uses the source C file as the key
for generating it's intermediate files.

Switch cppcheck to use the object file as the unique key instead.

Fixes: 45bfff651173 ("xen/misra: xen-analysis.py: fix parallel analysis Cppcheck errors")
Fixes: db8acf31f96b ("x86/boot: Reuse code to relocate trampoline")
Suggested-by: Luca Fancellu <luca.fancellu@arm.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
Tested-by: Luca Fancellu <luca.fancellu@arm.com>
xen/tools/cppcheck-cc.sh