mirror of
https://github.com/python/cpython.git
synced 2025-10-04 14:15:45 +00:00
Check that Python is 64-bit before enabling BLAKE2_USE_SSE. (GH-1332) (GH-2042)
(cherry picked from commit 6c991bdee7
)
This commit is contained in:
parent
6a90a12470
commit
9cead06076
1 changed files with 5 additions and 2 deletions
7
setup.py
7
setup.py
|
@ -897,8 +897,11 @@ class PyBuildExt(build_ext):
|
|||
blake2_deps.append('hashlib.h')
|
||||
|
||||
blake2_macros = []
|
||||
if not cross_compiling and os.uname().machine == "x86_64":
|
||||
# Every x86_64 machine has at least SSE2.
|
||||
if (not cross_compiling and
|
||||
os.uname().machine == "x86_64" and
|
||||
sys.maxsize > 2**32):
|
||||
# Every x86_64 machine has at least SSE2. Check for sys.maxsize
|
||||
# in case that kernel is 64-bit but userspace is 32-bit.
|
||||
blake2_macros.append(('BLAKE2_USE_SSE', '1'))
|
||||
|
||||
exts.append( Extension('_blake2',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue