Skip to content

Commit d50e2db

Browse files
acmellostjeffle
authored andcommitted
perf tests bp_account: Make global variable static
ANBZ: torvalds#668 commit cff20b3 upstream. To fix the build with newer gccs, that without this patch exit with: LD /tmp/build/perf/tests/perf-in.o 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 make[4]: *** [/git/perf/tools/build/Makefile.build:145: /tmp/build/perf/tests/perf-in.o] Error 1 First noticed in fedora:rawhide/32 with: [perfbuilder@a5ff49d6e6e4 ~]$ gcc --version gcc (GCC) 10.0.1 20200216 (Red Hat 10.0.1-0.8) Reported-by: Jiri Olsa <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Namhyung Kim <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: Jeffle Xu <[email protected]> Reviewed-by: Joseph Qi <[email protected]>
1 parent 1ee93e9 commit d50e2db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/tests/bp_account.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "perf.h"
2323
#include "cloexec.h"
2424

25-
volatile long the_var;
25+
static volatile long the_var;
2626

2727
static noinline int test_function(void)
2828
{

0 commit comments

Comments
 (0)