summaryrefslogtreecommitdiffstats
path: root/buildrun.cxx
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2009-08-24 10:34:45 -0400
committerFrank Ch. Eigler <fche@elastic.org>2009-08-24 10:37:38 -0400
commit1392896dcda33324d43392f8e99fed240cf5fb9b (patch)
treec3546b8e377aa31fbf49a45b00940e017c425812 /buildrun.cxx
parent5a77d0116da4bc1d5b41df3172ad78c537eff51a (diff)
downloadsystemtap-steved-1392896dcda33324d43392f8e99fed240cf5fb9b.tar.gz
systemtap-steved-1392896dcda33324d43392f8e99fed240cf5fb9b.tar.xz
systemtap-steved-1392896dcda33324d43392f8e99fed240cf5fb9b.zip
PR4186: cross-architecture probe building
* main.cxx (main): Add 'a:' and 'B:' options. * session.h (kbuildflags): New place to store -B args. * testsuite/systemtap.base/cmd_parse.exp: Test them lightly. * buildrun.cxx (run_make_cmd): Use "--no-print-directory" rather than ">/dev/null" in kbuild invocations. Pass '-a' and '-B' flags along. * hash.cxx (find_script_hash): Add them. * NEWS, stap.1.in: Mention this.
Diffstat (limited to 'buildrun.cxx')
-rw-r--r--buildrun.cxx17
1 files changed, 13 insertions, 4 deletions
diff --git a/buildrun.cxx b/buildrun.cxx
index 1820002d..69cc5a66 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -59,9 +59,9 @@ run_make_cmd(systemtap_session& s, string& make_cmd)
if (s.verbose > 2)
make_cmd += " V=1";
else if (s.verbose > 1)
- make_cmd += " >/dev/null";
+ make_cmd += " --no-print-directory";
else
- make_cmd += " -s >/dev/null";
+ make_cmd += " -s --no-print-directory";
return stap_system (s.verbose, make_cmd);
}
@@ -222,8 +222,17 @@ compile_pass (systemtap_session& s)
// Run make
string make_cmd = string("make")
- + string (" -C \"") + module_dir + string("\"");
- make_cmd += string(" M=\"") + s.tmpdir + string("\" modules");
+ + string (" -C \"") + module_dir + string("\""); // XXX: lex_cast_qstring?
+ make_cmd += string(" M=\"") + s.tmpdir + string("\"");
+
+ // Add architecture
+ make_cmd += string(" ARCH=") + lex_cast_qstring(s.architecture);
+
+ // Add any custom kbuild flags
+ for (unsigned k=0; k<s.kbuildflags.size(); k++)
+ make_cmd += string(" ") + lex_cast_qstring(s.kbuildflags[k]);
+
+ make_cmd += string (" modules");
rc = run_make_cmd(s, make_cmd);