|
@@ -170,13 +170,20 @@ PYTHON2_CONFIG := \
|
|
|
override PYTHON_CONFIG := \
|
|
|
$(call get-executable-or-default,PYTHON_CONFIG,$(PYTHON2_CONFIG))
|
|
|
|
|
|
-PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG))
|
|
|
+grep-libs = $(filter -l%,$(1))
|
|
|
+strip-libs = $(filter-out -l%,$(1))
|
|
|
|
|
|
-PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
|
|
|
-PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
|
|
|
+PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG))
|
|
|
|
|
|
-ifeq ($(CC), clang)
|
|
|
- PYTHON_EMBED_CCOPTS := $(filter-out -specs=%,$(PYTHON_EMBED_CCOPTS))
|
|
|
+ifdef PYTHON_CONFIG
|
|
|
+ PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
|
|
|
+ PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
|
|
|
+ PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) -lutil
|
|
|
+ PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
|
|
|
+ ifeq ($(CC), clang)
|
|
|
+ PYTHON_EMBED_CCOPTS := $(filter-out -specs=%,$(PYTHON_EMBED_CCOPTS))
|
|
|
+ endif
|
|
|
+ FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
|
|
|
endif
|
|
|
|
|
|
FEATURE_CHECK_CFLAGS-libpython := $(PYTHON_EMBED_CCOPTS)
|
|
@@ -267,6 +274,7 @@ ifdef NO_LIBELF
|
|
|
NO_LIBUNWIND := 1
|
|
|
NO_LIBDW_DWARF_UNWIND := 1
|
|
|
NO_LIBBPF := 1
|
|
|
+ NO_JVMTI := 1
|
|
|
else
|
|
|
ifeq ($(feature-libelf), 0)
|
|
|
ifeq ($(feature-glibc), 1)
|
|
@@ -276,7 +284,7 @@ else
|
|
|
LIBC_SUPPORT := 1
|
|
|
endif
|
|
|
ifeq ($(LIBC_SUPPORT),1)
|
|
|
- msg := $(warning No libelf found, disables 'probe' tool and BPF support in 'perf record', please install libelf-dev, libelf-devel or elfutils-libelf-devel);
|
|
|
+ msg := $(warning No libelf found. Disables 'probe' tool, jvmti and BPF support in 'perf record'. Please install libelf-dev, libelf-devel or elfutils-libelf-devel);
|
|
|
|
|
|
NO_LIBELF := 1
|
|
|
NO_DWARF := 1
|
|
@@ -284,6 +292,7 @@ else
|
|
|
NO_LIBUNWIND := 1
|
|
|
NO_LIBDW_DWARF_UNWIND := 1
|
|
|
NO_LIBBPF := 1
|
|
|
+ NO_JVMTI := 1
|
|
|
else
|
|
|
ifneq ($(filter s% -static%,$(LDFLAGS),),)
|
|
|
msg := $(error No static glibc found, please install glibc-static);
|
|
@@ -554,8 +563,6 @@ ifndef NO_GTK2
|
|
|
endif
|
|
|
endif
|
|
|
|
|
|
-grep-libs = $(filter -l%,$(1))
|
|
|
-strip-libs = $(filter-out -l%,$(1))
|
|
|
|
|
|
ifdef NO_LIBPERL
|
|
|
CFLAGS += -DNO_LIBPERL
|
|
@@ -603,21 +610,9 @@ else
|
|
|
$(call disable-python,No 'python-config' tool was found: disables Python support - please install python-devel/python-dev)
|
|
|
else
|
|
|
|
|
|
- PYTHON_CONFIG_SQ := $(call shell-sq,$(PYTHON_CONFIG))
|
|
|
-
|
|
|
- PYTHON_EMBED_LDOPTS := $(shell $(PYTHON_CONFIG_SQ) --ldflags 2>/dev/null)
|
|
|
- PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
|
|
|
- PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) -lutil
|
|
|
- PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
|
|
|
- ifeq ($(CC), clang)
|
|
|
- PYTHON_EMBED_CCOPTS := $(filter-out -specs=%,$(PYTHON_EMBED_CCOPTS))
|
|
|
- endif
|
|
|
- FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
|
|
|
-
|
|
|
ifneq ($(feature-libpython), 1)
|
|
|
$(call disable-python,No 'Python.h' (for Python 2.x support) was found: disables Python support - please install python-devel/python-dev)
|
|
|
else
|
|
|
-
|
|
|
ifneq ($(feature-libpython-version), 1)
|
|
|
$(warning Python 3 is not yet supported; please set)
|
|
|
$(warning PYTHON and/or PYTHON_CONFIG appropriately.)
|