From 84c4da88c7a995033b2a06fcc10e485222b54b11 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Tue, 12 Aug 2008 12:57:01 -0400 Subject: kbuild compatibility hack for separate-objdir O= builds --- buildrun.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'buildrun.cxx') diff --git a/buildrun.cxx b/buildrun.cxx index c2ebdce5..159e1c6e 100644 --- a/buildrun.cxx +++ b/buildrun.cxx @@ -87,6 +87,14 @@ compile_pass (systemtap_session& s) string module_cflags = "EXTRA_CFLAGS"; o << module_cflags << " :=" << endl; + + // XXX: This gruesome hack is needed on some kernels built with separate O=directory, + // where files like 2.6.27 x86's asm/mach-*/mach_mpspec.h are not found on the cpp path. + // This could be a bug in arch/x86/Makefile that names + // mflags-y += -Iinclude/asm-x86/mach-default + // but that path does not exist in an O= build tree. + o << module_cflags << " += -Iinclude2/asm/mach-default" << endl; + o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-hrtimer-rel.c, -DSTAPCONF_HRTIMER_REL,)" << endl; o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-inode-private.c, -DSTAPCONF_INODE_PRIVATE,)" << endl; o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-constant-tsc.c, -DSTAPCONF_CONSTANT_TSC,)" << endl; -- cgit From e9737939bdde53cfd6a2a16f0bd6494a05634ce8 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Fri, 15 Aug 2008 11:49:29 +0100 Subject: small patch ... Hi guys, I append a trivial patch for systemtap. I guess the SUSE wiki page also needs updating to point out that it's broken in 11.0 by default, and that you require HEAD with Frank's buildrun.cxx fix for the mach-default include. My patch will hopefully make similar problems easier to find in future (for lovers of -v options ;-) HTH, Michael. --- buildrun.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'buildrun.cxx') diff --git a/buildrun.cxx b/buildrun.cxx index 159e1c6e..a265e4db 100644 --- a/buildrun.cxx +++ b/buildrun.cxx @@ -78,8 +78,12 @@ compile_pass (systemtap_session& s) if (s.verbose > 3) superverbose = "set -x;"; + string redirecterrors = "> /dev/null 2>&1"; + if (s.verbose > 6) + redirecterrors = ""; + o << "stap_check_gcc = $(shell " << superverbose << " if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo \"$(1)\"; else echo \"$(2)\"; fi)" << endl; - o << "stap_check_build = $(shell " << superverbose << " if $(CC) $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(KBUILD_CFLAGS) $(CFLAGS_KERNEL) $(EXTRA_CFLAGS) $(CFLAGS) -DKBUILD_BASENAME=\\\"" << s.module_name << "\\\" -Werror -S -o /dev/null -xc $(1) > /dev/null 2>&1 ; then echo \"$(2)\"; else echo \"$(3)\"; fi)" << endl; + o << "stap_check_build = $(shell " << superverbose << " if $(CC) $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(KBUILD_CFLAGS) $(CFLAGS_KERNEL) $(EXTRA_CFLAGS) $(CFLAGS) -DKBUILD_BASENAME=\\\"" << s.module_name << "\\\" -Werror -S -o /dev/null -xc $(1) " << redirecterrors << " ; then echo \"$(2)\"; else echo \"$(3)\"; fi)" << endl; o << "SYSTEMTAP_RUNTIME = \"" << s.runtime_path << "\"" << endl; -- cgit