Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 442f04c34a1a ("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>

authored by

Josh Poimboeuf and committed by
Nathan Chancellor
68b4fe32 df989b01

+12 -1
+10 -1
Makefile
··· 1481 1481 $(Q)$(MAKE) -sC $(srctree)/tools/bpf/resolve_btfids O=$(resolve_btfids_O) clean 1482 1482 endif 1483 1483 1484 + PHONY += objtool_clean 1485 + 1486 + objtool_O = $(abspath $(objtree))/tools/objtool 1487 + 1488 + objtool_clean: 1489 + ifneq ($(wildcard $(objtool_O)),) 1490 + $(Q)$(MAKE) -sC $(abs_srctree)/tools/objtool O=$(objtool_O) srctree=$(abs_srctree) clean 1491 + endif 1492 + 1484 1493 tools/: FORCE 1485 1494 $(Q)mkdir -p $(objtree)/tools 1486 1495 $(Q)$(MAKE) O=$(abspath $(objtree)) subdir=tools -C $(srctree)/tools/ ··· 1653 1644 $(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean 1654 1645 $(Q)$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) clean) 1655 1646 1656 - clean: archclean vmlinuxclean resolve_btfids_clean 1647 + clean: archclean vmlinuxclean resolve_btfids_clean objtool_clean 1657 1648 1658 1649 # mrproper - Delete all generated files, including .config 1659 1650 #
+2
tools/objtool/Makefile
··· 29 29 srctree := $(patsubst %/,%,$(dir $(srctree))) 30 30 endif 31 31 32 + RM ?= rm -f 33 + 32 34 LIBSUBCMD_DIR = $(srctree)/tools/lib/subcmd/ 33 35 ifneq ($(OUTPUT),) 34 36 LIBSUBCMD_OUTPUT = $(abspath $(OUTPUT))/libsubcmd