summaryrefslogtreecommitdiffstats
path: root/buildrun.cxx
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2009-09-01 09:38:12 -0700
committerJosh Stone <jistone@redhat.com>2009-09-01 09:46:09 -0700
commit4569f6bb769482d732f72fb1208522d51f4e36f4 (patch)
treef93bd9f6b6b963e131f85e59eaccd789cbeed482 /buildrun.cxx
parent2649e13ce4e304e962049b25d07c9c522d5b5be3 (diff)
downloadsystemtap-steved-4569f6bb769482d732f72fb1208522d51f4e36f4.tar.gz
systemtap-steved-4569f6bb769482d732f72fb1208522d51f4e36f4.tar.xz
systemtap-steved-4569f6bb769482d732f72fb1208522d51f4e36f4.zip
PR10581: Use ARCH for tracepoints and kernel typequeries
These are kernel modules that we generate for querying debuginfo, so they need to use the same ARCH settings that we put in the main script module. * buildrun.cxx (make_tracequery, make_typequery_kmod): Add the arch and kbuild flags to make_cmd. * hash.cxx (find_stapconf_hash, find_tracequery_hash, find_typequery_hash): The arch is in the base hash already, but add the kbuild flags too.
Diffstat (limited to 'buildrun.cxx')
-rw-r--r--buildrun.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/buildrun.cxx b/buildrun.cxx
index 71e6df56..a40dab15 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -442,6 +442,14 @@ make_tracequery(systemtap_session& s, string& name,
// make the module
string make_cmd = "make -C '" + s.kernel_build_tree + "'"
+ " M='" + dir + "' modules";
+
+ // 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]);
+
if (s.verbose < 4)
make_cmd += " >/dev/null 2>&1";
return run_make_cmd(s, make_cmd);
@@ -491,6 +499,14 @@ make_typequery_kmod(systemtap_session& s, const string& header, string& name)
// make the module
string make_cmd = "make -C '" + s.kernel_build_tree + "'"
+ " M='" + dir + "' modules";
+
+ // 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]);
+
if (s.verbose < 4)
make_cmd += " >/dev/null 2>&1";
return run_make_cmd(s, make_cmd);