diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2015-03-20 21:50:01 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2015-06-11 09:08:32 -0400 |
commit | 50ab9a69275dca588cb5ad5038657f069bbdeb56 (patch) | |
tree | efbc69d993a916f8a38dd8d61bcc75eca4edcc97 /lib/Makefile | |
parent | cc8475305203ddfd117b81e2e732194b67d8f310 (diff) |
kbuild: include core debug info when DEBUG_INFO_REDUCED
With CONFIG_DEBUG_INFO_REDUCED, we do get quite a lot of debug info
(around 22.7 MB for a defconfig+DEBUG_INFO_REDUCED). However, the
"basenames must match" rule used by -femit-struct-debug-baseonly
option means that we miss some core data structures, such as struct
{device, file, inode, mm_struct, page} etc.
We can easily get these included as well, while still getting the
benefits of CONFIG_DEBUG_INFO_REDUCED (faster build times and smaller
individual object files): All it takes is a dummy translation unit
including a few strategic headers and compiled with a flag overriding
-femit-struct-debug-baseonly.
This increases the size of .debug_info by ~0.3%, but these 90 KB
contain some rather useful info.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'lib/Makefile')
-rw-r--r-- | lib/Makefile | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Makefile b/lib/Makefile index 6c37933336a0..c918538110ed 100644 --- a/lib/Makefile +++ b/lib/Makefile | |||
@@ -45,6 +45,9 @@ CFLAGS_kobject.o += -DDEBUG | |||
45 | CFLAGS_kobject_uevent.o += -DDEBUG | 45 | CFLAGS_kobject_uevent.o += -DDEBUG |
46 | endif | 46 | endif |
47 | 47 | ||
48 | obj-$(CONFIG_DEBUG_INFO_REDUCED) += debug_info.o | ||
49 | CFLAGS_debug_info.o += $(call cc-option, -femit-struct-debug-detailed=any) | ||
50 | |||
48 | obj-$(CONFIG_GENERIC_IOMAP) += iomap.o | 51 | obj-$(CONFIG_GENERIC_IOMAP) += iomap.o |
49 | obj-$(CONFIG_GENERIC_PCI_IOMAP) += pci_iomap.o | 52 | obj-$(CONFIG_GENERIC_PCI_IOMAP) += pci_iomap.o |
50 | obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o | 53 | obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o |