]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Fix static build with newer toolchains
authorJiri Olsa <jolsa@kernel.org>
Fri, 25 Aug 2017 18:45:10 +0000 (15:45 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 28 Aug 2017 14:05:09 +0000 (11:05 -0300)
commit54bba0f4d51dc66f5366c84a8c28e096612a6787
treec9d376566eecb2c42007f45e1cf545332254a608
parenta4ac4d0939efee7322b17fb2eee91862a6b3f1a6
perf tools: Fix static build with newer toolchains

We can't pass --dynamic-list list into static build anymore, because
compilers starts to scream about that. Fedora 26 started to fail build
with following error:

  $ make LDFLAGS=-static
  ...
  /usr/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/usr/lib/gcc/x86_64-redhat-linux/7/../../../../lib64/libc.a(strcmp.o
+)' can not be used when making an executable; recompile with -fPIE and relink with -pie

There's no sense for --dynamic-list in static build, because there's no
.dynsym table in static binary. Consequently the traceevent plugins have
never worked with static build, but it was quietly passed by.

To fix this in future I think we should add support to compile plugins
within the perf binary directly for static build.

Reported-and-Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/n/tip-jeg6a7ff9j9hlqn8k4gllzvv@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Makefile.perf