All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf tools: Fix static building
@ 2016-08-22 17:33 ` Alexey Brodkin
  0 siblings, 0 replies; 12+ messages in thread
From: Alexey Brodkin @ 2016-08-22 17:33 UTC (permalink / raw)
  To: linux-snps-arc

With commit e3d09ec8126f ("tools lib traceevent: Export dynamic symbols
used by traceevent plugins") we started to add "--dynamic-list" in
LDFLAGS. One side-effect of that was inability to build really
statically-linked perf.

I.e. even if "LDFLAGS=-static" were passed on perf building command-line
it had no effect and perf was built dynamically.

This change disables setup of "--dynamic-list" if LDFLAGS contains
"-static" option.

Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
Cc: Arnaldo Carvalho de Melo <acme at redhat.com>
Cc: Vineet Gupta <vgupta at synopsys.com>
Cc: Wang Nan <wangnan0 at huawei.com>
Cc: Jiri Olsa <jolsa at kernel.org>
Cc: He Kuang <hekuang at huawei.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt at hitachi.com>
Cc: Namhyung Kim <namhyung at kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra at chello.nl>
Cc: Zefan Li <lizefan at huawei.com>
Cc: pi3orama at 163.com
---
 tools/perf/Makefile.perf | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 2d908750..e9acc7c 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -236,7 +236,9 @@ LIBTRACEEVENT = $(TE_PATH)libtraceevent.a
 export LIBTRACEEVENT
 
 LIBTRACEEVENT_DYNAMIC_LIST = $(TE_PATH)libtraceevent-dynamic-list
+ifeq ($(filter -static,$(LDFLAGS)),)
 LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS = -Xlinker --dynamic-list=$(LIBTRACEEVENT_DYNAMIC_LIST)
+endif
 
 LIBAPI = $(API_PATH)libapi.a
 export LIBAPI
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-09-14 16:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-22 17:33 [PATCH] perf tools: Fix static building Alexey Brodkin
2016-08-22 17:33 ` Alexey Brodkin
2016-08-30 16:21 ` Vineet Gupta
2016-08-30 16:21   ` Vineet Gupta
2016-08-31  7:21 ` Jiri Olsa
2016-08-31  7:21   ` Jiri Olsa
2016-09-01 18:28   ` Vineet Gupta
2016-09-01 18:28     ` Vineet Gupta
2016-09-14 16:21     ` Alexey Brodkin
2016-09-14 16:21       ` Alexey Brodkin
2016-08-31  7:24 ` Jiri Olsa
2016-08-31  7:24   ` Jiri Olsa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.