* [PATCH] perf, probe-finder: Build fix on Debian
@ 2010-03-29 15:41 Borislav Petkov
2010-03-29 15:50 ` Masami Hiramatsu
0 siblings, 1 reply; 5+ messages in thread
From: Borislav Petkov @ 2010-03-29 15:41 UTC (permalink / raw)
To: Masami Hiramatsu; +Cc: Ingo Molnar, LKML
Building chokes with
In file included from /usr/include/gelf.h:53,
from /usr/include/elfutils/libdw.h:53,
from util/probe-finder.h:61,
from util/probe-finder.c:39:
/usr/include/libelf.h:98: error: expected specifier-qualifier-list before 'off64_t'
/usr/include/libelf.h:160: error: expected specifier-qualifier-list before 'off64_t'
/usr/include/libelf.h:201: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'elf_update'
/usr/include/libelf.h:207: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'elf_getbase'
/usr/include/libelf.h:305: error: expected declaration specifiers or '...' before 'off64_t'
/usr/include/libelf.h:317: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'elf_getaroff'
make: *** [util/probe-finder.o] Error 1
make: *** Waiting for unfinished jobs....
rm .perf.dev.null
which is due to the fact that </usr/include/libelf.h> isn't seeing
off64_t from <sys/types.h>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
---
This happens on current -git: v2.6.34-rc2-288-gb72c409
tools/perf/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 8a8f52d..19c34a5 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -508,7 +508,7 @@ ifneq ($(shell sh -c "(echo '\#include <dwarf.h>'; echo '\#include <libdw.h>'; e
msg := $(warning No libdw.h found or old libdw.h found, disables dwarf support. Please install elfutils-devel/elfutils-dev);
BASIC_CFLAGS += -DNO_DWARF_SUPPORT
else
- BASIC_CFLAGS += -I/usr/include/elfutils
+ BASIC_CFLAGS += -I/usr/include/elfutils -D_LARGEFILE64_SOURCE
EXTLIBS += -lelf -ldw
LIB_OBJS += util/probe-finder.o
endif
--
1.5.6.5
--
Regards/Gruss,
Boris.
--
Advanced Micro Devices, Inc.
Operating Systems Research Center
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] perf, probe-finder: Build fix on Debian
2010-03-29 15:41 [PATCH] perf, probe-finder: Build fix on Debian Borislav Petkov
@ 2010-03-29 15:50 ` Masami Hiramatsu
2010-03-29 16:47 ` [PATCH -v2] " Borislav Petkov
0 siblings, 1 reply; 5+ messages in thread
From: Masami Hiramatsu @ 2010-03-29 15:50 UTC (permalink / raw)
To: Borislav Petkov; +Cc: Ingo Molnar, LKML
Borislav Petkov wrote:
> Building chokes with
>
> In file included from /usr/include/gelf.h:53,
> from /usr/include/elfutils/libdw.h:53,
> from util/probe-finder.h:61,
> from util/probe-finder.c:39:
> /usr/include/libelf.h:98: error: expected specifier-qualifier-list before 'off64_t'
> /usr/include/libelf.h:160: error: expected specifier-qualifier-list before 'off64_t'
> /usr/include/libelf.h:201: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'elf_update'
> /usr/include/libelf.h:207: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'elf_getbase'
> /usr/include/libelf.h:305: error: expected declaration specifiers or '...' before 'off64_t'
> /usr/include/libelf.h:317: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'elf_getaroff'
> make: *** [util/probe-finder.o] Error 1
> make: *** Waiting for unfinished jobs....
> rm .perf.dev.null
>
> which is due to the fact that </usr/include/libelf.h> isn't seeing
> off64_t from <sys/types.h>
>
> Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Thank you for fixing it :)
However, all library checking routine in Makefile use
"-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64", so I think
it is better to add these flags to ALL_CFLAGS.
Thank you,
> ---
>
> This happens on current -git: v2.6.34-rc2-288-gb72c409
>
> tools/perf/Makefile | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> index 8a8f52d..19c34a5 100644
> --- a/tools/perf/Makefile
> +++ b/tools/perf/Makefile
> @@ -508,7 +508,7 @@ ifneq ($(shell sh -c "(echo '\#include <dwarf.h>'; echo '\#include <libdw.h>'; e
> msg := $(warning No libdw.h found or old libdw.h found, disables dwarf support. Please install elfutils-devel/elfutils-dev);
> BASIC_CFLAGS += -DNO_DWARF_SUPPORT
> else
> - BASIC_CFLAGS += -I/usr/include/elfutils
> + BASIC_CFLAGS += -I/usr/include/elfutils -D_LARGEFILE64_SOURCE
> EXTLIBS += -lelf -ldw
> LIB_OBJS += util/probe-finder.o
> endif
--
Masami Hiramatsu
e-mail: mhiramat@redhat.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH -v2] perf, probe-finder: Build fix on Debian
2010-03-29 15:50 ` Masami Hiramatsu
@ 2010-03-29 16:47 ` Borislav Petkov
2010-03-29 16:58 ` Masami Hiramatsu
2010-04-03 9:28 ` [tip:perf/urgent] " tip-bot for Borislav Petkov
0 siblings, 2 replies; 5+ messages in thread
From: Borislav Petkov @ 2010-03-29 16:47 UTC (permalink / raw)
To: Masami Hiramatsu; +Cc: Ingo Molnar, LKML
Building chokes with
In file included from /usr/include/gelf.h:53,
from /usr/include/elfutils/libdw.h:53,
from util/probe-finder.h:61,
from util/probe-finder.c:39:
/usr/include/libelf.h:98: error: expected specifier-qualifier-list before 'off64_t'
/usr/include/libelf.h:160: error: expected specifier-qualifier-list before 'off64_t'
/usr/include/libelf.h:201: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'elf_update'
/usr/include/libelf.h:207: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'elf_getbase'
/usr/include/libelf.h:305: error: expected declaration specifiers or '...' before 'off64_t'
/usr/include/libelf.h:317: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'elf_getaroff'
make: *** [util/probe-finder.o] Error 1
make: *** Waiting for unfinished jobs....
rm .perf.dev.null
which is due to the fact that </usr/include/libelf.h> isn't seeing
off64_t from <sys/types.h>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
---
tools/perf/Makefile | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 8a8f52d..bc0f670 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -200,7 +200,7 @@ endif
CFLAGS = -ggdb3 -Wall -Wextra -std=gnu99 -Werror $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)
EXTLIBS = -lpthread -lrt -lelf -lm
-ALL_CFLAGS = $(CFLAGS)
+ALL_CFLAGS = $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
ALL_LDFLAGS = $(LDFLAGS)
STRIP ?= strip
@@ -492,19 +492,19 @@ ifeq ($(uname_S),Darwin)
PTHREAD_LIBS =
endif
-ifeq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
-ifneq ($(shell sh -c "(echo '\#include <gnu/libc-version.h>'; echo 'int main(void) { const char * version = gnu_get_libc_version(); return (long)version; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
+ifeq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
+ifneq ($(shell sh -c "(echo '\#include <gnu/libc-version.h>'; echo 'int main(void) { const char * version = gnu_get_libc_version(); return (long)version; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static);
endif
- ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
+ ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
BASIC_CFLAGS += -DLIBELF_NO_MMAP
endif
else
msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el]);
endif
-ifneq ($(shell sh -c "(echo '\#include <dwarf.h>'; echo '\#include <libdw.h>'; echo 'int main(void) { Dwarf *dbg; dbg = dwarf_begin(0, DWARF_C_READ); return (long)dbg; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -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 '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)
msg := $(warning No libdw.h found or old libdw.h found, disables dwarf support. Please install elfutils-devel/elfutils-dev);
BASIC_CFLAGS += -DNO_DWARF_SUPPORT
else
--
1.5.6.5
--
Regards/Gruss,
Boris.
--
Advanced Micro Devices, Inc.
Operating Systems Research Center
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH -v2] perf, probe-finder: Build fix on Debian
2010-03-29 16:47 ` [PATCH -v2] " Borislav Petkov
@ 2010-03-29 16:58 ` Masami Hiramatsu
2010-04-03 9:28 ` [tip:perf/urgent] " tip-bot for Borislav Petkov
1 sibling, 0 replies; 5+ messages in thread
From: Masami Hiramatsu @ 2010-03-29 16:58 UTC (permalink / raw)
To: Borislav Petkov; +Cc: Ingo Molnar, LKML
Borislav Petkov wrote:
> Building chokes with
>
> In file included from /usr/include/gelf.h:53,
> from /usr/include/elfutils/libdw.h:53,
> from util/probe-finder.h:61,
> from util/probe-finder.c:39:
> /usr/include/libelf.h:98: error: expected specifier-qualifier-list before 'off64_t'
> /usr/include/libelf.h:160: error: expected specifier-qualifier-list before 'off64_t'
> /usr/include/libelf.h:201: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'elf_update'
> /usr/include/libelf.h:207: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'elf_getbase'
> /usr/include/libelf.h:305: error: expected declaration specifiers or '...' before 'off64_t'
> /usr/include/libelf.h:317: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'elf_getaroff'
> make: *** [util/probe-finder.o] Error 1
> make: *** Waiting for unfinished jobs....
> rm .perf.dev.null
>
> which is due to the fact that </usr/include/libelf.h> isn't seeing
> off64_t from <sys/types.h>
>
> Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Thank you a lot!
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
> ---
> tools/perf/Makefile | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/tools/perf/Makefile b/tools/perf/Makefile
> index 8a8f52d..bc0f670 100644
> --- a/tools/perf/Makefile
> +++ b/tools/perf/Makefile
> @@ -200,7 +200,7 @@ endif
>
> CFLAGS = -ggdb3 -Wall -Wextra -std=gnu99 -Werror $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)
> EXTLIBS = -lpthread -lrt -lelf -lm
> -ALL_CFLAGS = $(CFLAGS)
> +ALL_CFLAGS = $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
> ALL_LDFLAGS = $(LDFLAGS)
> STRIP ?= strip
>
> @@ -492,19 +492,19 @@ ifeq ($(uname_S),Darwin)
> PTHREAD_LIBS =
> endif
>
> -ifeq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
> -ifneq ($(shell sh -c "(echo '\#include <gnu/libc-version.h>'; echo 'int main(void) { const char * version = gnu_get_libc_version(); return (long)version; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
> +ifeq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
> +ifneq ($(shell sh -c "(echo '\#include <gnu/libc-version.h>'; echo 'int main(void) { const char * version = gnu_get_libc_version(); return (long)version; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
> msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static);
> endif
>
> - ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
> + ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
> BASIC_CFLAGS += -DLIBELF_NO_MMAP
> endif
> else
> msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el]);
> endif
>
> -ifneq ($(shell sh -c "(echo '\#include <dwarf.h>'; echo '\#include <libdw.h>'; echo 'int main(void) { Dwarf *dbg; dbg = dwarf_begin(0, DWARF_C_READ); return (long)dbg; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -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 '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)
> msg := $(warning No libdw.h found or old libdw.h found, disables dwarf support. Please install elfutils-devel/elfutils-dev);
> BASIC_CFLAGS += -DNO_DWARF_SUPPORT
> else
--
Masami Hiramatsu
e-mail: mhiramat@redhat.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip:perf/urgent] perf, probe-finder: Build fix on Debian
2010-03-29 16:47 ` [PATCH -v2] " Borislav Petkov
2010-03-29 16:58 ` Masami Hiramatsu
@ 2010-04-03 9:28 ` tip-bot for Borislav Petkov
1 sibling, 0 replies; 5+ messages in thread
From: tip-bot for Borislav Petkov @ 2010-04-03 9:28 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, bp, tglx, mhiramat, borislav.petkov,
mingo
Commit-ID: b0f86f5a169c758a82b0e23eef6795356f6d5a25
Gitweb: http://git.kernel.org/tip/b0f86f5a169c758a82b0e23eef6795356f6d5a25
Author: Borislav Petkov <bp@amd64.org>
AuthorDate: Mon, 29 Mar 2010 18:47:55 +0200
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 2 Apr 2010 22:46:26 +0200
perf, probe-finder: Build fix on Debian
Building chokes with:
In file included from /usr/include/gelf.h:53,
from /usr/include/elfutils/libdw.h:53,
from util/probe-finder.h:61,
from util/probe-finder.c:39:
/usr/include/libelf.h:98: error: expected specifier-qualifier-list before 'off64_t'
[...]
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
LKML-Reference: <20100329164755.GA16034@aftab>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
tools/perf/Makefile | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 8a8f52d..bc0f670 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -200,7 +200,7 @@ endif
CFLAGS = -ggdb3 -Wall -Wextra -std=gnu99 -Werror $(CFLAGS_OPTIMIZE) -D_FORTIFY_SOURCE=2 $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)
EXTLIBS = -lpthread -lrt -lelf -lm
-ALL_CFLAGS = $(CFLAGS)
+ALL_CFLAGS = $(CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
ALL_LDFLAGS = $(LDFLAGS)
STRIP ?= strip
@@ -492,19 +492,19 @@ ifeq ($(uname_S),Darwin)
PTHREAD_LIBS =
endif
-ifeq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
-ifneq ($(shell sh -c "(echo '\#include <gnu/libc-version.h>'; echo 'int main(void) { const char * version = gnu_get_libc_version(); return (long)version; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
+ifeq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
+ifneq ($(shell sh -c "(echo '\#include <gnu/libc-version.h>'; echo 'int main(void) { const char * version = gnu_get_libc_version(); return (long)version; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static);
endif
- ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
+ ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -o $(BITBUCKET) $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
BASIC_CFLAGS += -DLIBELF_NO_MMAP
endif
else
msg := $(error No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel and glibc-dev[el]);
endif
-ifneq ($(shell sh -c "(echo '\#include <dwarf.h>'; echo '\#include <libdw.h>'; echo 'int main(void) { Dwarf *dbg; dbg = dwarf_begin(0, DWARF_C_READ); return (long)dbg; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -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 '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)
msg := $(warning No libdw.h found or old libdw.h found, disables dwarf support. Please install elfutils-devel/elfutils-dev);
BASIC_CFLAGS += -DNO_DWARF_SUPPORT
else
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-04-03 9:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-29 15:41 [PATCH] perf, probe-finder: Build fix on Debian Borislav Petkov
2010-03-29 15:50 ` Masami Hiramatsu
2010-03-29 16:47 ` [PATCH -v2] " Borislav Petkov
2010-03-29 16:58 ` Masami Hiramatsu
2010-04-03 9:28 ` [tip:perf/urgent] " tip-bot for Borislav Petkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox