diff options
author | Frank Ch. Eigler <fche@elastic.org> | 2009-08-24 10:34:45 -0400 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2009-08-24 10:37:38 -0400 |
commit | 1392896dcda33324d43392f8e99fed240cf5fb9b (patch) | |
tree | c3546b8e377aa31fbf49a45b00940e017c425812 /main.cxx | |
parent | 5a77d0116da4bc1d5b41df3172ad78c537eff51a (diff) | |
download | systemtap-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 'main.cxx')
-rw-r--r-- | main.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -106,11 +106,13 @@ usage (systemtap_session& s, int exitcode) clog << " " << s.include_path[i] << endl; clog << " -D NM=VAL emit macro definition into generated C code" << endl + << " -B NM=VAL pass option to kbuild make" << endl << " -R DIR look in DIR for runtime, instead of" << endl << " " << s.runtime_path << endl << " -r DIR cross-compile to kernel with given build tree; or else" << endl << " -r RELEASE cross-compile to kernel /lib/modules/RELEASE/build, instead of" << endl << " " << s.kernel_build_tree << endl + << " -a ARCH cross-compile to given architecture, instead of " << s.architecture << endl << " -m MODULE set probe module name, instead of " << endl << " " << s.module_name << endl << " -o FILE send script output to file, instead of stdout. This supports" << endl @@ -590,8 +592,8 @@ main (int argc, char * const argv []) { "unprivileged", 0, &long_opt, LONG_OPT_UNPRIVILEGED }, { NULL, 0, NULL, 0 } }; - int grc = getopt_long (argc, argv, "hVMvtp:I:e:o:R:r:m:kgPc:x:D:bs:uqwl:d:L:FS:", - long_options, NULL); + int grc = getopt_long (argc, argv, "hVMvtp:I:e:o:R:r:a:m:kgPc:x:D:bs:uqwl:d:L:FS:B:", + long_options, NULL); if (grc < 0) break; switch (grc) @@ -711,6 +713,10 @@ main (int argc, char * const argv []) setup_kernel_release(s, optarg); break; + case 'a': + s.architecture = string(optarg); + break; + case 'k': s.keep_tmpdir = true; s.use_cache = false; /* User wants to keep a usable build tree. */ @@ -792,6 +798,10 @@ main (int argc, char * const argv []) s.load_only = true; break; + case 'B': + s.kbuildflags.push_back (string (optarg)); + break; + case 0: switch (long_opt) { |