summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 8 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index d487fca342c4..681bed05d104 100644
--- a/Makefile
+++ b/Makefile
@@ -732,25 +732,28 @@ KBUILD_CFLAGS += -fomit-frame-pointer
732endif 732endif
733endif 733endif
734 734
735KBUILD_CFLAGS += $(call cc-option, -fno-var-tracking-assignments) 735DEBUG_CFLAGS := $(call cc-option, -fno-var-tracking-assignments)
736 736
737ifdef CONFIG_DEBUG_INFO 737ifdef CONFIG_DEBUG_INFO
738ifdef CONFIG_DEBUG_INFO_SPLIT 738ifdef CONFIG_DEBUG_INFO_SPLIT
739KBUILD_CFLAGS += $(call cc-option, -gsplit-dwarf, -g) 739DEBUG_CFLAGS += $(call cc-option, -gsplit-dwarf, -g)
740else 740else
741KBUILD_CFLAGS += -g 741DEBUG_CFLAGS += -g
742endif 742endif
743KBUILD_AFLAGS += -Wa,-gdwarf-2 743KBUILD_AFLAGS += -Wa,-gdwarf-2
744endif 744endif
745ifdef CONFIG_DEBUG_INFO_DWARF4 745ifdef CONFIG_DEBUG_INFO_DWARF4
746KBUILD_CFLAGS += $(call cc-option, -gdwarf-4,) 746DEBUG_CFLAGS += $(call cc-option, -gdwarf-4,)
747endif 747endif
748 748
749ifdef CONFIG_DEBUG_INFO_REDUCED 749ifdef CONFIG_DEBUG_INFO_REDUCED
750KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) \ 750DEBUG_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) \
751 $(call cc-option,-fno-var-tracking) 751 $(call cc-option,-fno-var-tracking)
752endif 752endif
753 753
754KBUILD_CFLAGS += $(DEBUG_CFLAGS)
755export DEBUG_CFLAGS
756
754ifdef CONFIG_FUNCTION_TRACER 757ifdef CONFIG_FUNCTION_TRACER
755ifdef CONFIG_FTRACE_MCOUNT_RECORD 758ifdef CONFIG_FTRACE_MCOUNT_RECORD
756 # gcc 5 supports generating the mcount tables directly 759 # gcc 5 supports generating the mcount tables directly