3 ifdef CONFIG_DEBUG_INFO_SPLIT
4 DEBUG_CFLAGS += -gsplit-dwarf
9 ifndef CONFIG_AS_IS_LLVM
10 KBUILD_AFLAGS += -Wa,-gdwarf-2
13 ifndef CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT
14 dwarf-version-$(CONFIG_DEBUG_INFO_DWARF4) := 4
15 dwarf-version-$(CONFIG_DEBUG_INFO_DWARF5) := 5
16 DEBUG_CFLAGS += -gdwarf-$(dwarf-version-y)
19 ifdef CONFIG_DEBUG_INFO_REDUCED
20 DEBUG_CFLAGS += -fno-var-tracking
21 ifdef CONFIG_CC_IS_GCC
22 DEBUG_CFLAGS += -femit-struct-debug-baseonly
26 ifdef CONFIG_DEBUG_INFO_COMPRESSED
27 DEBUG_CFLAGS += -gz=zlib
28 KBUILD_AFLAGS += -gz=zlib
29 KBUILD_LDFLAGS += --compress-debug-sections=zlib
32 KBUILD_CFLAGS += $(DEBUG_CFLAGS)