Commit 5febff00 authored by David Ahern's avatar David Ahern Committed by Arnaldo Carvalho de Melo

tools/perf/build: Fix detection of non-core features

feature_check needs to be invoked through call, and LDFLAGS may not be
set so quotes are needed.

Thanks to Jiri for spotting the quotes around LDFLAGS; that one was
driving me nuts with the upcoming timerfd feature detection.
Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
Reviewed-by: default avatarJiri Olsa <jolsa@redhat.com>
Tested-by: default avatarJiri Olsa <jolsa@redhat.com>
Acked-by: default avatarIngo Molnar <mingo@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1383064996-20933-1-git-send-email-dsahern@gmail.com
[ Fixed conflict with 8a0c4c28 ("perf tools: Fix libunwind build and feature detection for 32-bit build") ]
Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 87419c9a
...@@ -98,7 +98,7 @@ endif ...@@ -98,7 +98,7 @@ endif
feature_check = $(eval $(feature_check_code)) feature_check = $(eval $(feature_check_code))
define feature_check_code define feature_check_code
feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS)" LDFLAGS=$(LDFLAGS) LIBUNWIND_LIBS="$(LIBUNWIND_LIBS)" -C config/feature-checks test-$1 >/dev/null 2>/dev/null && echo 1 || echo 0) feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) CFLAGS="$(EXTRA_CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBUNWIND_LIBS="$(LIBUNWIND_LIBS)" -C config/feature-checks test-$1 >/dev/null 2>/dev/null && echo 1 || echo 0)
endef endef
feature_set = $(eval $(feature_set_code)) feature_set = $(eval $(feature_set_code))
...@@ -235,7 +235,7 @@ CFLAGS += -I$(LIB_INCLUDE) ...@@ -235,7 +235,7 @@ CFLAGS += -I$(LIB_INCLUDE)
CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE CFLAGS += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
ifndef NO_BIONIC ifndef NO_BIONIC
$(feature_check,bionic) $(call feature_check,bionic)
ifeq ($(feature-bionic), 1) ifeq ($(feature-bionic), 1)
BIONIC := 1 BIONIC := 1
EXTLIBS := $(filter-out -lrt,$(EXTLIBS)) EXTLIBS := $(filter-out -lrt,$(EXTLIBS))
...@@ -479,15 +479,15 @@ else ...@@ -479,15 +479,15 @@ else
CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT
else else
ifneq ($(feature-libbfd), 1) ifneq ($(feature-libbfd), 1)
$(feature_check,liberty) $(call feature_check,liberty)
ifeq ($(feature-liberty), 1) ifeq ($(feature-liberty), 1)
EXTLIBS += -lbfd -liberty EXTLIBS += -lbfd -liberty
else else
$(feature_check,liberty-z) $(call feature_check,liberty-z)
ifeq ($(feature-liberty-z), 1) ifeq ($(feature-liberty-z), 1)
EXTLIBS += -lbfd -liberty -lz EXTLIBS += -lbfd -liberty -lz
else else
$(feature_check,cplus-demangle) $(call feature_check,cplus-demangle)
ifeq ($(feature-cplus-demangle), 1) ifeq ($(feature-cplus-demangle), 1)
EXTLIBS += -liberty EXTLIBS += -liberty
CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT CFLAGS += -DHAVE_CPLUS_DEMANGLE_SUPPORT
......
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