Commit 50eed7a7 authored by Ingo Molnar's avatar Ingo Molnar

tools/perf/build: Clean up the libelf logic in config/Makefile

Nest the rules properly. No change in functionality.

Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/n/tip-dDgivr9xtjrof2vmoyOfwxkj@git.kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 78e9d655
...@@ -164,8 +164,8 @@ ifdef NO_LIBELF ...@@ -164,8 +164,8 @@ ifdef NO_LIBELF
NO_DEMANGLE := 1 NO_DEMANGLE := 1
NO_LIBUNWIND := 1 NO_LIBUNWIND := 1
else else
FLAGS_LIBELF=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) FLAGS_LIBELF=$(CFLAGS) $(LDFLAGS) $(EXTLIBS)
ifneq ($(call try-cc,$(SOURCE_LIBELF),$(FLAGS_LIBELF),libelf),y) ifneq ($(call try-cc,$(SOURCE_LIBELF),$(FLAGS_LIBELF),libelf),y)
FLAGS_GLIBC=$(CFLAGS) $(LDFLAGS) FLAGS_GLIBC=$(CFLAGS) $(LDFLAGS)
ifeq ($(call try-cc,$(SOURCE_GLIBC),$(FLAGS_GLIBC),glibc),y) ifeq ($(call try-cc,$(SOURCE_GLIBC),$(FLAGS_GLIBC),glibc),y)
LIBC_SUPPORT := 1 LIBC_SUPPORT := 1
...@@ -182,7 +182,7 @@ ifneq ($(call try-cc,$(SOURCE_LIBELF),$(FLAGS_LIBELF),libelf),y) ...@@ -182,7 +182,7 @@ ifneq ($(call try-cc,$(SOURCE_LIBELF),$(FLAGS_LIBELF),libelf),y)
else else
msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static); msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static);
endif endif
else else
# for linking with debug library, run like: # for linking with debug library, run like:
# make DEBUG=1 LIBDW_DIR=/opt/libdw/ # make DEBUG=1 LIBDW_DIR=/opt/libdw/
ifdef LIBDW_DIR ifdef LIBDW_DIR
...@@ -195,7 +195,7 @@ else ...@@ -195,7 +195,7 @@ else
msg := $(warning No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev); msg := $(warning No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev);
NO_DWARF := 1 NO_DWARF := 1
endif # Dwarf support endif # Dwarf support
endif # SOURCE_LIBELF endif # SOURCE_LIBELF
endif # NO_LIBELF endif # NO_LIBELF
ifndef NO_LIBELF ifndef NO_LIBELF
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment