From nobody Fri Dec 19 07:23:35 2025 Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136]) (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 AD3BE30BB97; Tue, 16 Dec 2025 21:27:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765920428; cv=none; b=FZkGiy36FaZJb1IFYOYrs12aWWeNesIy+bI/Hs2SwmODCG+F7e+RUauCgPhKiFhvS0SQ/zYZ32uV5ntwjt0AFpJp5uOzM4DeHeO8uWRpIgN/pidS6PSJQuVd6oDpHo+Yga+zxTQfROOYm1MBBWXYHS09Mdoob9QdbCxwggp/Ejo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765920428; c=relaxed/simple; bh=MoqvLbMfn2F43wSd1sfYHLLZub8UGjJ7D/U+nOpcdbY=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WkeM8a9H0QDIitgQIXlio7Ekiob7YIC0goLxcRMIKjfIXR/L4jOWK0SLRTwkFZ7+itvsPy0bE7JlGYOqZHzKvZkPuT4KtXIb+nkaJOQbAK6ZDonsFboM8mBL1CA6dumvQCk5BN1Pp6MMmKun1ZlREDDSbHyhFXbGssdQGOwHmYE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=Q+IRqKFs; arc=none smtp.client-ip=198.137.202.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="Q+IRqKFs" Received: from mail.zytor.com (c-76-133-66-138.hsd1.ca.comcast.net [76.133.66.138]) (authenticated bits=0) by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 5BGLQC212563820 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 16 Dec 2025 13:26:17 -0800 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 5BGLQC212563820 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com; s=2025112201; t=1765920378; bh=qfIXPrDPPzOmRPX4wlKrygGvZVz41nwH1/qG7m+qlJI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Q+IRqKFsMsjzabNidYuoiQalsihl+u+9Y6XqjoBvDQJMt/PjkkwuN7wshh+5LWG7K GfpXrzloSEZ0VINGbw2wGowWxdH32j70El2W2gA1U4+1m6GcIHxTZ3upciVpsX7ytj BsLXycBjpGX/jHy8bE5wjvQs4Qdv91KbcMkSaWuBEBEs/SlFxv3IWijoKr27UfDiTI AKcBPv2nPS5P7JsHfhKQgnVmKI0YOVCw4DeEgpe1x/ZtK5KdvFNj1pX1Z8OMyECL05 7jU2d+AHxOkPBHODFxeKLlZ6Dokp57+egI445ZoVGKdh+/iRZNyo8pnsGnj23SGAUB WJ+QT3rVHN6Sg== From: "H. Peter Anvin" To: "H. Peter Anvin" , "Jason A. Donenfeld" , "Peter Zijlstra (Intel)" , "Theodore Ts'o" , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Xin Li , Andrew Cooper , Andy Lutomirski , Ard Biesheuvel , Borislav Petkov , Brian Gerst , Dave Hansen , Ingo Molnar , James Morse , Jarkko Sakkinen , Josh Poimboeuf , Kees Cook , Nam Cao , Oleg Nesterov , Perry Yuan , Thomas Gleixner , Thomas Huth , Uros Bizjak , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-sgx@vger.kernel.org, x86@kernel.org Subject: [PATCH v4 02/10] x86/entry/vdso: move vdso2c to arch/x86/tools Date: Tue, 16 Dec 2025 13:25:56 -0800 Message-ID: <20251216212606.1325678-3-hpa@zytor.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251216212606.1325678-1-hpa@zytor.com> References: <20251216212606.1325678-1-hpa@zytor.com> 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" It is generally better to build tools in arch/x86/tools to keep host cflags proliferation down, and to reduce makefile sequencing issues. Move the vdso build tool vdso2c into arch/x86/tools in preparation for refactoring the vdso makefiles. Signed-off-by: H. Peter Anvin (Intel) --- arch/x86/Makefile | 2 +- arch/x86/entry/vdso/Makefile | 7 +++---- arch/x86/tools/Makefile | 15 ++++++++++----- arch/x86/{entry/vdso =3D> tools}/vdso2c.c | 0 arch/x86/{entry/vdso =3D> tools}/vdso2c.h | 0 5 files changed, 14 insertions(+), 10 deletions(-) rename arch/x86/{entry/vdso =3D> tools}/vdso2c.c (100%) rename arch/x86/{entry/vdso =3D> tools}/vdso2c.h (100%) diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 1d403a3612ea..9ab7522ced18 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -252,7 +252,7 @@ endif =20 =20 archscripts: scripts_basic - $(Q)$(MAKE) $(build)=3Darch/x86/tools relocs + $(Q)$(MAKE) $(build)=3Darch/x86/tools relocs vdso2c =20 ### # Syscall table generation diff --git a/arch/x86/entry/vdso/Makefile b/arch/x86/entry/vdso/Makefile index 7f833026d5b2..3d9b09f00c70 100644 --- a/arch/x86/entry/vdso/Makefile +++ b/arch/x86/entry/vdso/Makefile @@ -38,13 +38,12 @@ VDSO_LDFLAGS_vdso.lds =3D -m elf_x86_64 -soname linux-v= dso.so.1 \ $(obj)/vdso64.so.dbg: $(obj)/vdso.lds $(vobjs) FORCE $(call if_changed,vdso_and_check) =20 -HOST_EXTRACFLAGS +=3D -I$(srctree)/tools/include -I$(srctree)/include/uapi= -I$(srctree)/arch/$(SUBARCH)/include/uapi -hostprogs +=3D vdso2c +VDSO2C =3D $(objtree)/arch/x86/tools/vdso2c =20 quiet_cmd_vdso2c =3D VDSO2C $@ - cmd_vdso2c =3D $(obj)/vdso2c $< $(<:%.dbg=3D%) $@ + cmd_vdso2c =3D $(VDSO2C) $< $(<:%.dbg=3D%) $@ =20 -$(obj)/vdso%-image.c: $(obj)/vdso%.so.dbg $(obj)/vdso%.so $(obj)/vdso2c FO= RCE +$(obj)/vdso%-image.c: $(obj)/vdso%.so.dbg $(obj)/vdso%.so $(VDSO2C) FORCE $(call if_changed,vdso2c) =20 # diff --git a/arch/x86/tools/Makefile b/arch/x86/tools/Makefile index 7278e2545c35..39a183fffd04 100644 --- a/arch/x86/tools/Makefile +++ b/arch/x86/tools/Makefile @@ -38,9 +38,14 @@ $(obj)/insn_decoder_test.o: $(srctree)/tools/arch/x86/li= b/insn.c $(srctree)/tool =20 $(obj)/insn_sanity.o: $(srctree)/tools/arch/x86/lib/insn.c $(srctree)/tool= s/arch/x86/lib/inat.c $(srctree)/tools/arch/x86/include/asm/inat_types.h $(= srctree)/tools/arch/x86/include/asm/inat.h $(srctree)/tools/arch/x86/includ= e/asm/insn.h $(objtree)/arch/x86/lib/inat-tables.c =20 -HOST_EXTRACFLAGS +=3D -I$(srctree)/tools/include -hostprogs +=3D relocs -relocs-objs :=3D relocs_32.o relocs_64.o relocs_common.o -PHONY +=3D relocs -relocs: $(obj)/relocs +HOST_EXTRACFLAGS +=3D -I$(srctree)/tools/include -I$(srctree)/include/uapi= \ + -I$(srctree)/arch/$(SUBARCH)/include/uapi + +hostprogs +=3D relocs vdso2c +relocs-objs :=3D relocs_32.o relocs_64.o relocs_common.o + +always-y :=3D $(hostprogs) + +PHONY +=3D $(hostprogs) +$(hostprogs): %: $(obj)/% @: diff --git a/arch/x86/entry/vdso/vdso2c.c b/arch/x86/tools/vdso2c.c similarity index 100% rename from arch/x86/entry/vdso/vdso2c.c rename to arch/x86/tools/vdso2c.c diff --git a/arch/x86/entry/vdso/vdso2c.h b/arch/x86/tools/vdso2c.h similarity index 100% rename from arch/x86/entry/vdso/vdso2c.h rename to arch/x86/tools/vdso2c.h --=20 2.52.0