author: Nick Desaulniers <ndesaulniers@google.com> 2021-02-05 12:22:19 -0800
committer: Masahiro Yamada <masahiroy@kernel.org> 2021-02-16 12:01:45 +0900
commit: a66049e2cf0ef166dba5bafdbb3062287fc965ad
parent: 3c4fa46b30c551b1df2fb1574a684f68bc22067c
Commit Summary:
Diffstat:
1 file changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index c1cac349ba4e..c567c4343880 100644
--- a/Makefile
+++ b/Makefile
@@ -830,8 +830,9 @@ ifneq ($(LLVM_IAS),1)
KBUILD_AFLAGS += -Wa,-gdwarf-2
endif
-ifdef CONFIG_DEBUG_INFO_DWARF4
-DEBUG_CFLAGS += -gdwarf-4
+ifndef CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
+dwarf-version-$(CONFIG_DEBUG_INFO_DWARF4) := 4
+DEBUG_CFLAGS += -gdwarf-$(dwarf-version-y)
endif
ifdef CONFIG_DEBUG_INFO_REDUCED