diff --git a/Makefile b/Makefile index b76c4122c9678ffc41be7b8096c416cf93e8a672..17a62e365a38062ab41ad7df2b18e143e16a4272 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