From: Ingo Molnar <mingo@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Namhyung Kim <namhyung@kernel.org>,
David Ahern <dsahern@gmail.com>, Jiri Olsa <jolsa@redhat.com>
Subject: [PATCH 10/52] tools/perf/build: Clean up the libelf logic in config/Makefile
Date: Tue, 8 Oct 2013 12:10:40 +0200 [thread overview]
Message-ID: <1381227082-22039-11-git-send-email-mingo@kernel.org> (raw)
In-Reply-To: <1381227082-22039-1-git-send-email-mingo@kernel.org>
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>
---
tools/perf/config/Makefile | 58 +++++++++++++++++++++++++++++-----------------------------
1 file changed, 29 insertions(+), 29 deletions(-)
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 09e2ecc..a2e0e1b 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -164,38 +164,38 @@ ifdef NO_LIBELF
NO_DEMANGLE := 1
NO_LIBUNWIND := 1
else
-FLAGS_LIBELF=$(CFLAGS) $(LDFLAGS) $(EXTLIBS)
-ifneq ($(call try-cc,$(SOURCE_LIBELF),$(FLAGS_LIBELF),libelf),y)
- FLAGS_GLIBC=$(CFLAGS) $(LDFLAGS)
- ifeq ($(call try-cc,$(SOURCE_GLIBC),$(FLAGS_GLIBC),glibc),y)
- LIBC_SUPPORT := 1
- endif
- ifeq ($(BIONIC),1)
- LIBC_SUPPORT := 1
- endif
- ifeq ($(LIBC_SUPPORT),1)
- msg := $(warning No libelf found, disables 'probe' tool, please install elfutils-libelf-devel/libelf-dev);
+ FLAGS_LIBELF=$(CFLAGS) $(LDFLAGS) $(EXTLIBS)
+ ifneq ($(call try-cc,$(SOURCE_LIBELF),$(FLAGS_LIBELF),libelf),y)
+ FLAGS_GLIBC=$(CFLAGS) $(LDFLAGS)
+ ifeq ($(call try-cc,$(SOURCE_GLIBC),$(FLAGS_GLIBC),glibc),y)
+ LIBC_SUPPORT := 1
+ endif
+ ifeq ($(BIONIC),1)
+ LIBC_SUPPORT := 1
+ endif
+ ifeq ($(LIBC_SUPPORT),1)
+ msg := $(warning No libelf found, disables 'probe' tool, please install elfutils-libelf-devel/libelf-dev);
- NO_LIBELF := 1
- NO_DWARF := 1
- NO_DEMANGLE := 1
+ NO_LIBELF := 1
+ NO_DWARF := 1
+ NO_DEMANGLE := 1
+ else
+ msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static);
+ endif
else
- msg := $(error No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static);
- endif
-else
- # for linking with debug library, run like:
- # make DEBUG=1 LIBDW_DIR=/opt/libdw/
- ifdef LIBDW_DIR
- LIBDW_CFLAGS := -I$(LIBDW_DIR)/include
- LIBDW_LDFLAGS := -L$(LIBDW_DIR)/lib
- endif
+ # for linking with debug library, run like:
+ # make DEBUG=1 LIBDW_DIR=/opt/libdw/
+ ifdef LIBDW_DIR
+ LIBDW_CFLAGS := -I$(LIBDW_DIR)/include
+ LIBDW_LDFLAGS := -L$(LIBDW_DIR)/lib
+ endif
- FLAGS_DWARF=$(CFLAGS) $(LIBDW_CFLAGS) -ldw -lz -lelf $(LIBDW_LDFLAGS) $(LDFLAGS) $(EXTLIBS)
- ifneq ($(call try-cc,$(SOURCE_DWARF),$(FLAGS_DWARF),libdw),y)
- 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
- endif # Dwarf support
-endif # SOURCE_LIBELF
+ FLAGS_DWARF=$(CFLAGS) $(LIBDW_CFLAGS) -ldw -lz -lelf $(LIBDW_LDFLAGS) $(LDFLAGS) $(EXTLIBS)
+ ifneq ($(call try-cc,$(SOURCE_DWARF),$(FLAGS_DWARF),libdw),y)
+ 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
+ endif # Dwarf support
+ endif # SOURCE_LIBELF
endif # NO_LIBELF
ifndef NO_LIBELF
--
1.8.3.1
next prev parent reply other threads:[~2013-10-08 10:25 UTC|newest]
Thread overview: 87+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-08 10:10 [PATCH -v2 00/52] tools/perf: Speed up the build system Ingo Molnar
2013-10-08 10:10 ` [PATCH 01/52] tools/perf: Standardize feature support define names to: HAVE_{FEATURE}_SUPPORT Ingo Molnar
2013-10-08 10:10 ` [PATCH 02/52] tools/perf/build: Add feature check core code Ingo Molnar
2013-10-10 5:42 ` Namhyung Kim
2013-10-10 7:21 ` Ingo Molnar
2013-10-10 8:22 ` Namhyung Kim
2013-10-08 10:10 ` [PATCH 03/52] tools/perf/build: Add 'autodep' functionality, generate feature test dependencies automatically Ingo Molnar
2013-10-10 5:44 ` Namhyung Kim
2013-10-10 7:12 ` Ingo Molnar
2013-10-10 7:12 ` [PATCH] tools/perf/build: Simplify the autodep inclusion rule Ingo Molnar
2013-10-08 10:10 ` [PATCH 04/52] tools/perf/build: Split out feature check: 'libnuma' Ingo Molnar
2013-10-08 10:10 ` [PATCH 05/52] tools/perf/build: Split out feature check: 'stackprotector-all' Ingo Molnar
2013-10-08 10:10 ` [PATCH 06/52] tools/perf/build: Split out feature check: 'stackprotector' Ingo Molnar
2013-10-10 5:50 ` Namhyung Kim
2013-10-10 7:08 ` Ingo Molnar
2013-10-10 7:09 ` [PATCH] tools/perf/build: Improve the 'stackprotector' feature test Ingo Molnar
2013-10-08 10:10 ` [PATCH 07/52] tools/perf/build: Split out feature check: 'volatile-register-var' Ingo Molnar
2013-10-10 5:55 ` Namhyung Kim
2013-10-10 7:03 ` Ingo Molnar
2013-10-10 7:03 ` [PATCH] tools/perf/build: Remove the volatile-register-var feature check Ingo Molnar
2013-10-08 10:10 ` [PATCH 08/52] tools/perf/build: Split out feature check: 'fortify-source' Ingo Molnar
2013-10-08 10:10 ` [PATCH 09/52] tools/perf/build: Split out feature check: 'bionic' Ingo Molnar
2013-10-08 10:10 ` Ingo Molnar [this message]
2013-10-08 10:10 ` [PATCH 11/52] tools/perf/build: Split out feature check: 'libelf' Ingo Molnar
2013-10-08 10:10 ` [PATCH 12/52] tools/perf/build: Split out feature check: 'glibc' Ingo Molnar
2013-10-08 10:10 ` [PATCH 13/52] tools/perf/build: Split out feature check: 'dwarf' Ingo Molnar
2013-10-08 10:10 ` [PATCH 14/52] tools/perf/build: Clean up the mmap logic in config/Makefile Ingo Molnar
2013-10-08 10:10 ` [PATCH 15/52] tools/perf/build: Split out feature check: 'libelf-mmap' Ingo Molnar
2013-10-10 6:00 ` Namhyung Kim
2013-10-10 6:56 ` Ingo Molnar
2013-10-10 6:57 ` [PATCH] tools/perf/build: Simplify the libelf logic Ingo Molnar
2013-10-08 10:10 ` [PATCH 16/52] tools/perf/build: Split out feature check: 'libelf-getphdrnum' Ingo Molnar
2013-10-08 10:10 ` [PATCH 17/52] tools/perf/build: Clean up the libunwind logic in config/Makefile Ingo Molnar
2013-10-08 10:10 ` [PATCH 18/52] tools/perf/build: Split out feature check: 'libunwind' Ingo Molnar
2013-10-08 15:21 ` David Ahern
2013-10-09 6:45 ` Ingo Molnar
2013-10-08 10:10 ` [PATCH 19/52] tools/perf/build: Split out feature check: 'libaudit' Ingo Molnar
2013-10-08 10:10 ` [PATCH 20/52] tools/perf/build: Split out feature check: 'libslang' Ingo Molnar
2013-10-08 10:10 ` [PATCH 21/52] tools/perf/build: Split out feature check: 'gtk2' Ingo Molnar
2013-10-08 10:10 ` [PATCH 22/52] tools/perf/build: Split out feature check: 'gtk2-infobar' Ingo Molnar
2013-10-08 10:10 ` [PATCH 23/52] tools/perf/build: Split out feature check: 'libperl' Ingo Molnar
2013-10-08 10:10 ` [PATCH 24/52] tools/perf/build: Split out feature check: 'libpython' Ingo Molnar
2013-10-08 10:10 ` [PATCH 25/52] tools/perf/build: Split out feature check: 'libpython-version' Ingo Molnar
2013-10-08 10:10 ` [PATCH 26/52] tools/perf/build: Split out feature check: 'libbfd' Ingo Molnar
2013-10-10 6:07 ` Namhyung Kim
2013-10-10 6:50 ` [PATCH] tools/perf/build: Fix DPACKAGE definitions for the libbfd et al testcases Ingo Molnar
2013-10-10 6:50 ` [PATCH 26/52] tools/perf/build: Split out feature check: 'libbfd' Ingo Molnar
2013-10-08 10:10 ` [PATCH 27/52] tools/perf/build: Split out feature check: 'strlcpy' Ingo Molnar
2013-10-08 10:10 ` [PATCH 28/52] tools/perf/build: Split out feature check: 'on-exit' Ingo Molnar
2013-10-10 6:12 ` Namhyung Kim
2013-10-10 6:43 ` Ingo Molnar
2013-10-08 10:10 ` [PATCH 29/52] tools/perf/build: Split out feature check: 'backtrace' Ingo Molnar
2013-10-08 10:11 ` [PATCH 30/52] tools/perf: Clean up util/include/linux/compiler.h Ingo Molnar
2013-10-08 10:11 ` [PATCH 31/52] tools/perf: Turn strlcpy() into a __weak function Ingo Molnar
2013-10-08 10:11 ` [PATCH 32/52] tools/perf/build: Speed up auto-detection of features by adding a 'test-all' target Ingo Molnar
2013-10-08 15:51 ` Jiri Olsa
2013-10-09 6:47 ` Ingo Molnar
2013-10-10 6:19 ` Namhyung Kim
2013-10-10 7:24 ` Ingo Molnar
2013-10-10 8:28 ` Namhyung Kim
2013-10-08 10:11 ` [PATCH 33/52] tools/perf/build: Speed up git-version test on re-make Ingo Molnar
2013-10-08 10:11 ` [PATCH 34/52] tools/perf/build: Speed up the final link Ingo Molnar
2013-10-08 10:11 ` [PATCH 35/52] tools/perf: Fix double/triple-build of the feature detection logic during 'make install' et al Ingo Molnar
2013-10-08 10:11 ` [PATCH 36/52] tools/perf/build: Invoke feature-checks 'clean' target from the main Makefile Ingo Molnar
2013-10-08 10:11 ` [PATCH 37/52] tools/perf/build: Speed up auto-detection Ingo Molnar
2013-10-08 10:11 ` [PATCH 38/52] tools/perf/build: Improve printout-of auto-detected features Ingo Molnar
2013-10-08 10:11 ` [PATCH 39/52] tools/perf/build: Automatically build in parallel, based on number of CPUs in the system Ingo Molnar
2013-10-08 10:11 ` [PATCH 40/52] tools/perf/build: Flip Makefile.parallel and Makefile.perf Ingo Molnar
2013-10-08 10:11 ` [PATCH 41/52] tools/perf/build: Standardize the various messages output by parallel make Ingo Molnar
2013-10-08 10:11 ` [PATCH 42/52] tools/perf/build: Split out feature checks: 'liberty', 'liberty-z', 'cplus-demangle' Ingo Molnar
2013-10-08 10:11 ` [PATCH 43/52] tools/perf/build: Remove unused config/feature-tests.mak Ingo Molnar
2013-10-08 10:11 ` [PATCH 44/52] tools/perf/build: Clean up various testcases Ingo Molnar
2013-10-10 6:20 ` Namhyung Kim
2013-10-10 6:41 ` Ingo Molnar
2013-10-08 10:11 ` [PATCH 45/52] tools/perf/build: Collapse the test-all.c testcase Ingo Molnar
2013-10-08 10:11 ` [PATCH 46/52] tools/perf/build: Pass through all targets to Makefile.perf Ingo Molnar
2013-10-08 10:11 ` [PATCH 47/52] tools/perf/build: Make sure autodep feature binaries honor the O= setting Ingo Molnar
2013-10-08 10:11 ` [PATCH 48/52] tools/perf/build: Exclude MAKEFLAGS from nested invocation Ingo Molnar
2013-10-10 6:24 ` Namhyung Kim
2013-10-10 6:36 ` Ingo Molnar
2013-10-08 10:11 ` [PATCH 49/52] tools/perf/build: Fix non-canonical directory names in O= Ingo Molnar
2013-10-08 10:11 ` [PATCH 50/52] tools/perf/build: Fix O=/some/dir perf.o type of targets Ingo Molnar
2013-10-10 6:35 ` Namhyung Kim
2013-10-10 6:39 ` Ingo Molnar
2013-10-10 8:43 ` Namhyung Kim
2013-10-08 10:11 ` [PATCH 51/52] tools/perf/build: Harmonize the style of the feature testcases Ingo Molnar
2013-10-08 10:11 ` [PATCH 52/52] tools/perf/build: Pass through LDFLAGS to feature tests Ingo Molnar
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=1381227082-22039-11-git-send-email-mingo@kernel.org \
--to=mingo@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).