mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
kbuild: use prefix-map for host and user progs
Host and user progs may also use __FILE__. Make sure it shows up canonicalized, as in regular kernel code. Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de> Reviewed-by: Nicolas Schier <n.schier@fritz.com> Tested-by: Nicolas Schier <n.schier@fritz.com> Link: https://patch.msgid.link/20260819-kbuild-prefix-map-v1-1-f5168b96fac0@linutronix.de Signed-off-by: Nathan Chancellor <nathan@kernel.org>
This commit is contained in:
parent
ba0e6a6f0f
commit
7c1bcd3f12
5
Makefile
5
Makefile
|
|
@ -1199,7 +1199,10 @@ export CFLAGS_GCOV
|
|||
|
||||
# change __FILE__ to the relative path to the source directory
|
||||
ifdef building_out_of_srctree
|
||||
KBUILD_CPPFLAGS += -fmacro-prefix-map=$(srcroot)/=
|
||||
CFLAGS_PREFIX_MAP := -fmacro-prefix-map=$(srcroot)/=
|
||||
KBUILD_CPPFLAGS += $(CFLAGS_PREFIX_MAP)
|
||||
KBUILD_USERCFLAGS += $(CFLAGS_PREFIX_MAP)
|
||||
KBUILD_HOSTCFLAGS += $(CFLAGS_PREFIX_MAP)
|
||||
ifeq ($(call rustc-option-yn, --remap-path-scope=macro),y)
|
||||
KBUILD_RUSTFLAGS += --remap-path-prefix=$(srcroot)/= --remap-path-scope=macro
|
||||
endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user