This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

SystemTap on 2.6.23-rc8-mm2


Just a heads up... I had to patch buildrun.cxx to get scripts to build on 2.6.23-rc8-mm2 (CFLAGS changed to KBUILD_CFLAGS, CPPFLAGS changed to KBUILD_CPPFLAGS). I've attached the patch below. I don't know when or if this change will go into Linus' kernel. I'm also not sure of the best way to ensure the correct CFLAGS are used in build_run.cxx (maybe check s.kernel_release?).

Mike

--- buildrun.cxx.orig	2007-09-30 11:12:16.000000000 -0700
+++ buildrun.cxx.new	2007-10-02 08:44:00.000000000 -0700
@@ -42,7 +42,7 @@

  // Clever hacks copied from vmware modules
  o << "stap_check_gcc = $(shell 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 " << "set -x; " << " if $(CC) $(CPPFLAGS) $(CFLAGS_KERNEL) $(EXTRA_CFLAGS) $(CFLAGS) -DKBUILD_BASENAME=\\\"" << s.module_name << "\\\" -Werror -S -o /dev/null -xc $(1) > /dev/null ; then echo \"$(2)\"; else echo \"$(3)\"; fi)" << endl;
+  o << "stap_check_build = $(shell " << "set -x; " << " if $(CC) $(KBUILD_CPPFLAGS) $(CFLAGS_KERNEL) $(EXTRA_CFLAGS) $(KBUILD_CFLAGS) -DKBUILD_BASENAME=\\\"" << s.module_name << "\\\" -Werror -S -o /dev/null -xc $(1) > /dev/null ; then echo \"$(2)\"; else echo \"$(3)\"; fi)" << endl;


o << "SYSTEMTAP_RUNTIME = \"" << s.runtime_path << "\"" << endl; @@ -59,26 +59,26 @@ o << module_cflags << " += $(call stap_check_build, $(SYSTEMTAP_RUNTIME)/autoconf-ktime-get-real.c, -DSTAPCONF_KTIME_GET_REAL,)" << endl;

  for (unsigned i=0; i<s.macros.size(); i++)
-    o << "CFLAGS += -D " << lex_cast_qstring(s.macros[i]) << endl;
+    o << "KBUILD_CFLAGS += -D " << lex_cast_qstring(s.macros[i]) << endl;

  if (s.verbose > 2)
-    o << "CFLAGS += -ftime-report -Q" << endl;
+    o << "KBUILD_CFLAGS += -ftime-report -Q" << endl;

  // XXX: unfortunately, -save-temps can't work since linux kbuild cwd
  // is not writeable.
  //
  // if (s.keep_tmpdir)
-  // o << "CFLAGS += -fverbose-asm -save-temps" << endl;
+  // o << "KBUILD_CFLAGS += -fverbose-asm -save-temps" << endl;

-  o << "CFLAGS += -freorder-blocks" << endl; // improve on -Os
+  o << "KBUILD_CFLAGS += -freorder-blocks" << endl; // improve on -Os

- // o << "CFLAGS += -fno-unit-at-a-time" << endl;
+ // o << "KBUILD_CFLAGS += -fno-unit-at-a-time" << endl;
// Assumes linux 2.6 kbuild
- o << "CFLAGS += -Wno-unused -Werror" << endl;
- o << "CFLAGS += -I\"" << s.runtime_path << "\"" << endl;
+ o << "KBUILD_CFLAGS += -Wno-unused -Werror" << endl;
+ o << "KBUILD_CFLAGS += -I\"" << s.runtime_path << "\"" << endl;
// XXX: this may help ppc toc overflow
- // o << "CFLAGS := $(subst -Os,-O2,$(CFLAGS)) -fminimal-toc" << endl;
+ // o << "KBUILD_CFLAGS := $(subst -Os,-O2,$(KBUILD_CFLAGS)) -fminimal-toc" << endl;
o << "obj-m := " << s.module_name << ".o" << endl;


o.close ();


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]