Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759322AbZFVVXA (ORCPT ); Mon, 22 Jun 2009 17:23:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1759452AbZFVVWG (ORCPT ); Mon, 22 Jun 2009 17:22:06 -0400 Received: from mx2.redhat.com ([66.187.237.31]:59723 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759429AbZFVVWE (ORCPT ); Mon, 22 Jun 2009 17:22:04 -0400 From: Masami Hiramatsu Subject: [RFC][ PATCH -tip v2 3/7] Kbuild: disable gcc crossjumping To: Ingo Molnar , Ananth N Mavinakayanahalli , lkml Cc: systemtap , DLE , Masami Hiramatsu , Ananth N Mavinakayanahalli , Ingo Molnar , Jim Keniston , Srikar Dronamraju , Christoph Hellwig , Steven Rostedt , Frederic Weisbecker , "H. Peter Anvin" , Anders Kaseorg , Tim Abbott Date: Mon, 22 Jun 2009 17:23:13 -0400 Message-ID: <20090622212313.5384.84166.stgit@localhost.localdomain> In-Reply-To: <20090622212255.5384.53732.stgit@localhost.localdomain> References: <20090622212255.5384.53732.stgit@localhost.localdomain> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2124 Lines: 68 Add CONFIG_DISABLE_CROSSJUMP option which disables gcc's cross-function jumping. This option is required by the kprobes jump optimization. Signed-off-by: Masami Hiramatsu Cc: Ananth N Mavinakayanahalli Cc: Ingo Molnar Cc: Jim Keniston Cc: Srikar Dronamraju Cc: Christoph Hellwig Cc: Steven Rostedt Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Anders Kaseorg Cc: Tim Abbott --- Makefile | 4 ++++ lib/Kconfig.debug | 7 +++++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/Makefile b/Makefile index 2903e13..f73b139 100644 --- a/Makefile +++ b/Makefile @@ -524,6 +524,10 @@ else KBUILD_CFLAGS += -O2 endif +ifdef CONFIG_DISABLE_CROSSJUMP +KBUILD_CFLAGS += -fno-crossjumping +endif + include $(srctree)/arch/$(SRCARCH)/Makefile ifneq ($(CONFIG_FRAME_WARN),0) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 8da7467..f88e6b8 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -673,6 +673,13 @@ config FRAME_POINTER larger and slower, but it gives very useful debugging information in case of kernel bugs. (precise oopses/stacktraces/warnings) +config DISABLE_CROSSJUMP + bool "Disable cross-function jump optimization" + help + This build option disables cross-function jump optimization + (crossjumping) of gcc. Disabling crossjumping might increase + kernel binary size a little. + config BOOT_PRINTK_DELAY bool "Delay each boot printk message by N milliseconds" depends on DEBUG_KERNEL && PRINTK && GENERIC_CALIBRATE_DELAY -- Masami Hiramatsu Software Engineer Hitachi Computer Products (America), Inc. Software Solutions Division e-mail: mhiramat@redhat.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/