Skip to contentSkip to conversation

x86emul/test: correct compiler checking and avoid it when merely cleaning

PATCH In review Jan Beulich 2 participants 2 messages Nov 20, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86emul/test: correct compiler checking and avoid it when merely cleaning

The error messages that the compiler may emit can be confusing.

The check was also the wrong way round in case multiple make targets are
specified: We want to do the check whenever targets other than the running and cleaning ones are specified.

Fixes 05f4cc219235 ("x86emul: suppress default test harness build with incapable compiler")
Fixes d5997399b7ad ("x86emul: suppress "not built" warning for test harness'es run targets")
tools/tests/x86_emulator/Makefile +1 -1
@@ -98,7 +98,7 @@ avx512bw-opmask-vecs := 4 8
 # partially even with older compilers.
 TARGET-y := $(TARGET)
 
-ifeq ($(filter run%,$(MAKECMDGOALS)),)
+ifneq ($(filter-out run% clean% distclean,$(MAKECMDGOALS)),)
 
 define isa-check-cc
 TARGET-$(shell echo 'int i;' | $(CC) -x c -c -o /dev/null -m$(1) - || echo y) :=
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Jan Beulich

The error messages that the compiler may emit can be confusing.

The check was also the wrong way round in case multiple make targets are
specified: We want to do the check whenever targets other than the running and cleaning ones are specified.

Fixes 05f4cc219235 ("x86emul: suppress default test harness build with incapable compiler")
Fixes d5997399b7ad ("x86emul: suppress "not built" warning for test harness'es run targets")