Merge pull request #4526 from gilles-peskine-arm/pr_4510-changelog
Add changelog entry for #4510
diff --git a/ChangeLog.d/make-generate-tests-python.txt b/ChangeLog.d/make-generate-tests-python.txt
new file mode 100644
index 0000000..4b9009d
--- /dev/null
+++ b/ChangeLog.d/make-generate-tests-python.txt
@@ -0,0 +1,3 @@
+Changes
+ * When building the test suites with GNU make, invoke python3 or python, not
+ python2, which is no longer supported upstream.
diff --git a/programs/fuzz/Makefile b/programs/fuzz/Makefile
index 588bb28..59a2bb7 100644
--- a/programs/fuzz/Makefile
+++ b/programs/fuzz/Makefile
@@ -20,8 +20,6 @@
DLEXT ?= so
EXEXT=
SHARED_SUFFIX=
-# python2 for POSIX since FreeBSD has only python2 as default.
-PYTHON ?= python2
ifdef FUZZINGENGINE
LOCAL_LDFLAGS += -lFuzzingEngine
diff --git a/tests/Makefile b/tests/Makefile
index 53f64b9..7afd0f5 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -53,8 +53,7 @@
DLEXT ?= so
EXEXT=
SHARED_SUFFIX=
-# python2 for POSIX since FreeBSD has only python2 as default.
-PYTHON ?= python2
+PYTHON ?= $(shell if type python3 >/dev/null 2>/dev/null; then echo python3; else echo python; fi)
endif
# A test application is built for each suites/test_suite_*.data file.