mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 05:24:39 +01:00
kbuild: Add objtool to top-level clean target
Objtool is an integral part of the build, make sure it gets cleaned by
"make clean" and "make mrproper".
Fixes: 442f04c34a ("objtool: Add tool to perform compile-time stack metadata validation")
Reported-by: Jens Remus <jremus@linux.ibm.com>
Closes: https://lore.kernel.org/15f2af3b-be33-46fc-b972-6b8e7e0aa52e@linux.ibm.com
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Tested-by: Jens Remus <jremus@linux.ibm.com>
Link: https://patch.msgid.link/968faf2ed30fa8b3519f79f01a1ecfe7929553e5.1770759919.git.jpoimboe@kernel.org
[nathan: use Closes: instead of Link: per checkpatch.pl]
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
This commit is contained in:
parent
df989b01b5
commit
68b4fe32d7
2 changed files with 12 additions and 1 deletions
11
Makefile
11
Makefile
|
|
@ -1481,6 +1481,15 @@ ifneq ($(wildcard $(resolve_btfids_O)),)
|
|||
$(Q)$(MAKE) -sC $(srctree)/tools/bpf/resolve_btfids O=$(resolve_btfids_O) clean
|
||||
endif
|
||||
|
||||
PHONY += objtool_clean
|
||||
|
||||
objtool_O = $(abspath $(objtree))/tools/objtool
|
||||
|
||||
objtool_clean:
|
||||
ifneq ($(wildcard $(objtool_O)),)
|
||||
$(Q)$(MAKE) -sC $(abs_srctree)/tools/objtool O=$(objtool_O) srctree=$(abs_srctree) clean
|
||||
endif
|
||||
|
||||
tools/: FORCE
|
||||
$(Q)mkdir -p $(objtree)/tools
|
||||
$(Q)$(MAKE) O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/
|
||||
|
|
@ -1644,7 +1653,7 @@ vmlinuxclean:
|
|||
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean
|
||||
$(Q)$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) clean)
|
||||
|
||||
clean: archclean vmlinuxclean resolve_btfids_clean
|
||||
clean: archclean vmlinuxclean resolve_btfids_clean objtool_clean
|
||||
|
||||
# mrproper - Delete all generated files, including .config
|
||||
#
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ srctree := $(patsubst %/,%,$(dir $(CURDIR)))
|
|||
srctree := $(patsubst %/,%,$(dir $(srctree)))
|
||||
endif
|
||||
|
||||
RM ?= rm -f
|
||||
|
||||
LIBSUBCMD_DIR = $(srctree)/tools/lib/subcmd/
|
||||
ifneq ($(OUTPUT),)
|
||||
LIBSUBCMD_OUTPUT = $(abspath $(OUTPUT))/libsubcmd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue