From e5976ba0af9b828dcc76b3937b5a98fe9c0f6cb8 Mon Sep 17 00:00:00 2001 From: Masami Hiramatsu Date: Mon, 22 Dec 2008 16:05:28 -0500 Subject: PR7090: Support kernels built with O= option. --- ChangeLog | 6 ++++++ buildrun.cxx | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ce59e0db..e5ed3ca1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-22 Masami Hiramatsu + + PR7090 + * buildrun.cxx (compile_pass): Use flags macro to expand KBUILD_CFLAGS + for support kernels built with O= option. + 2008-12-21 Will Cohen * systemtap.spec: Add generations of tapset reference manual material. diff --git a/buildrun.cxx b/buildrun.cxx index ece9eda4..cef1b11a 100644 --- a/buildrun.cxx +++ b/buildrun.cxx @@ -82,8 +82,11 @@ compile_pass (systemtap_session& s) if (s.verbose > 6) redirecterrors = ""; + // Support O= (or KBUILD_OUTPUT) option + o << "_KBUILD_CFLAGS := $(call flags,KBUILD_CFLAGS)" << endl; + 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) " << redirecterrors << " ; 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