From: Markus Trippelsdorf <markus@trippelsdorf.de>
To: linux-kernel@vger.kernel.org
Cc: Mike Frysinger <vapier@gentoo.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
Paul Mackerras <paulus@samba.org>
Subject: [PATCH] Perf: bfd.h/libbfd detection fails with recent binutils
Date: Wed, 19 Sep 2012 09:29:02 +0200 [thread overview]
Message-ID: <20120919072902.GA262@x4> (raw)
With recent binutils I get:
perf % make
Makefile:668: No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demanglin
That happens because bfd.h now contains:
#if !defined PACKAGE && !defined PACKAGE_VERSION
#error config.h must be included before this header
#endif
I've reopened a bug in the hope that this check will be deleted:
http://sourceware.org/bugzilla/show_bug.cgi?id=14243
But in the meantime, the following patch fixes the problem
Signed-off-by: Markus Trippelsdorf <markus@trippelsdorf.de>
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 35655c3..5604664 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -644,7 +644,7 @@ else
EXTLIBS += -liberty
BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE
else
- FLAGS_BFD=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -lbfd
+ FLAGS_BFD=$(ALL_CFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) -DPACKAGE='perf' -lbfd
has_bfd := $(call try-cc,$(SOURCE_BFD),$(FLAGS_BFD))
ifeq ($(has_bfd),y)
EXTLIBS += -lbfd
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index 1fe733a..50a0912 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -26,6 +26,7 @@ static inline char *bfd_demangle(void __used *v, const char __used *c,
return NULL;
}
#else
+#define PACKAGE 'perf'
#include <bfd.h>
#endif
#endif
--
Markus
next reply other threads:[~2012-09-19 7:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-19 7:29 Markus Trippelsdorf [this message]
2012-09-27 5:40 ` [tip:perf/core] perf tools: bfd.h/ libbfd detection fails with recent binutils tip-bot for Markus Trippelsdorf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120919072902.GA262@x4 \
--to=markus@trippelsdorf.de \
--cc=acme@ghostprotocols.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.