From nobody Thu Apr 2 15:39:01 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 80FA8322B8B; Tue, 10 Feb 2026 21:45:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770759937; cv=none; b=isXCEvsyPJFwhF891iyna8GTGMEllHCyiE7Ozw47ORZ9xOJesXeYb0VIVFclz5gIE+wD8gwI0Eo3f2Q+Yym3W1u/dpoKoVVx2t1PzlpKixmaXLDyjb0lqVR1+yueRPUlvproQmRpJATvXPy/HaHqggArlEMJpQ9ZZx1auj9+JsA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770759937; c=relaxed/simple; bh=bvMS0fIDj29T6OmhmMbczsd45h5uqDrzUz7LqYk2E5g=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=P8h5xLU8AAfGn7ZG6aTHcAd8g0DlqH6tJih/lANo29C6rUQGjCJzMLjKPnqYQUgcq/ddKbU2xdjhf7Q4ubGvAHu+6skw71IZi5/5qYTwLY5zead7UQBueHppVsQ48d9rB/QIV4tc3a9yl4hZ5DnZ3DLqAlVEG9X0df6XWM9q0E0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ovUpUYqi; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ovUpUYqi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C472DC116C6; Tue, 10 Feb 2026 21:45:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770759937; bh=bvMS0fIDj29T6OmhmMbczsd45h5uqDrzUz7LqYk2E5g=; h=From:To:Cc:Subject:Date:From; b=ovUpUYqig/IJLKsQb7VPHxi8VWpMyUpXMVpEv6D0iENh5G2ERxPUTXEDrquZtInsF yiAitoOpgCbkBldFlNo8fxgPT9pE/J01ObigvmQMiYh6SiizduaNwsa20ETtDmXHZG 4zChC18nFbh2zlAYl3tf+FaxUVFV9vHOwjne839m658+7twWPT+6x/Aw9vhAqZIH06 rg4C51mg67v83cDq7nZgGmY6xd9v0jeBbsuEoE0UzV80EgRn7k+c9+cwyMfOxO8Gg9 B4tk+eUZZFMNvEig4fxsWJ2b9371jfjVbGiZecPv7uST9D2QD5/k9if74Jak9Qohrm dQf0qmaOoRl+g== From: Josh Poimboeuf To: x86@kernel.org Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Nathan Chancellor , Nicolas Schier , linux-kbuild@vger.kernel.org, Jens Remus Subject: [PATCH] kbuild: Add objtool to top-level clean target Date: Tue, 10 Feb 2026 13:45:22 -0800 Message-ID: <968faf2ed30fa8b3519f79f01a1ecfe7929553e5.1770759919.git.jpoimboe@kernel.org> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 metad= ata validation") Reported-by: Jens Remus Link: https://lore.kernel.org/15f2af3b-be33-46fc-b972-6b8e7e0aa52e@linux.ib= m.com Signed-off-by: Josh Poimboeuf Tested-by: Jens Remus --- Makefile | 11 ++++++++++- tools/objtool/Makefile | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d3a8482bdbd0..ed850044491d 100644 --- a/Makefile +++ b/Makefile @@ -1474,6 +1474,15 @@ ifneq ($(wildcard $(resolve_btfids_O)),) $(Q)$(MAKE) -sC $(srctree)/tools/bpf/resolve_btfids O=3D$(resolve_btfids_= O) clean endif =20 +PHONY +=3D objtool_clean + +objtool_O =3D $(abspath $(objtree))/tools/objtool + +objtool_clean: +ifneq ($(wildcard $(objtool_O)),) + $(Q)$(MAKE) -sC $(abs_srctree)/tools/objtool O=3D$(objtool_O) srctree=3D$= (abs_srctree) clean +endif + tools/: FORCE $(Q)mkdir -p $(objtree)/tools $(Q)$(MAKE) O=3D$(abspath $(objtree)) subdir=3Dtools -C $(srctree)/tools/ @@ -1637,7 +1646,7 @@ vmlinuxclean: $(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean $(Q)$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) clean) =20 -clean: archclean vmlinuxclean resolve_btfids_clean +clean: archclean vmlinuxclean resolve_btfids_clean objtool_clean =20 # mrproper - Delete all generated files, including .config # diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile index a40f30232929..6964175abdfd 100644 --- a/tools/objtool/Makefile +++ b/tools/objtool/Makefile @@ -29,6 +29,8 @@ srctree :=3D $(patsubst %/,%,$(dir $(CURDIR))) srctree :=3D $(patsubst %/,%,$(dir $(srctree))) endif =20 +RM ?=3D rm -f + LIBSUBCMD_DIR =3D $(srctree)/tools/lib/subcmd/ ifneq ($(OUTPUT),) LIBSUBCMD_OUTPUT =3D $(abspath $(OUTPUT))/libsubcmd --=20 2.53.0