mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-26 13:05:33 +00:00
Use python3 when building on non-Windows for Windows
The makefiles look for python3 on Unix-like systems where python is often Python 2. This uses sh code so it doesn't work on Windows. On Windows, the makefiles just assume that python is Python 3. The code was incorrectly deciding not to try python3 based on WINDOWS_BUILD, which indicates that the build is *for* Windows. Switch to checking WINDOWS, which indicates that the build is *on* Windows. Fix #4774 Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
06d5a3226b
commit
cdd80c4cf9
4
ChangeLog.d/makefile-python-windows.txt
Normal file
4
ChangeLog.d/makefile-python-windows.txt
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
Bugfix
|
||||||
|
* The GNU makefiles invoke python3 in preference to python except on Windows.
|
||||||
|
The check was accidentally not performed when cross-compiling for Windows
|
||||||
|
on Linux. Fix this. Fixes #4774.
|
|
@ -49,11 +49,15 @@ LOCAL_LDFLAGS += -lws2_32
|
||||||
ifdef SHARED
|
ifdef SHARED
|
||||||
SHARED_SUFFIX=.$(DLEXT)
|
SHARED_SUFFIX=.$(DLEXT)
|
||||||
endif
|
endif
|
||||||
PYTHON ?= python
|
|
||||||
else
|
else
|
||||||
DLEXT ?= so
|
DLEXT ?= so
|
||||||
EXEXT=
|
EXEXT=
|
||||||
SHARED_SUFFIX=
|
SHARED_SUFFIX=
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifdef WINDOWS
|
||||||
|
PYTHON ?= python
|
||||||
|
else
|
||||||
PYTHON ?= $(shell if type python3 >/dev/null 2>/dev/null; then echo python3; else echo python; fi)
|
PYTHON ?= $(shell if type python3 >/dev/null 2>/dev/null; then echo python3; else echo python; fi)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue