From nobody Sun Sep 14 05:15:48 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=none dis=none) header.from=invisiblethingslab.com ARC-Seal: i=1; a=rsa-sha256; t=1756986157; cv=none; d=zohomail.com; s=zohoarc; b=M+/82uRgYo/zoH+aJh0lXsfkePnCFXlakfiE9PVRX5NO+cINWyvZZOKr3+zd12zXA4kgNfGntc+dH8oJxxukY++qgnqFYh/OMlhJJXv8Fz8oTXqllyNmJZqjLQ8i1+7OPnHf5+/BuoCtqgfyGv6vyoC5syXEWDX0UbLqL4iY6vE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756986157; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ndzTJbL+Lm2p/b7sczaFIUrnFM/1frrJUDrPdeoO0b4=; b=aIpaOpku70ti3kVa8Qtn0kQPiNk1ww1O9G6iXalIHS0x5dquWF34QKhVz2ZA4LTRXm4Zv4HOvtn/2yLCC7+RaQg5TDuaWhEQ3SbYFMDvWdtyUnRohOYwfAG4cfXUEBflM9/pwp8EgaZLliFMa3tVPiTiVd+5TsAD0EKwz9lNbZI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1756986157129900.0929243408149; Thu, 4 Sep 2025 04:42:37 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1109893.1459267 (Exim 4.92) (envelope-from ) id 1uu8M2-0007Pc-9m; Thu, 04 Sep 2025 11:42:14 +0000 Received: by outflank-mailman (output) from mailman id 1109893.1459267; Thu, 04 Sep 2025 11:42:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uu8M2-0007PV-6j; Thu, 04 Sep 2025 11:42:14 +0000 Received: by outflank-mailman (input) for mailman id 1109893; Thu, 04 Sep 2025 11:42:13 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uu8M1-0007PP-GP for xen-devel@lists.xenproject.org; Thu, 04 Sep 2025 11:42:13 +0000 Received: from fout-b4-smtp.messagingengine.com (fout-b4-smtp.messagingengine.com [202.12.124.147]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 312caebe-8984-11f0-9809-7dc792cee155; Thu, 04 Sep 2025 13:42:11 +0200 (CEST) Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.stl.internal (Postfix) with ESMTP id 85C2A1D002A4; Thu, 4 Sep 2025 07:42:09 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Thu, 04 Sep 2025 07:42:09 -0400 Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 4 Sep 2025 07:42:07 -0400 (EDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 312caebe-8984-11f0-9809-7dc792cee155 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= invisiblethingslab.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to; s=fm1; t=1756986129; x=1757072529; bh=ndzTJbL+Lm2p/b7sczaFIUrnFM/1frrJ UDrPdeoO0b4=; b=lOHRuLde4jBoUfOC/19uJ+hxE+fJiiwpPQpASK3AKaloYQxV Cb8huJOmVTRYeRBXVsNDJ3TJv9bCjaTW1AdXX7OzXabTIeBaD9XDu1JNV05KkAIf dbQMbCjmOAGHsRdLbQK7tv5/GSFZhd80kvol1MYF4NacNZLjO/ZcXfO6iQElIALG kuqP9JVTSqQUYG5Hbgl6YlbX20eBFicrkosXy6VjOYtxfZ/L/4RNlhlZDKfruZCj GUOlp9m0CVjSnUlHipi9tPL4GfOx1DkkgmOa1e4r4qZRQD4iZz5fpYtI/i0DydaZ sUPIB+tI1rvISw7uDIVFSlCIGh/UAO7+XdLp5w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1756986129; x=1757072529; bh=ndzTJbL+Lm2p/b7sczaFIUrnFM/1 frrJUDrPdeoO0b4=; b=PJHBaPkrO6161uEPmfwCG2QhcWWT30Ut484QTc6ylfsq sg8euX0HMqa4eXmXlpJe8evfDgN6XATKeOlzsIGXpw4rhs2WEBQ9OqX1hhOFVrfM K9/UbqhOTMrlz3HrUW549/id5+rItLmZKbI+FlVjM4Vtaoqa2Hxq2kfy4Y/NQK7D TMDoThDpwgAhXMsunwVg0rdIwkEi+cY279Zj7I/LaI2XWO1kp2nIm9k0ymF8lalo U0t2+m+anYRnJgTu7QhB7Tse6x6A5ux+BNa8pY1BfY0s8uJqh1MsJx4jxg2dV7dG 9lCaGLtaEgUVqTn7TKZvBW/1XEhVF9z6tMvFA2TXng== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdehleefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurh ephffvvefufffkofggtgfgsehtkeertdertdejnecuhfhrohhmpeforghrvghkucforghr tgiihihkohifshhkihdqifpkrhgvtghkihcuoehmrghrmhgrrhgvkhesihhnvhhishhisg hlvghthhhinhhgshhlrggsrdgtohhmqeenucggtffrrghtthgvrhhnpeelkefhudelteel leelteetveeffeetffekteetjeehlefggeekleeghefhtdehvdenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrghrmhgrrhgvkhesihhnvhhi shhisghlvghthhhinhhgshhlrggsrdgtohhmpdhnsggprhgtphhtthhopeelpdhmohguvg epshhmthhpohhuthdprhgtphhtthhopeigvghnqdguvghvvghlsehlihhsthhsrdigvghn phhrohhjvggtthdrohhrghdprhgtphhtthhopehmrghrmhgrrhgvkhesihhnvhhishhisg hlvghthhhinhhgshhlrggsrdgtohhmpdhrtghpthhtoheprghnthhhohhnhidrphgvrhgr rhgusehvrghtvghsrdhtvggthhdprhgtphhtthhopegrnhgurhgvfidrtghoohhpvghrfe estghithhrihigrdgtohhmpdhrtghpthhtohepmhhitghhrghlrdhorhiivghlsegrmhgu rdgtohhmpdhrtghpthhtohepjhgsvghulhhitghhsehsuhhsvgdrtghomhdprhgtphhtth hopehjuhhlihgvnhesgigvnhdrohhrghdprhgtphhtthhopehrohhgvghrrdhprghusegt ihhtrhhigidrtghomhdprhgtphhtthhopehsshhtrggsvghllhhinhhisehkvghrnhgvlh drohhrgh X-ME-Proxy: Feedback-ID: i1568416f:Fastmail From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= To: xen-devel@lists.xenproject.org Cc: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= , Anthony PERARD , Andrew Cooper , Michal Orzel , Jan Beulich , Julien Grall , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Stefano Stabellini Subject: [PATCH v2] Strip build path directories in tools and hypervisor Date: Thu, 4 Sep 2025 13:41:40 +0200 Message-ID: <20250904114202.2722478-1-marmarek@invisiblethingslab.com> X-Mailer: git-send-email 2.49.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @invisiblethingslab.com) X-ZM-MESSAGEID: 1756986159169124100 Use -fdebug-prefix-map in preference to -ffile-prefix-map, as it's available in earlier toolchain versions. But use it together with -fmacro-prefix-map (if available) for hypervisor build, otherwise it still contains some paths in out-of-tree builds. The out of tree build requires -fdebug-prefix-map mapping for both source dir and object dir - otherwise the latter is included (2 occurrences) in xen-syms. Note the ./xen path for out of tree builds may not be strictly correct choice, but it's consistent across the tree, and just require starting debugger from the source, not object, directory. Ensure to have a realpath for XEN_ROOT else it fails to substitute properly paths in strings sections. Signed-off-by: Marek Marczykowski-G=C3=B3recki --- v2: - re-add chunk wrapping XEN_ROOT with realpath; simplify it with patsubst in hypervisor makefile - fix cc-option-add usage - extend commit message - claim authorship of the patch, as no single line remained from the original version - drop change in xen/arch/x86/Makefile --- tools/Makefile | 2 +- tools/Rules.mk | 2 ++ xen/Makefile | 6 +++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/Makefile b/tools/Makefile index 6ecf7c0da821..80ec82a15979 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,4 +1,4 @@ -XEN_ROOT =3D $(CURDIR)/.. +XEN_ROOT =3D $(realpath $(CURDIR)/..) =20 export PKG_CONFIG_DIR =3D $(CURDIR)/pkg-config =20 diff --git a/tools/Rules.mk b/tools/Rules.mk index 725c3c32e9a2..428fce094819 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -166,6 +166,8 @@ endif CFLAGS-$(CONFIG_X86_32) +=3D $(call cc-option,$(CC),-mno-tls-direct-seg-re= fs) CFLAGS +=3D $(CFLAGS-y) =20 +$(call cc-option-add,CFLAGS,CC,-fdebug-prefix-map=3D$(realpath $(XEN_ROOT)= )=3D.) + CFLAGS +=3D $(EXTRA_CFLAGS_XEN_TOOLS) =20 INSTALL_PYTHON_PROG =3D \ diff --git a/xen/Makefile b/xen/Makefile index 49da79e10fb4..015255971804 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -208,7 +208,7 @@ VPATH :=3D $(srctree) =20 export srctree objtree VPATH =20 -export XEN_ROOT :=3D $(abs_srctree)/.. +export XEN_ROOT :=3D $(patsubst %/xen,%,$(abs_srctree)) =20 # To make sure we do not include .config for any of the *config targets # catch them early, and hand them over to tools/kconfig/Makefile @@ -412,6 +412,10 @@ ifneq ($(CONFIG_CC_IS_CLANG),y) CFLAGS +=3D -Wa,--strip-local-absolute endif =20 +$(call cc-option-add,CFLAGS,CC,-fdebug-prefix-map=3D$(abs_objtree)=3D./xen) +$(call cc-option-add,CFLAGS,CC,-fdebug-prefix-map=3D$(abs_srctree)=3D./xen) +$(call cc-option-add,CFLAGS,CC,-fmacro-prefix-map=3D$(abs_srctree)=3D./xen) + AFLAGS +=3D -D__ASSEMBLY__ =20 $(call cc-option-add,AFLAGS,CC,-Wa$$(comma)--noexecstack) --=20 2.49.0