Skip to content

Commit

Permalink
kbuild: run the checker after the compiler
Browse files Browse the repository at this point in the history
Since the pre-git time the checker is run first, before the compiler.
But if the source file contains some syntax error, the warnings from
the compiler are more useful than those from sparse (and other
checker most probably too).

So move the 'check' command to run after the compiler.

Signed-off-by: Luc Van Oostenryck <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
lucvoo authored and masahir0y committed Jul 7, 2020
1 parent dcb7fd8 commit 0c33f12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/Makefile.build
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,9 @@ cmd_gen_ksymdeps = \
endif

define rule_cc_o_c
$(call cmd,checksrc)
$(call cmd_and_fixdep,cc_o_c)
$(call cmd,gen_ksymdeps)
$(call cmd,checksrc)
$(call cmd,checkdoc)
$(call cmd,objtool)
$(call cmd,modversions_c)
Expand All @@ -277,8 +277,8 @@ endif

# Built-in and composite module parts
$(obj)/%.o: $(src)/%.c $(recordmcount_source) $(objtool_dep) FORCE
$(call cmd,force_checksrc)
$(call if_changed_rule,cc_o_c)
$(call cmd,force_checksrc)

cmd_mod = { \
echo $(if $($*-objs)$($*-y)$($*-m), $(addprefix $(obj)/, $($*-objs) $($*-y) $($*-m)), $(@:.mod=.o)); \
Expand Down

0 comments on commit 0c33f12

Please sign in to comment.