aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSedat Dilek <sedat.dilek@gmail.com>2020-08-16 14:32:44 +0200
committerMasahiro Yamada <masahiroy@kernel.org>2020-08-27 00:44:33 +0900
commit695afd3d7d58ec3044d25c9d2fe384ab8627fd20 (patch)
treedd94a34a6cfecbd3137ef4dcd231706b22c88670 /Makefile
parentLinux 5.9-rc2 (diff)
downloadlinux-dev-695afd3d7d58ec3044d25c9d2fe384ab8627fd20.tar.xz
linux-dev-695afd3d7d58ec3044d25c9d2fe384ab8627fd20.zip
kbuild: Simplify DEBUG_INFO Kconfig handling
While playing with [1] I saw that the handling of CONFIG_DEBUG_INFO can be simplified. [1] https://patchwork.kernel.org/patch/11716107/ Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f21168154160..4ef6a73e48a7 100644
--- a/Makefile
+++ b/Makefile
@@ -816,13 +816,15 @@ endif
DEBUG_CFLAGS := $(call cc-option, -fno-var-tracking-assignments)
ifdef CONFIG_DEBUG_INFO
+
ifdef CONFIG_DEBUG_INFO_SPLIT
DEBUG_CFLAGS += -gsplit-dwarf
else
DEBUG_CFLAGS += -g
endif
+
KBUILD_AFLAGS += -Wa,-gdwarf-2
-endif
+
ifdef CONFIG_DEBUG_INFO_DWARF4
DEBUG_CFLAGS += -gdwarf-4
endif
@@ -838,6 +840,8 @@ KBUILD_AFLAGS += -gz=zlib
KBUILD_LDFLAGS += --compress-debug-sections=zlib
endif
+endif # CONFIG_DEBUG_INFO
+
KBUILD_CFLAGS += $(DEBUG_CFLAGS)
export DEBUG_CFLAGS