diff options
author | Patrick McLean <chutzpah@gentoo.org> | 2020-05-08 21:36:18 -0700 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2020-05-08 21:36:18 -0700 |
commit | 7ba71a3dab311c81360dfc76c38503d85167145b (patch) | |
tree | 619f9ebd123f791eee577b8b51c8325f3f46fd62 /dev-util/trace-cmd | |
parent | net-misc/freerdp: remove old (diff) | |
download | gentoo-7ba71a3dab311c81360dfc76c38503d85167145b.tar.gz gentoo-7ba71a3dab311c81360dfc76c38503d85167145b.tar.bz2 gentoo-7ba71a3dab311c81360dfc76c38503d85167145b.zip |
dev-util/trace-cmd-2.8.3: Add patch to build with gcc-10
Add a call to python_optimize in python_install as well.
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
Diffstat (limited to 'dev-util/trace-cmd')
-rw-r--r-- | dev-util/trace-cmd/files/trace-cmd-2.8.3-gcc10.patch | 104 | ||||
-rw-r--r-- | dev-util/trace-cmd/trace-cmd-2.8.3.ebuild | 3 |
2 files changed, 107 insertions, 0 deletions
diff --git a/dev-util/trace-cmd/files/trace-cmd-2.8.3-gcc10.patch b/dev-util/trace-cmd/files/trace-cmd-2.8.3-gcc10.patch new file mode 100644 index 000000000000..709347448df2 --- /dev/null +++ b/dev-util/trace-cmd/files/trace-cmd-2.8.3-gcc10.patch @@ -0,0 +1,104 @@ +diff --git a/tracecmd/trace-hist.c b/tracecmd/trace-hist.c +index 384a7ff..e0e7c47 100644 +--- a/tracecmd/trace-hist.c ++++ b/tracecmd/trace-hist.c +@@ -27,26 +27,26 @@ static int kernel_stack_type; + + static int long_size; + +-struct tep_format_field *common_type_field; +-struct tep_format_field *common_pid_field; +-struct tep_format_field *sched_wakeup_comm_field; +-struct tep_format_field *sched_wakeup_new_comm_field; +-struct tep_format_field *sched_wakeup_pid_field; +-struct tep_format_field *sched_wakeup_new_pid_field; +-struct tep_format_field *sched_switch_prev_field; +-struct tep_format_field *sched_switch_next_field; +-struct tep_format_field *sched_switch_prev_pid_field; +-struct tep_format_field *sched_switch_next_pid_field; +-struct tep_format_field *function_ip_field; +-struct tep_format_field *function_parent_ip_field; +-struct tep_format_field *function_graph_entry_func_field; +-struct tep_format_field *function_graph_entry_depth_field; +-struct tep_format_field *function_graph_exit_func_field; +-struct tep_format_field *function_graph_exit_depth_field; +-struct tep_format_field *function_graph_exit_calltime_field; +-struct tep_format_field *function_graph_exit_rettime_field; +-struct tep_format_field *function_graph_exit_overrun_field; +-struct tep_format_field *kernel_stack_caller_field; ++static struct tep_format_field *common_type_hist; ++static struct tep_format_field *common_pid_field; ++static struct tep_format_field *sched_wakeup_comm_field; ++static struct tep_format_field *sched_wakeup_new_comm_field; ++static struct tep_format_field *sched_wakeup_pid_field; ++static struct tep_format_field *sched_wakeup_new_pid_field; ++static struct tep_format_field *sched_switch_prev_field; ++static struct tep_format_field *sched_switch_next_field; ++static struct tep_format_field *sched_switch_prev_pid_field; ++static struct tep_format_field *sched_switch_next_pid_field; ++static struct tep_format_field *function_ip_field; ++static struct tep_format_field *function_parent_ip_field; ++static struct tep_format_field *function_graph_entry_func_field; ++static struct tep_format_field *function_graph_entry_depth_field; ++static struct tep_format_field *function_graph_exit_func_field; ++static struct tep_format_field *function_graph_exit_depth_field; ++static struct tep_format_field *function_graph_exit_calltime_field; ++static struct tep_format_field *function_graph_exit_rettime_field; ++static struct tep_format_field *function_graph_exit_overrun_field; ++static struct tep_format_field *kernel_stack_caller_field; + + static int compact; + +@@ -568,7 +568,7 @@ process_record(struct tep_handle *pevent, struct tep_record *record) + unsigned long long val; + int type; + +- tep_read_number_field(common_type_field, record->data, &val); ++ tep_read_number_field(common_type_hist, record->data, &val); + type = val; + + if (type == function_type) +@@ -956,8 +956,8 @@ static void do_trace_hist(struct tracecmd_input *handle) + + long_size = tracecmd_long_size(handle); + +- common_type_field = tep_find_common_field(event, "common_type"); +- if (!common_type_field) ++ common_type_hist = tep_find_common_field(event, "common_type"); ++ if (!common_type_hist) + die("Can't find a 'type' field?"); + + common_pid_field = tep_find_common_field(event, "common_pid"); +diff --git a/tracecmd/trace-mem.c b/tracecmd/trace-mem.c +index 078a61b..630aeff 100644 +--- a/tracecmd/trace-mem.c ++++ b/tracecmd/trace-mem.c +@@ -30,7 +30,7 @@ static int kmem_cache_alloc_type; + static int kmem_cache_alloc_node_type; + static int kmem_cache_free_type; + +-struct tep_format_field *common_type_field; ++static struct tep_format_field *common_type_mem; + + struct tep_format_field *kmalloc_callsite_field; + struct tep_format_field *kmalloc_bytes_req_field; +@@ -369,7 +369,7 @@ process_record(struct tep_handle *pevent, struct tep_record *record) + unsigned long long val; + int type; + +- tep_read_number_field(common_type_field, record->data, &val); ++ tep_read_number_field(common_type_mem, record->data, &val); + type = val; + + if (type == kmalloc_type) +@@ -490,8 +490,8 @@ static void do_trace_mem(struct tracecmd_input *handle) + ret = tep_data_type(pevent, record); + event = tep_find_event(pevent, ret); + +- common_type_field = tep_find_common_field(event, "common_type"); +- if (!common_type_field) ++ common_type_mem = tep_find_common_field(event, "common_type"); ++ if (!common_type_mem) + die("Can't find a 'type' field?"); + + update_kmalloc(pevent); diff --git a/dev-util/trace-cmd/trace-cmd-2.8.3.ebuild b/dev-util/trace-cmd/trace-cmd-2.8.3.ebuild index 18ef6f197f7a..e5586ade3a32 100644 --- a/dev-util/trace-cmd/trace-cmd-2.8.3.ebuild +++ b/dev-util/trace-cmd/trace-cmd-2.8.3.ebuild @@ -44,6 +44,7 @@ CONFIG_CHECK=" PATCHES=( "${FILESDIR}/trace-cmd-2.8-python-pkgconfig-name.patch" "${FILESDIR}/trace-cmd-2.8.3-soname.patch" + "${FILESDIR}/trace-cmd-2.8.3-gcc10.patch" ) pkg_setup() { @@ -107,4 +108,6 @@ python_install() { install_python popd > /dev/null || die + + python_optimize } |