Author: Matti Picus <[email protected]>
Branch: py3.6
Changeset: r95517:e7b2b377385e
Date: 2018-12-20 20:34 +0200
http://bitbucket.org/pypy/pypy/changeset/e7b2b377385e/
Log: solve 32bit _blake2 compilation on linux, still need win32, arm
fixes
diff --git a/lib_pypy/_blake2/_blake2_build.py
b/lib_pypy/_blake2/_blake2_build.py
--- a/lib_pypy/_blake2/_blake2_build.py
+++ b/lib_pypy/_blake2/_blake2_build.py
@@ -1,8 +1,18 @@
import os
import sys
+import platform
from cffi import FFI
+IS_ARM = platform.machine().startswith('arm')
+if IS_ARM:
+ # XXX Choose neon accelaration
+ define_macros = []
+else:
+ define_macros = [('__SSE2__', '1')]
+
+
+
blake_cdef = """
#define BLAKE_OUTBYTES ...
#define BLAKE_SALTBYTES ...
@@ -72,6 +82,7 @@
sources=[os.path.join(_libdir, 'blake2b.c'),
],
include_dirs=[_libdir],
+ define_macros=define_macros,
)
def _replace_b2s(src):
@@ -87,6 +98,7 @@
sources=[os.path.join(_libdir, 'blake2s.c'),
],
include_dirs=[_libdir],
+ define_macros=define_macros,
)
if __name__ == '__main__':
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit