diff options
| -rw-r--r-- | meta/recipes-kernel/systemtap/systemtap/fix_for_compilation_with_gcc-4.6.0.patch | 119 | ||||
| -rw-r--r-- | meta/recipes-kernel/systemtap/systemtap_git.bb | 3 |
2 files changed, 121 insertions, 1 deletions
diff --git a/meta/recipes-kernel/systemtap/systemtap/fix_for_compilation_with_gcc-4.6.0.patch b/meta/recipes-kernel/systemtap/systemtap/fix_for_compilation_with_gcc-4.6.0.patch new file mode 100644 index 0000000000..a32217586f --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap/fix_for_compilation_with_gcc-4.6.0.patch | |||
| @@ -0,0 +1,119 @@ | |||
| 1 | Upstream-Status: Pending | ||
| 2 | |||
| 3 | Fix following compiler errors with gcc 4.6.0: | ||
| 4 | Nitin A Kamble <nitin.a.kamble@intel.com> 2011/05/09 | ||
| 5 | |||
| 6 | | tapsets.cxx: In member function 'void sdt_query::handle_probe_entry()': | ||
| 7 | | tapsets.cxx:5295:8: error: variable 'kprobe_found' set but not used [-Werror=unused-but-set-variable] | ||
| 8 | | tapsets.cxx: In member function 'virtual void hwbkpt_builder::build(systemtap_session&, probe*, probe_point*, const literal_map_t&, std::vector<derived_probe*>&)': | ||
| 9 | | tapsets.cxx:7655:18: error: variable 'has_symbol_str' set but not used [-Werror=unused-but-set-variable] | ||
| 10 | | cc1plus: all warnings being treated as errors | ||
| 11 | | | ||
| 12 | | make[2]: *** [stap-tapsets.o] Error 1 | ||
| 13 | | translate.cxx: In member function 'virtual void c_unparser::visit_print_format(print_format*)': | ||
| 14 | | translate.cxx:4431:6: error: variable 'width_ix' set but not used [-Werror=unused-but-set-variable] | ||
| 15 | | cc1plus: all warnings being treated as errors | ||
| 16 | | | ||
| 17 | | make[2]: *** [stap-translate.o] Error 1 | ||
| 18 | | common.c: In function 'fatal_handler': | ||
| 19 | | common.c:397:13: error: variable 'rc' set but not used [-Werror=unused-but-set-variable] | ||
| 20 | | cc1: all warnings being treated as errors | ||
| 21 | | | ||
| 22 | | make[3]: *** [common.o] Error 1 | ||
| 23 | | make[3]: *** Waiting for unfinished jobs.... | ||
| 24 | | common.c: In function 'fatal_handler': | ||
| 25 | | common.c:397:13: error: variable 'rc' set but not used [-Werror=unused-but-set-variable] | ||
| 26 | | cc1: all warnings being treated as errors | ||
| 27 | | | ||
| 28 | | mainloop.c: In function 'chld_proc': | ||
| 29 | | mainloop.c:56:11: error: variable 'rc' set but not used [-Werror=unused-but-set-variable] | ||
| 30 | | mainloop.c: In function 'stp_main_loop': | ||
| 31 | | mainloop.c:623:17: error: variable 'rc' set but not used [-Werror=unused-but-set-variable] | ||
| 32 | | cc1: all warnings being treated as errors | ||
| 33 | | | ||
| 34 | |||
| 35 | Index: git/tapsets.cxx | ||
| 36 | =================================================================== | ||
| 37 | --- git.orig/tapsets.cxx | ||
| 38 | +++ git/tapsets.cxx | ||
| 39 | @@ -5292,7 +5292,6 @@ sdt_query::handle_probe_entry() | ||
| 40 | probe *new_base = convert_location(); | ||
| 41 | probe_point *new_location = new_base->locations[0]; | ||
| 42 | |||
| 43 | - bool kprobe_found = false; | ||
| 44 | bool need_debug_info = false; | ||
| 45 | |||
| 46 | Dwarf_Addr bias; | ||
| 47 | @@ -5302,7 +5301,6 @@ sdt_query::handle_probe_entry() | ||
| 48 | if (have_kprobe()) | ||
| 49 | { | ||
| 50 | convert_probe(new_base); | ||
| 51 | - kprobe_found = true; | ||
| 52 | // Expand the local variables in the probe body | ||
| 53 | sdt_kprobe_var_expanding_visitor svv (module_val, | ||
| 54 | provider_name, | ||
| 55 | @@ -7652,7 +7650,7 @@ hwbkpt_builder::build(systemtap_session | ||
| 56 | { | ||
| 57 | string symbol_str_val; | ||
| 58 | int64_t hwbkpt_address, len; | ||
| 59 | - bool has_addr, has_symbol_str, has_write, has_rw, has_len; | ||
| 60 | + bool has_addr, has_write, has_rw, has_len; | ||
| 61 | |||
| 62 | if (! (sess.kernel_config["CONFIG_PERF_EVENTS"] == string("y"))) | ||
| 63 | throw semantic_error ("CONFIG_PERF_EVENTS not available on this kernel", | ||
| 64 | @@ -7662,7 +7660,6 @@ hwbkpt_builder::build(systemtap_session | ||
| 65 | location->components[0]->tok); | ||
| 66 | |||
| 67 | has_addr = get_param (parameters, TOK_HWBKPT, hwbkpt_address); | ||
| 68 | - has_symbol_str = get_param (parameters, TOK_HWBKPT, symbol_str_val); | ||
| 69 | has_len = get_param (parameters, TOK_LENGTH, len); | ||
| 70 | has_write = (parameters.find(TOK_HWBKPT_WRITE) != parameters.end()); | ||
| 71 | has_rw = (parameters.find(TOK_HWBKPT_RW) != parameters.end()); | ||
| 72 | Index: git/translate.cxx | ||
| 73 | =================================================================== | ||
| 74 | --- git.orig/translate.cxx | ||
| 75 | +++ git/translate.cxx | ||
| 76 | @@ -4428,7 +4428,7 @@ c_unparser::visit_print_format (print_fo | ||
| 77 | continue; | ||
| 78 | |||
| 79 | /* Take note of the width and precision arguments, if any. */ | ||
| 80 | - int width_ix = -1, prec_ix= -1; | ||
| 81 | + int __attribute((__unused__)) width_ix = -1, prec_ix= -1; | ||
| 82 | if (components[i].widthtype == print_format::width_dynamic) | ||
| 83 | width_ix = arg_ix++; | ||
| 84 | if (components[i].prectype == print_format::prec_dynamic) | ||
| 85 | Index: git/runtime/staprun/common.c | ||
| 86 | =================================================================== | ||
| 87 | --- git.orig/runtime/staprun/common.c | ||
| 88 | +++ git/runtime/staprun/common.c | ||
| 89 | @@ -394,7 +394,7 @@ void parse_modpath(const char *inpath) | ||
| 90 | #define ERR_MSG "\nUNEXPECTED FATAL ERROR in staprun. Please file a bug report.\n" | ||
| 91 | static void fatal_handler (int signum) | ||
| 92 | { | ||
| 93 | - int rc; | ||
| 94 | + int __attribute__((__unused__)) rc; | ||
| 95 | char *str = strsignal(signum); | ||
| 96 | rc = write (STDERR_FILENO, ERR_MSG, sizeof(ERR_MSG)); | ||
| 97 | rc = write (STDERR_FILENO, str, strlen(str)); | ||
| 98 | Index: git/runtime/staprun/mainloop.c | ||
| 99 | =================================================================== | ||
| 100 | --- git.orig/runtime/staprun/mainloop.c | ||
| 101 | +++ git/runtime/staprun/mainloop.c | ||
| 102 | @@ -53,7 +53,7 @@ static void *signal_thread(void *arg) | ||
| 103 | |||
| 104 | static void chld_proc(int signum) | ||
| 105 | { | ||
| 106 | - int32_t rc, btype = STP_EXIT; | ||
| 107 | + int32_t __attribute__((__unused__)) rc, btype = STP_EXIT; | ||
| 108 | dbug(2, "chld_proc %d (%s)\n", signum, strsignal(signum)); | ||
| 109 | pid_t pid = waitpid(-1, NULL, WNOHANG); | ||
| 110 | if (pid != target_pid) | ||
| 111 | @@ -620,7 +620,7 @@ int stp_main_loop(void) | ||
| 112 | { | ||
| 113 | /* module asks us to start exiting, so send STP_EXIT */ | ||
| 114 | dbug(2, "got STP_REQUEST_EXIT\n"); | ||
| 115 | - int32_t rc, btype = STP_EXIT; | ||
| 116 | + int32_t __attribute__((__unused__))rc, btype = STP_EXIT; | ||
| 117 | rc = write(control_channel, &btype, sizeof(btype)); | ||
| 118 | break; | ||
| 119 | } | ||
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.bb b/meta/recipes-kernel/systemtap/systemtap_git.bb index 4df09478de..8ac4c14862 100644 --- a/meta/recipes-kernel/systemtap/systemtap_git.bb +++ b/meta/recipes-kernel/systemtap/systemtap_git.bb | |||
| @@ -5,10 +5,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | |||
| 5 | DEPENDS = "elfutils" | 5 | DEPENDS = "elfutils" |
| 6 | 6 | ||
| 7 | SRCREV = "4ab3a1863bf4f472acae7a809bf2b38d91658aa8" | 7 | SRCREV = "4ab3a1863bf4f472acae7a809bf2b38d91658aa8" |
| 8 | PR = r0 | 8 | PR = "r1" |
| 9 | PV = "1.4+git${SRCPV}" | 9 | PV = "1.4+git${SRCPV}" |
| 10 | 10 | ||
| 11 | SRC_URI = "git://sources.redhat.com/git/systemtap.git;protocol=git \ | 11 | SRC_URI = "git://sources.redhat.com/git/systemtap.git;protocol=git \ |
| 12 | file://fix_for_compilation_with_gcc-4.6.0.patch \ | ||
| 12 | " | 13 | " |
| 13 | 14 | ||
| 14 | EXTRA_OECONF = "--prefix=${D} --with-libelf=${STAGING_DIR_TARGET} --without-rpm \ | 15 | EXTRA_OECONF = "--prefix=${D} --with-libelf=${STAGING_DIR_TARGET} --without-rpm \ |
