public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf: fix Makefile check for libdward
@ 2010-05-17 19:04 Stephane Eranian
  2010-05-17 19:24 ` Masami Hiramatsu
  0 siblings, 1 reply; 3+ messages in thread
From: Stephane Eranian @ 2010-05-17 19:04 UTC (permalink / raw)
  To: linux-kernel
  Cc: peterz, mingo, paulus, davem, fweisbec, acme, perfmon2-devel,
	eranian, eranian

On Ubuntu 9.10, the elfutils/libdw package is 0.141, yet it is
not sufficient to compile util/probe-finder.c as it uses a type,
namely Dwarf_CFI, which is introduced sometime after version 0.141.

This patch updates the libdwarf test in the Makefile to check
for the definition of Dwarf_CFI. If is is not there, the test
fails and dwarf support is disabled.

It is not clear to me which version introduces Dwarf_CFI,
thus I adjusted the version message to 0.142, could be more
recent.

Signed-off-by: Stephane Eranian <eranian@google.com>

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index a9281cc..992bce7 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -508,7 +508,7 @@ PERFLIBS = $(LIB_FILE)
 -include config.mak
 
 ifndef NO_DWARF
-ifneq ($(shell sh -c "(echo '\#include <dwarf.h>'; echo '\#include <libdw.h>'; echo '\#include <version.h>'; echo '\#ifndef _ELFUTILS_PREREQ'; echo '\#error'; echo '\#endif'; echo 'int main(void) { Dwarf *dbg; dbg = dwarf_begin(0, DWARF_C_READ); return (long)dbg; }') | $(CC) -x c - $(ALL_CFLAGS) -I/usr/include/elfutils -ldw -lelf -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
+ifneq ($(shell sh -c "(echo '\#include <dwarf.h>'; echo '\#include <libdw.h>'; echo '\#include <version.h>'; echo '\#ifndef _ELFUTILS_PREREQ'; echo '\#error'; echo '\#endif'; echo 'int main(void) { Dwarf *dbg; Dwarf_CFI *cfi; dbg = dwarf_begin(0, DWARF_C_READ); return (long)dbg; }') | $(CC) -x c - $(ALL_CFLAGS) -I/usr/include/elfutils -ldw -lelf -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
 	msg := $(warning No libdw.h found or old libdw.h found or elfutils is older than 0.142, disables dwarf support. Please install new elfutils-devel/libdw-dev);
 	NO_DWARF := 1
 endif # Dwarf support

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

* Re: [PATCH] perf: fix Makefile check for libdward
  2010-05-17 19:04 [PATCH] perf: fix Makefile check for libdward Stephane Eranian
@ 2010-05-17 19:24 ` Masami Hiramatsu
  2010-05-17 19:36   ` Stephane Eranian
  0 siblings, 1 reply; 3+ messages in thread
From: Masami Hiramatsu @ 2010-05-17 19:24 UTC (permalink / raw)
  To: eranian
  Cc: linux-kernel, peterz, mingo, paulus, davem, fweisbec, acme,
	perfmon2-devel, eranian

Hi Stephane,

Stephane Eranian wrote:
> On Ubuntu 9.10, the elfutils/libdw package is 0.141, yet it is
> not sufficient to compile util/probe-finder.c as it uses a type,
> namely Dwarf_CFI, which is introduced sometime after version 0.141.
> 
> This patch updates the libdwarf test in the Makefile to check
> for the definition of Dwarf_CFI. If is is not there, the test
> fails and dwarf support is disabled.
> 
> It is not clear to me which version introduces Dwarf_CFI,
> thus I adjusted the version message to 0.142, could be more
> recent.

Yeah, I see. I had sent a fix patch which just ignores Dwarf_CFI
related code if the libdw version is younger than supporting it.
Could you try the patch here?

https://patchwork.kernel.org/patch/98216/

Thank you,

-- 
Masami Hiramatsu
e-mail: mhiramat@redhat.com

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

* Re: [PATCH] perf: fix Makefile check for libdward
  2010-05-17 19:24 ` Masami Hiramatsu
@ 2010-05-17 19:36   ` Stephane Eranian
  0 siblings, 0 replies; 3+ messages in thread
From: Stephane Eranian @ 2010-05-17 19:36 UTC (permalink / raw)
  To: Masami Hiramatsu
  Cc: linux-kernel, peterz, mingo, paulus, davem, fweisbec, acme,
	perfmon2-devel, eranian

On Mon, May 17, 2010 at 9:24 PM, Masami Hiramatsu <mhiramat@redhat.com> wrote:
> Hi Stephane,
>
> Stephane Eranian wrote:
>> On Ubuntu 9.10, the elfutils/libdw package is 0.141, yet it is
>> not sufficient to compile util/probe-finder.c as it uses a type,
>> namely Dwarf_CFI, which is introduced sometime after version 0.141.
>>
>> This patch updates the libdwarf test in the Makefile to check
>> for the definition of Dwarf_CFI. If is is not there, the test
>> fails and dwarf support is disabled.
>>
>> It is not clear to me which version introduces Dwarf_CFI,
>> thus I adjusted the version message to 0.142, could be more
>> recent.
>
> Yeah, I see. I had sent a fix patch which just ignores Dwarf_CFI
> related code if the libdw version is younger than supporting it.
> Could you try the patch here?
>
Does compile now on Ubuntu 9.10 (Karmic).
Thanks.

> https://patchwork.kernel.org/patch/98216/
>
> Thank you,
>
> --
> Masami Hiramatsu
> e-mail: mhiramat@redhat.com
>



-- 
Stephane Eranian  | EMEA Software Engineering
Google France | 38 avenue de l'Opéra | 75002 Paris
Tel : +33 (0) 1 42 68 53 00
This email may be confidential or privileged. If you received this
communication by mistake, please
don't forward it to anyone else, please erase all copies and
attachments, and please let me know that
it went to the wrong person. Thanks

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

end of thread, other threads:[~2010-05-17 19:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-17 19:04 [PATCH] perf: fix Makefile check for libdward Stephane Eranian
2010-05-17 19:24 ` Masami Hiramatsu
2010-05-17 19:36   ` Stephane Eranian

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