summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-qoriq/0001-perf-tests-bp_account-Make-global-variable-static.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-qoriq/0001-perf-tests-bp_account-Make-global-variable-static.patch')
-rw-r--r--recipes-kernel/linux/linux-qoriq/0001-perf-tests-bp_account-Make-global-variable-static.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-qoriq/0001-perf-tests-bp_account-Make-global-variable-static.patch b/recipes-kernel/linux/linux-qoriq/0001-perf-tests-bp_account-Make-global-variable-static.patch
new file mode 100644
index 00000000..b36ed2cc
--- /dev/null
+++ b/recipes-kernel/linux/linux-qoriq/0001-perf-tests-bp_account-Make-global-variable-static.patch
@@ -0,0 +1,42 @@
1From cff20b3151ccab690715cb6cf0f5da5cccb32adf Mon Sep 17 00:00:00 2001
2From: Arnaldo Carvalho de Melo <acme@redhat.com>
3Date: Mon, 2 Mar 2020 11:13:19 -0300
4Subject: [PATCH] perf tests bp_account: Make global variable static
5
6To fix the build with newer gccs, that without this patch exit with:
7
8 LD /tmp/build/perf/tests/perf-in.o
9 ld: /tmp/build/perf/tests/bp_account.o:/git/perf/tools/perf/tests/bp_account.c:22: multiple definition of `the_var'; /tmp/build/perf/tests/bp_signal.o:/git/perf/tools/perf/tests/bp_signal.c:38: first defined here
10 make[4]: *** [/git/perf/tools/build/Makefile.build:145: /tmp/build/perf/tests/perf-in.o] Error 1
11
12First noticed in fedora:rawhide/32 with:
13
14 [perfbuilder@a5ff49d6e6e4 ~]$ gcc --version
15 gcc (GCC) 10.0.1 20200216 (Red Hat 10.0.1-0.8)
16
17Upstream-Status: Backport
18
19Reported-by: Jiri Olsa <jolsa@kernel.org>
20Cc: Adrian Hunter <adrian.hunter@intel.com>
21Cc: Namhyung Kim <namhyung@kernel.org>
22Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
23---
24 tools/perf/tests/bp_account.c | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27diff --git a/tools/perf/tests/bp_account.c b/tools/perf/tests/bp_account.c
28index d0b935356274..489b50604cf2 100644
29--- a/tools/perf/tests/bp_account.c
30+++ b/tools/perf/tests/bp_account.c
31@@ -19,7 +19,7 @@
32 #include "../perf-sys.h"
33 #include "cloexec.h"
34
35-volatile long the_var;
36+static volatile long the_var;
37
38 static noinline int test_function(void)
39 {
40--
412.17.1
42