@@ -638,7 +638,11 @@ endif
endif
ifdef CONFIG_DEBUG_INFO
+ifdef CONFIG_DEBUG_INFO_SPLIT
+KBUILD_CFLAGS += $(call cc-option, -gsplit-dwarf, -g)
+else
KBUILD_CFLAGS += -g
+endif
KBUILD_AFLAGS += -Wa,--gdwarf-2
endif
@@ -1072,6 +1076,8 @@ MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \
extra_certificates signing_key.x509.keyid \
signing_key.x509.signer
+CLEAN_FILES += .*.dwo
+
# clean - Delete most, but leave enough to build external modules
#
clean: rm-dirs := $(CLEAN_DIRS)
@@ -143,6 +143,19 @@ config DEBUG_INFO_REDUCED
DEBUG_INFO build and compile times are reduced too.
Only works with newer gcc versions.
+config DEBUG_INFO_SPLIT
+ bool "Produce split debuginfo in .dwo files"
+ depends on DEBUG_INFO
+ help
+ Generate debug info into separate .dwo files. This can be
+ faster for building than including the debug information directly
+ in the object files and the vmlinux, as it only needs to
+ be stored once to disk, not multiple times in object files.
+ Requires recent gcc (4.8+) and recent gdb/binutils.
+ Any tool that packages or reads debug information would need
+ to know about the .dwo files and include them.
+ Currently incompatible with ccache.
+
config ENABLE_WARN_DEPRECATED
bool "Enable __deprecated logic"
default y