diff --git a/Makefile b/Makefile index b259dd64ce95c6539bdf5166cefe14cf2e152ba2..74567b0ec2f081fec5ac68860520dcb4fcf53201 100644 --- a/Makefile +++ b/Makefile @@ -846,6 +846,9 @@ KBUILD_CFLAGS += $(call cc-option,-Werror=incompatible-pointer-types) # Require designated initializers for all marked structures KBUILD_CFLAGS += $(call cc-option,-Werror=designated-init) +# change __FILE__ to the relative path from the srctree +KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=) + # use the deterministic mode of AR if available KBUILD_ARFLAGS := $(call ar-option,D)