linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools/perf: fix static build of perf tool
@ 2011-06-15 21:03 Mathias Krause
  2011-06-16  9:13 ` [tip:perf/urgent] tools/perf: Fix " tip-bot for Mathias Krause
  0 siblings, 1 reply; 2+ messages in thread
From: Mathias Krause @ 2011-06-15 21:03 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Mathias Krause, Peter Zijlstra, Paul Mackerras,
	Ingo Molnar, Arnaldo Carvalho de Melo

To build a statically linked version of the perf tool all needed
libraries must be added in the correct order to get the symbols
resolved. Currently this is broken when, e.g. python or newt support is
enabled -- libpython needs libpthread which is an unconditional link
dependency of the perf tool; libslang needs libm, another unconditional
dependency. To solve the problem in the long run without the need to
keep track of transitive library dependencies, simply make the linker
look at the EXTLIBS multiple times until it has all symbols resolved.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc:  Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc:  Paul Mackerras <paulus@samba.org>
Cc:  Ingo Molnar <mingo@elte.hu>
Cc:  Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
---
 tools/perf/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 032ba63..940257b 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -633,7 +633,7 @@ prefix_SQ = $(subst ','\'',$(prefix))
 
 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
 
-LIBS = -Wl,--whole-archive $(PERFLIBS) -Wl,--no-whole-archive $(EXTLIBS)
+LIBS = -Wl,--whole-archive $(PERFLIBS) -Wl,--no-whole-archive -Wl,--start-group $(EXTLIBS) -Wl,--end-group
 
 ALL_CFLAGS += $(BASIC_CFLAGS)
 ALL_CFLAGS += $(ARCH_CFLAGS)
-- 
1.5.6.5


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

end of thread, other threads:[~2011-06-16  9:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-15 21:03 [PATCH] tools/perf: fix static build of perf tool Mathias Krause
2011-06-16  9:13 ` [tip:perf/urgent] tools/perf: Fix " tip-bot for Mathias Krause

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).