|
|
@@ -59,6 +59,18 @@ 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
|
|
|
+ LIBDW_CFLAGS := -I$(LIBDW_DIR)/include
|
|
|
+ LIBDW_LDFLAGS := -L$(LIBDW_DIR)/lib
|
|
|
+
|
|
|
+ FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind := $(LIBDW_CFLAGS)
|
|
|
+ FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind := $(LIBDW_LDFLAGS) -ldw
|
|
|
+ endif
|
|
|
+endif
|
|
|
+
|
|
|
# include ARCH specific config
|
|
|
-include $(src-perf)/arch/$(ARCH)/Makefile
|
|
|
|
|
|
@@ -267,13 +279,6 @@ 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
|
|
|
-
|
|
|
ifneq ($(feature-dwarf), 1)
|
|
|
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
|