]> git.itanic.dy.fi Git - linux-stable/commitdiff
kbuild: uapi: use -fsyntax-only rather than -S
authorNick Desaulniers <ndesaulniers@google.com>
Wed, 30 Mar 2022 18:34:06 +0000 (11:34 -0700)
committerMasahiro Yamada <masahiroy@kernel.org>
Tue, 5 Apr 2022 08:03:31 +0000 (17:03 +0900)
The UAPI header tests are checking that the generated headers do not
have syntax errors. There's no need to run the rest of the compilation
pipeline after semantic analysis has run. Replace -S -o /dev/null with
-fsyntax-only.

Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
usr/include/Makefile

index fa9819e022b7178052c796715afe4abad98bfcb7..f621e60785127a675e1017c2938f5713ba12506e 100644 (file)
@@ -92,7 +92,7 @@ always-y := $(patsubst $(obj)/%.h,%.hdrtest, $(shell find $(obj) -name '*.h' 2>/
 # Include the header twice to detect missing include guard.
 quiet_cmd_hdrtest = HDRTEST $<
       cmd_hdrtest = \
-               $(CC) $(c_flags) -S -o /dev/null -x c /dev/null \
+               $(CC) $(c_flags) -fsyntax-only -x c /dev/null \
                        $(if $(filter-out $(no-header-test), $*.h), -include $< -include $<); \
                $(PERL) $(srctree)/$(src)/headers_check.pl $(obj) $(SRCARCH) $<; \
                touch $@