This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[RFC][ PATCH -tip v2 3/7] Kbuild: disable gcc crossjumping
- From: Masami Hiramatsu <mhiramat at redhat dot com>
- To: Ingo Molnar <mingo at elte dot hu>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, lkml<linux-kernel at vger dot kernel dot org>
- Cc: systemtap<systemtap at sources dot redhat dot com>, DLE<dle-develop at lists dot sourceforge dot net>, Masami Hiramatsu <mhiramat at redhat dot com>, Ananth N Mavinakayanahalli <ananth at in dot ibm dot com>, Ingo Molnar <mingo at elte dot hu>, Jim Keniston <jkenisto at us dot ibm dot com>, Srikar Dronamraju <srikar at linux dot vnet dot ibm dot com>, Christoph Hellwig <hch at infradead dot org>, Steven Rostedt <rostedt at goodmis dot org>, Frederic Weisbecker <fweisbec at gmail dot com>, "H. Peter Anvin" <hpa at zytor dot com>, Anders Kaseorg <andersk at ksplice dot com>, Tim Abbott <tabbott at ksplice dot com>
- Date: Mon, 22 Jun 2009 17:23:13 -0400
- Subject: [RFC][ PATCH -tip v2 3/7] Kbuild: disable gcc crossjumping
- References: <20090622212255.5384.53732.stgit@localhost.localdomain>
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 <mhiramat@redhat.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Jim Keniston <jkenisto@us.ibm.com>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Anders Kaseorg <andersk@ksplice.com>
Cc: Tim Abbott <tabbott@ksplice.com>
---
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