mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] perf_counter tools: fix libbfd detection for systems with libz dependency
@ 2009-08-08 12:14 Mike Galbraith
  2009-08-08 14:33 ` [tip:perfcounters/urgent] perf_counter tools: Fix " tip-bot for Mike Galbraith
  2009-08-09 11:11 ` [tip:perfcounters/core] " tip-bot for Mike Galbraith
  0 siblings, 2 replies; 3+ messages in thread
From: Mike Galbraith @ 2009-08-08 12:14 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: Ingo Molnar, LKML

perf_counter tools: fix libbfd detection for systems with libz dependency

Due to a libz dependency in some distro's binutils package, demangle
support isn't compiled in despite the necessary libraries being available.
Fix this by adding a -lz link test to the dependency detection rules.

Signed-off-by: Mike Galbraith <efault@gmx.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>

 tools/perf/Makefile |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 1916e44..60411e9 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -387,10 +387,14 @@ else
 
 	has_bfd_iberty := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o /dev/null $(ALL_LDFLAGS) -lbfd -liberty > /dev/null 2>&1 && echo y")
 
+	has_bfd_iberty_z := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o /dev/null $(ALL_LDFLAGS) -lbfd -liberty -lz > /dev/null 2>&1 && echo y")
+
 	ifeq ($(has_bfd),y)
 		EXTLIBS += -lbfd
 	else ifeq ($(has_bfd_iberty),y)
 		EXTLIBS += -lbfd -liberty
+	else ifeq ($(has_bfd_iberty_z),y)
+		EXTLIBS += -lbfd -liberty -lz
 	else
 		msg := $(warning No bfd.h/libbfd found, install binutils-dev[el] to gain symbol demangling)
 		BASIC_CFLAGS += -DNO_DEMANGLE



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

* [tip:perfcounters/urgent] perf_counter tools: Fix libbfd detection for systems with libz dependency
  2009-08-08 12:14 [patch] perf_counter tools: fix libbfd detection for systems with libz dependency Mike Galbraith
@ 2009-08-08 14:33 ` tip-bot for Mike Galbraith
  2009-08-09 11:11 ` [tip:perfcounters/core] " tip-bot for Mike Galbraith
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Mike Galbraith @ 2009-08-08 14:33 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, a.p.zijlstra, efault, tglx, mingo

Commit-ID:  115c46db58736d6a517a1db8158443665d6f30c2
Gitweb:     http://git.kernel.org/tip/115c46db58736d6a517a1db8158443665d6f30c2
Author:     Mike Galbraith <efault@gmx.de>
AuthorDate: Sat, 8 Aug 2009 14:14:15 +0200
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Sat, 8 Aug 2009 14:35:05 +0200

perf_counter tools: Fix libbfd detection for systems with libz dependency

Due to a libz dependency in some distro's binutils package,
C++ demangle support isn't compiled in despite the necessary
libraries being available.

Fix this by adding a -lz link test to the dependency detection
rules.

Signed-off-by: Mike Galbraith <efault@gmx.de>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1249733655.6929.5.camel@marge.simson.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 tools/perf/Makefile |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 1916e44..60411e9 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -387,10 +387,14 @@ else
 
 	has_bfd_iberty := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o /dev/null $(ALL_LDFLAGS) -lbfd -liberty > /dev/null 2>&1 && echo y")
 
+	has_bfd_iberty_z := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o /dev/null $(ALL_LDFLAGS) -lbfd -liberty -lz > /dev/null 2>&1 && echo y")
+
 	ifeq ($(has_bfd),y)
 		EXTLIBS += -lbfd
 	else ifeq ($(has_bfd_iberty),y)
 		EXTLIBS += -lbfd -liberty
+	else ifeq ($(has_bfd_iberty_z),y)
+		EXTLIBS += -lbfd -liberty -lz
 	else
 		msg := $(warning No bfd.h/libbfd found, install binutils-dev[el] to gain symbol demangling)
 		BASIC_CFLAGS += -DNO_DEMANGLE

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

* [tip:perfcounters/core] perf_counter tools: Fix libbfd detection for systems with libz dependency
  2009-08-08 12:14 [patch] perf_counter tools: fix libbfd detection for systems with libz dependency Mike Galbraith
  2009-08-08 14:33 ` [tip:perfcounters/urgent] perf_counter tools: Fix " tip-bot for Mike Galbraith
@ 2009-08-09 11:11 ` tip-bot for Mike Galbraith
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Mike Galbraith @ 2009-08-09 11:11 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, a.p.zijlstra, efault, tglx, mingo

Commit-ID:  183f3b0887083d36c8a25cd5e3518906415d1889
Gitweb:     http://git.kernel.org/tip/183f3b0887083d36c8a25cd5e3518906415d1889
Author:     Mike Galbraith <efault@gmx.de>
AuthorDate: Sat, 8 Aug 2009 14:14:15 +0200
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 9 Aug 2009 12:54:47 +0200

perf_counter tools: Fix libbfd detection for systems with libz dependency

Due to a libz dependency in some distro's binutils package,
C++ demangle support isn't compiled in despite the necessary
libraries being available.

Fix this by adding a -lz link test to the dependency detection
rules.

Signed-off-by: Mike Galbraith <efault@gmx.de>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1249733655.6929.5.camel@marge.simson.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 tools/perf/Makefile |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 1916e44..60411e9 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -387,10 +387,14 @@ else
 
 	has_bfd_iberty := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o /dev/null $(ALL_LDFLAGS) -lbfd -liberty > /dev/null 2>&1 && echo y")
 
+	has_bfd_iberty_z := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o /dev/null $(ALL_LDFLAGS) -lbfd -liberty -lz > /dev/null 2>&1 && echo y")
+
 	ifeq ($(has_bfd),y)
 		EXTLIBS += -lbfd
 	else ifeq ($(has_bfd_iberty),y)
 		EXTLIBS += -lbfd -liberty
+	else ifeq ($(has_bfd_iberty_z),y)
+		EXTLIBS += -lbfd -liberty -lz
 	else
 		msg := $(warning No bfd.h/libbfd found, install binutils-dev[el] to gain symbol demangling)
 		BASIC_CFLAGS += -DNO_DEMANGLE

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

end of thread, other threads:[~2009-08-09 11:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-08 12:14 [patch] perf_counter tools: fix libbfd detection for systems with libz dependency Mike Galbraith
2009-08-08 14:33 ` [tip:perfcounters/urgent] perf_counter tools: Fix " tip-bot for Mike Galbraith
2009-08-09 11:11 ` [tip:perfcounters/core] " tip-bot for Mike Galbraith

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®