diff options
author | Ingo Molnar <mingo@kernel.org> | 2013-09-30 08:11:16 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-10-09 02:48:34 -0400 |
commit | 50eed7a71ebaf6676be8c497192b978f07581326 (patch) | |
tree | c23ab4505665e21940aac02a747a3c4c6dce1290 | |
parent | 78e9d6550807aedfc1f81c199bd4681c09d80ac5 (diff) |
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.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | tools/perf/config/Makefile | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 09e2ecc4b056..a2e0e1b200c3 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile | |||
@@ -164,38 +164,38 @@ ifdef NO_LIBELF | |||
164 | NO_DEMANGLE := 1 | 164 | NO_DEMANGLE := 1 |
165 | NO_LIBUNWIND := 1 | 165 | NO_LIBUNWIND := 1 |
166 | else | 166 | else |
167 | FLAGS_LIBELF=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) | 167 | FLAGS_LIBELF=$(CFLAGS) $(LDFLAGS) $(EXTLIBS) |
168 | ifneq ($(call try-cc,$(SOURCE_LIBELF),$(FLAGS_LIBELF),libelf),y) | 168 | ifneq ($(call try-cc,$(SOURCE_LIBELF),$(FLAGS_LIBELF),libelf),y) |
169 | FLAGS_GLIBC=$(CFLAGS) $(LDFLAGS) | 169 | FLAGS_GLIBC=$(CFLAGS) $(LDFLAGS) |
170 | ifeq ($(call try-cc,$(SOURCE_GLIBC),$(FLAGS_GLIBC),glibc),y) | 170 | ifeq ($(call try-cc,$(SOURCE_GLIBC),$(FLAGS_GLIBC),glibc),y) |
171 | LIBC_SUPPORT := 1 | 171 | LIBC_SUPPORT := 1 |
172 | endif | 172 | endif |
173 | ifeq ($(BIONIC),1) | 173 | ifeq ($(BIONIC),1) |
174 | LIBC_SUPPORT := 1 | 174 | LIBC_SUPPORT := 1 |
175 | endif | 175 | endif |
176 | ifeq ($(LIBC_SUPPORT),1) | 176 | ifeq ($(LIBC_SUPPORT),1) |
177 | msg := $(warning No libelf found, disables 'probe' tool, please install elfutils-libelf-devel/libelf-dev); | 177 | msg := $(warning No libelf found, disables 'probe' tool, please install elfutils-libelf-devel/libelf-dev); |
178 | 178 | ||
179 | NO_LIBELF := 1 | 179 | NO_LIBELF := 1 |
180 | NO_DWARF := 1 | 180 | NO_DWARF := 1 |
181 | NO_DEMANGLE := 1 | 181 | NO_DEMANGLE := 1 |
182 | else | ||
183 | msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static); | ||
184 | endif | ||
182 | else | 185 | else |
183 | msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static); | 186 | # for linking with debug library, run like: |
184 | endif | 187 | # make DEBUG=1 LIBDW_DIR=/opt/libdw/ |
185 | else | 188 | ifdef LIBDW_DIR |
186 | # for linking with debug library, run like: | 189 | LIBDW_CFLAGS := -I$(LIBDW_DIR)/include |
187 | # make DEBUG=1 LIBDW_DIR=/opt/libdw/ | 190 | LIBDW_LDFLAGS := -L$(LIBDW_DIR)/lib |
188 | ifdef LIBDW_DIR | 191 | endif |
189 | LIBDW_CFLAGS := -I$(LIBDW_DIR)/include | ||
190 | LIBDW_LDFLAGS := -L$(LIBDW_DIR)/lib | ||
191 | endif | ||
192 | 192 | ||
193 | FLAGS_DWARF=$(CFLAGS) $(LIBDW_CFLAGS) -ldw -lz -lelf $(LIBDW_LDFLAGS) $(LDFLAGS) $(EXTLIBS) | 193 | FLAGS_DWARF=$(CFLAGS) $(LIBDW_CFLAGS) -ldw -lz -lelf $(LIBDW_LDFLAGS) $(LDFLAGS) $(EXTLIBS) |
194 | ifneq ($(call try-cc,$(SOURCE_DWARF),$(FLAGS_DWARF),libdw),y) | 194 | ifneq ($(call try-cc,$(SOURCE_DWARF),$(FLAGS_DWARF),libdw),y) |
195 | 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); | 195 | 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); |
196 | NO_DWARF := 1 | 196 | NO_DWARF := 1 |
197 | endif # Dwarf support | 197 | endif # Dwarf support |
198 | endif # SOURCE_LIBELF | 198 | endif # SOURCE_LIBELF |
199 | endif # NO_LIBELF | 199 | endif # NO_LIBELF |
200 | 200 | ||
201 | ifndef NO_LIBELF | 201 | ifndef NO_LIBELF |