Commit 5a155bb7 authored by Wang Nan's avatar Wang Nan Committed by Arnaldo Carvalho de Melo
Browse files

perf build: Remove all condition feature check {C,LD}FLAGS



'make feature-dump' should give a stable result, so even 'NO_SOMETHING=1'
is given (for babeltrace, if LIBBABELTRACE=1 is not given), we should
try to detect those feature and {C,LD}FLAGS. Build or not should be
controled independent.

Signed-off-by: default avatarWang Nan <wangnan0@huawei.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>
Link: http://lkml.kernel.org/r/1454047050-204993-1-git-send-email-wangnan0@huawei.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 76c4aaec
Loading
Loading
Loading
Loading
+47 −54
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ endif

ifeq ($(LIBUNWIND_LIBS),)
  NO_LIBUNWIND := 1
else
endif
#
# For linking with debug library, run like:
#
@@ -78,13 +78,11 @@ else
FEATURE_CHECK_LDFLAGS-libunwind = $(LIBUNWIND_LDFLAGS)
FEATURE_CHECK_CFLAGS-libunwind-debug-frame = $(LIBUNWIND_CFLAGS)
FEATURE_CHECK_LDFLAGS-libunwind-debug-frame = $(LIBUNWIND_LDFLAGS)
endif

ifeq ($(NO_PERF_REGS),0)
  CFLAGS += -DHAVE_PERF_REGS_SUPPORT
endif

ifndef NO_LIBELF
# for linking with debug library, run like:
# make DEBUG=1 LIBDW_DIR=/opt/libdw/
ifdef LIBDW_DIR
@@ -93,9 +91,7 @@ ifndef NO_LIBELF
endif
FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind := $(LIBDW_CFLAGS)
FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind := $(LIBDW_LDFLAGS) -ldw
endif

ifdef LIBBABELTRACE
# for linking with debug library, run like:
# make DEBUG=1 LIBBABELTRACE_DIR=/opt/libbabeltrace/
ifdef LIBBABELTRACE_DIR
@@ -104,7 +100,6 @@ ifdef LIBBABELTRACE
endif
FEATURE_CHECK_CFLAGS-libbabeltrace := $(LIBBABELTRACE_CFLAGS)
FEATURE_CHECK_LDFLAGS-libbabeltrace := $(LIBBABELTRACE_LDFLAGS) -lbabeltrace-ctf
endif

FEATURE_CHECK_CFLAGS-bpf = -I. -I$(srctree)/tools/include -I$(srctree)/arch/$(ARCH)/include/uapi -I$(srctree)/include/uapi
# include ARCH specific config
@@ -145,7 +140,6 @@ ifdef PARSER_DEBUG
  $(call detected_var,PARSER_DEBUG_FLEX)
endif

ifndef NO_LIBPYTHON
# Try different combinations to accommodate systems that only have
# python[2][-config] in weird combinations but always preferring
# python2 and python2-config as per pep-0394. If we catch a
@@ -166,7 +160,6 @@ ifndef NO_LIBPYTHON
FEATURE_CHECK_LDFLAGS-libpython := $(PYTHON_EMBED_LDOPTS)
FEATURE_CHECK_CFLAGS-libpython-version := $(PYTHON_EMBED_CCOPTS)
FEATURE_CHECK_LDFLAGS-libpython-version := $(PYTHON_EMBED_LDOPTS)
endif

CFLAGS += -fno-omit-frame-pointer
CFLAGS += -ggdb3