diff --git a/Makefile b/Makefile index a1a0448b13a04ad158b6b6dfb533d39ec1c895a1..0e487432948971d6edbc9a7ca803827b8c6c3b43 100644 --- a/Makefile +++ b/Makefile @@ -607,14 +607,18 @@ endif KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector) KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks) -# change __FILE__ to the relative path from the srctree -KBUILD_CFLAGS += $(call cc-option,-fmacro-prefix-map=$(srctree)/=) +# change __FILE__ and debugging symbols to the relative path from the +# srctree +KBUILD_CFLAGS += $(call cc-option,-ffile-prefix-map=$(srctree)/=) KBUILD_CFLAGS += -g # $(KBUILD_AFLAGS) sets -g, which causes gcc to pass a suitable -g<format> # option to the assembler. KBUILD_AFLAGS += -g +# Use relative paths in debugging symbols +KBUILD_AFLAGS += --debug-prefix-map=$(srctree)/= + # Report stack usage if supported # ARC tools based on GCC 7.1 has an issue with stack usage # with naked functions, see commit message for more details