diff options
author | Josh Stone <jistone@redhat.com> | 2009-09-01 09:38:12 -0700 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2009-09-01 09:46:09 -0700 |
commit | 4569f6bb769482d732f72fb1208522d51f4e36f4 (patch) | |
tree | f93bd9f6b6b963e131f85e59eaccd789cbeed482 | |
parent | 2649e13ce4e304e962049b25d07c9c522d5b5be3 (diff) | |
download | systemtap-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.
-rw-r--r-- | buildrun.cxx | 16 | ||||
-rw-r--r-- | hash.cxx | 14 |
2 files changed, 29 insertions, 1 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); @@ -190,6 +190,7 @@ find_script_hash (systemtap_session& s, const string& script, const hash &base) for (unsigned i = 0; i < s.macros.size(); i++) h.add(s.macros[i]); + // Add any custom kbuild flags (-B) for (unsigned i = 0; i < s.kbuildflags.size(); i++) h.add(s.kbuildflags[i]); @@ -236,7 +237,9 @@ find_stapconf_hash (systemtap_session& s, const hash& base) { hash h(base); - // The basic hash should be good enough for STAPCONF variables + // Add any custom kbuild flags + for (unsigned i = 0; i < s.kbuildflags.size(); i++) + h.add(s.kbuildflags[i]); // Get the directory path to store our cached stapconf parameters string result, hashdir; @@ -268,6 +271,10 @@ find_tracequery_hash (systemtap_session& s, const string& header) // Add the tracepoint header to the computed hash h.add_file(header); + // Add any custom kbuild flags + for (unsigned i = 0; i < s.kbuildflags.size(); i++) + h.add(s.kbuildflags[i]); + // Get the directory path to store our cached module string result, hashdir; h.result(result); @@ -287,6 +294,11 @@ find_typequery_hash (systemtap_session& s, const string& name) // Add the typequery name to distinguish the hash h.add(name); + if (name[0] == 'k') + // Add any custom kbuild flags + for (unsigned i = 0; i < s.kbuildflags.size(); i++) + h.add(s.kbuildflags[i]); + // Get the directory path to store our cached module string result, hashdir; h.result(result); |