From patchwork Wed Jul 14 13:43:52 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Kleen X-Patchwork-Id: 111990 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6EDi09a006561 for ; Wed, 14 Jul 2010 13:44:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753236Ab0GNNoA (ORCPT ); Wed, 14 Jul 2010 09:44:00 -0400 Received: from one.firstfloor.org ([213.235.205.2]:34182 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752957Ab0GNNn7 (ORCPT ); Wed, 14 Jul 2010 09:43:59 -0400 Received: from basil.firstfloor.org (p5B3C96BE.dip0.t-ipconnect.de [91.60.150.190]) by one.firstfloor.org (Postfix) with ESMTP id 69B5A22C806C; Wed, 14 Jul 2010 15:43:54 +0200 (CEST) Received: by basil.firstfloor.org (Postfix, from userid 1000) id A3ACDB15A4; Wed, 14 Jul 2010 15:43:52 +0200 (CEST) Date: Wed, 14 Jul 2010 15:43:52 +0200 From: Andi Kleen To: mmarek@suse.cz, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, ak@linux.intel.com Subject: [PATCH] Kbuild: Add option to set -femit-struct-debug-baseonly Message-ID: <20100714134352.GA10341@basil.fritz.box> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 14 Jul 2010 13:44:01 +0000 (UTC) Index: linux-2.6.34-ak/Makefile =================================================================== --- linux-2.6.34-ak.orig/Makefile +++ linux-2.6.34-ak/Makefile @@ -554,6 +554,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 Index: linux-2.6.34-ak/lib/Kconfig.debug =================================================================== --- linux-2.6.34-ak.orig/lib/Kconfig.debug +++ linux-2.6.34-ak/lib/Kconfig.debug @@ -616,6 +616,18 @@ 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