[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20250313-kbuild-prefix-map-v1-1-38cea8448c5f@weissschuh.net>
Date: Thu, 13 Mar 2025 16:59:09 +0100
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Masahiro Yamada <masahiroy@...nel.org>,
Nathan Chancellor <nathan@...nel.org>, Nicolas Schier <nicolas@...sle.eu>,
Jonathan Corbet <corbet@....net>, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>, Ben Hutchings <ben@...adent.org.uk>
Cc: linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org,
Thomas Weißschuh <linux@...ssschuh.net>
Subject: [PATCH 1/4] kbuild: make all file references relative to source
root
-fmacro-prefix-map only affects __FILE__ and __BASE_FILE__.
Other references, for example in debug information, is not affected.
This makes handling of file references in the compiler output harder to
use and creates problems for reproducible builds.
Switch to -ffile-prefix map which affects all references.
Suggested-by: Ben Hutchings <ben@...adent.org.uk>
Link: https://lore.kernel.org/lkml/c49cc967294f9a3a4a34f69b6a8727a6d3959ed8.camel@decadent.org.uk/
Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 30242e731a0d19faa0ffbeada8313e77c4105b41..7b1683bb60e2f473b255fb8a0bde97b15d19ddb6 100644
--- a/Makefile
+++ b/Makefile
@@ -1067,7 +1067,7 @@ endif
# change __FILE__ to the relative path to the source directory
ifdef building_out_of_srctree
-KBUILD_CPPFLAGS += $(call cc-option,-fmacro-prefix-map=$(srcroot)/=)
+KBUILD_CPPFLAGS += $(call cc-option,-ffile-prefix-map=$(srcroot)/=)
KBUILD_RUSTFLAGS += --remap-path-prefix=$(srcroot)/=
endif
--
2.48.1
Powered by blists - more mailing lists