]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Revert "kbuild, rust: use -fremap-path-prefix to make paths relative"
authorThomas Weißschuh <linux@weissschuh.net>
Sun, 11 May 2025 06:02:28 +0000 (08:02 +0200)
committerMasahiro Yamada <masahiroy@kernel.org>
Mon, 12 May 2025 06:04:13 +0000 (15:04 +0900)
This reverts commit dbdffaf50ff9cee3259a7cef8a7bd9e0f0ba9f13.

--remap-path-prefix breaks the ability of debuggers to find the source
file corresponding to object files. As there is no simple or uniform
way to specify the source directory explicitly, this breaks developers
workflows.

Revert the unconditional usage of --remap-path-prefix, equivalent to the
same change for -ffile-prefix-map in KBUILD_CPPFLAGS.

Fixes: dbdffaf50ff9 ("kbuild, rust: use -fremap-path-prefix to make paths relative")
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Makefile

index 52f84aaf102525001b759a8ec3da1be9b5131306..0eb9e6c49b32aa191be6f793539bde0bad54a17a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1069,7 +1069,6 @@ KBUILD_CFLAGS += -fno-builtin-wcslen
 # 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_RUSTFLAGS += --remap-path-prefix=$(srcroot)/=
 endif
 
 # include additional Makefiles when needed