The Makefile dependencies do not include header files, and adding header files to extra-files calls will cause the header to be passed to the compiler to compile, which is not what we want. So filter out .h files from EXTRA_FILES but keep them for the target's prerequisites.
Signed-off-by: Bill Roberts <[email protected]> --- tools/testing/selftests/x86/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/x86/Makefile b/tools/testing/selftests/x86/Makefile index 75315f1190d6..ac181b065f37 100644 --- a/tools/testing/selftests/x86/Makefile +++ b/tools/testing/selftests/x86/Makefile @@ -114,7 +114,7 @@ endif # the dependencies ("header3.h"), because clang, unlike gcc, will not accept # header files as an input to the compiler invocation. define extra-files -$(OUTPUT)/$(1): EXTRA_FILES := $(2) +$(OUTPUT)/$(1): EXTRA_FILES := $(filter-out %.h,$(2)) $(OUTPUT)/$(1): $(2) endef -- 2.55.0

