From cc065f0ce6967cdb2b4623c0ef2c90b6b5862e41 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Wed, 14 Jul 2010 15:43:52 +0200 Subject: [PATCH] --- yaml --- r: 204824 b: refs/heads/master c: d6f4ceb796ebf1a8c8a9ad4a8ea0d181aaec7de6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/Makefile | 4 ++++ trunk/lib/Kconfig.debug | 13 +++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index ee22509c1862..b9ebd096f4be 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 01ab17887f4cdcb8bb5a5d1bc3b160d186e6e99b +refs/heads/master: d6f4ceb796ebf1a8c8a9ad4a8ea0d181aaec7de6 diff --git a/trunk/Makefile b/trunk/Makefile index dceb4f19f786..e1dfb90c6092 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -557,6 +557,10 @@ KBUILD_CFLAGS += -g KBUILD_AFLAGS += -gdwarf-2 endif +ifdef CONFIG_DEBUG_INFO_REDUCED +KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) +endif + ifdef CONFIG_FUNCTION_TRACER KBUILD_CFLAGS += -pg endif diff --git a/trunk/lib/Kconfig.debug b/trunk/lib/Kconfig.debug index 25c3ed594c54..2af5d84ec824 100644 --- a/trunk/lib/Kconfig.debug +++ b/trunk/lib/Kconfig.debug @@ -595,6 +595,19 @@ config DEBUG_INFO If unsure, say N. +config DEBUG_INFO_REDUCED + bool "Reduce debugging information" + depends on DEBUG_INFO + help + If you say Y here gcc is instructed to generate less debugging + information for structure types. This means that tools that + need full debugging information (like kgdb or systemtap) won't + be happy. But if you merely need debugging information to + resolve line numbers there is no loss. Advantage is that + build directory object sizes shrink dramatically over a full + DEBUG_INFO build and compile times are reduced too. + Only works with newer gcc versions. + config DEBUG_VM bool "Debug VM" depends on DEBUG_KERNEL