File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -871,6 +871,7 @@ define disable-python_code
871
871
NO_LIBPYTHON := 1
872
872
endef
873
873
874
+ PYTHON_EXTENSION_SUFFIX := '.so'
874
875
ifdef NO_LIBPYTHON
875
876
$(call disable-python,Python support disabled by user)
876
877
else
889
890
else
890
891
LDFLAGS += $(PYTHON_EMBED_LDFLAGS)
891
892
EXTLIBS += $(PYTHON_EMBED_LIBADD)
892
- LANG_BINDINGS += $(obj-perf)python/perf.so
893
+ PYTHON_EXTENSION_SUFFIX := $(shell $(PYTHON) -c 'from importlib import machinery; print(machinery.EXTENSION_SUFFIXES[0])')
894
+ LANG_BINDINGS += $(obj-perf)python/perf$(PYTHON_EXTENSION_SUFFIX)
893
895
CFLAGS += -DHAVE_LIBPYTHON_SUPPORT
894
896
$(call detected,CONFIG_LIBPYTHON)
895
897
endif
Original file line number Diff line number Diff line change @@ -647,7 +647,7 @@ all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS)
647
647
# Create python binding output directory if not already present
648
648
_dummy := $(shell [ -d '$(OUTPUT)python' ] || mkdir -p '$(OUTPUT)python')
649
649
650
- $(OUTPUT)python/perf.so : $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBPERF)
650
+ $(OUTPUT)python/perf$(PYTHON_EXTENSION_SUFFIX) : $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBPERF)
651
651
$(QUIET_GEN)LDSHARED="$(CC) -pthread -shared" \
652
652
CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' \
653
653
$(PYTHON_WORD) util/setup.py \
You can’t perform that action at this time.
0 commit comments