author: Mark Wielaard <mark@klomp.org> 2020-10-17 14:01:35 +0200
committer: Masahiro Yamada <masahiroy@kernel.org> 2020-10-21 00:28:53 +0900
commit: 121c5d08d53cb1f95d9881838523b0305c3f3bef
parent: 8402ee182c417a32d5e5a702f2fa2b01e76dc220
Commit Summary:
Diffstat:
1 file changed, 5 insertions, 1 deletion
diff --git a/Makefile b/Makefile
index b76c4122c967..17a62e365a38 100644
--- a/Makefile
+++ b/Makefile
@@ -814,7 +814,11 @@ KBUILD_CFLAGS += -ftrivial-auto-var-init=zero
KBUILD_CFLAGS += -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
endif
-DEBUG_CFLAGS := $(call cc-option, -fno-var-tracking-assignments)
+# Workaround for GCC versions < 5.0
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801
+ifdef CONFIG_CC_IS_GCC
+DEBUG_CFLAGS := $(call cc-ifversion, -lt, 0500, $(call cc-option, -fno-var-tracking-assignments))
+endif
ifdef CONFIG_DEBUG_INFO