Hello community,

here is the log from the commit of package trace-cmd for openSUSE:Factory 
checked in at 2020-06-09 00:08:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/trace-cmd (Old)
 and      /work/SRC/openSUSE:Factory/.trace-cmd.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "trace-cmd"

Tue Jun  9 00:08:19 2020 rev:15 rq:812570 version:2.8.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/trace-cmd/trace-cmd.changes      2019-08-22 
10:52:30.601698778 +0200
+++ /work/SRC/openSUSE:Factory/.trace-cmd.new.3606/trace-cmd.changes    
2020-06-09 00:10:03.102419414 +0200
@@ -1,0 +2,6 @@
+Mon Jun  8 08:25:32 UTC 2020 - Mel Gorman <mgor...@suse.de>
+
+- Add 0001-trace-cmd-fix-multiple-definition-compiler-errors.patch
+  - Backport fix for a multiple definition error triggered by gcc 10
+
+-------------------------------------------------------------------

New:
----
  0001-trace-cmd-fix-multiple-definition-compiler-errors.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ trace-cmd.spec ++++++
--- /var/tmp/diff_new_pack.BHGmtW/_old  2020-06-09 00:10:04.582423956 +0200
+++ /var/tmp/diff_new_pack.BHGmtW/_new  2020-06-09 00:10:04.582423956 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package trace-cmd
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -27,6 +27,7 @@
 Source1:        trace-cmd-rpmlintrc
 Patch1:         makefile-lib64.patch
 Patch2:         makefile-bash.patch
+Patch3:         0001-trace-cmd-fix-multiple-definition-compiler-errors.patch
 BuildRequires:  asciidoc
 BuildRequires:  audit-devel
 BuildRequires:  docbook-xsl-stylesheets
@@ -44,6 +45,7 @@
 %setup -q
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 make %{?_smp_mflags} prefix=%{_prefix} trace-cmd

++++++ 0001-trace-cmd-fix-multiple-definition-compiler-errors.patch ++++++
>From de7941659add7c407766b7b9bd5726c78e652583 Mon Sep 17 00:00:00 2001
From: "Tzvetomir Stoyanov (VMware)" <tz.stoya...@gmail.com>
Date: Mon, 10 Feb 2020 10:50:10 +0200
Subject: [PATCH] trace-cmd: Fix "multiple definition" compiler errors

When compiling with gcc and option "-fno-common", there are
errors because of multiple global variables with the same names.
The "-fno-common" gcc option is turned on by default on gcc 10, so
trace-cmd build fails on this compiler.

Proposed solution: set the variables to be static, as their scope is
only the current C file.

Link: 
http://lore.kernel.org/linux-trace-devel/20200210085010.7974-1-tz.stoya...@gmail.com

Reported-by: Ziqian SUN (Zamir) <szts...@gmail.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=206467
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoya...@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rost...@goodmis.org>

diff --git a/tracecmd/trace-hist.c b/tracecmd/trace-hist.c
index c45182679b8f..fdfd4a1976d0 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_field;
+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;
 
diff --git a/tracecmd/trace-mem.c b/tracecmd/trace-mem.c
index 37046fd8310b..5caeeb6cf86d 100644
--- a/tracecmd/trace-mem.c
+++ b/tracecmd/trace-mem.c
@@ -30,31 +30,31 @@ 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_field;
 
-struct tep_format_field *kmalloc_callsite_field;
-struct tep_format_field *kmalloc_bytes_req_field;
-struct tep_format_field *kmalloc_bytes_alloc_field;
-struct tep_format_field *kmalloc_ptr_field;
+static struct tep_format_field *kmalloc_callsite_field;
+static struct tep_format_field *kmalloc_bytes_req_field;
+static struct tep_format_field *kmalloc_bytes_alloc_field;
+static struct tep_format_field *kmalloc_ptr_field;
 
-struct tep_format_field *kmalloc_node_callsite_field;
-struct tep_format_field *kmalloc_node_bytes_req_field;
-struct tep_format_field *kmalloc_node_bytes_alloc_field;
-struct tep_format_field *kmalloc_node_ptr_field;
+static struct tep_format_field *kmalloc_node_callsite_field;
+static struct tep_format_field *kmalloc_node_bytes_req_field;
+static struct tep_format_field *kmalloc_node_bytes_alloc_field;
+static struct tep_format_field *kmalloc_node_ptr_field;
 
-struct tep_format_field *kfree_ptr_field;
+static struct tep_format_field *kfree_ptr_field;
 
-struct tep_format_field *kmem_cache_callsite_field;
-struct tep_format_field *kmem_cache_bytes_req_field;
-struct tep_format_field *kmem_cache_bytes_alloc_field;
-struct tep_format_field *kmem_cache_ptr_field;
+static struct tep_format_field *kmem_cache_callsite_field;
+static struct tep_format_field *kmem_cache_bytes_req_field;
+static struct tep_format_field *kmem_cache_bytes_alloc_field;
+static struct tep_format_field *kmem_cache_ptr_field;
 
-struct tep_format_field *kmem_cache_node_callsite_field;
-struct tep_format_field *kmem_cache_node_bytes_req_field;
-struct tep_format_field *kmem_cache_node_bytes_alloc_field;
-struct tep_format_field *kmem_cache_node_ptr_field;
+static struct tep_format_field *kmem_cache_node_callsite_field;
+static struct tep_format_field *kmem_cache_node_bytes_req_field;
+static struct tep_format_field *kmem_cache_node_bytes_alloc_field;
+static struct tep_format_field *kmem_cache_node_ptr_field;
 
-struct tep_format_field *kmem_cache_free_ptr_field;
+static struct tep_format_field *kmem_cache_free_ptr_field;
 
 static void *zalloc(size_t size)
 {

Reply via email to