diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2016-10-13 12:36:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-13 12:36:53 -0400 |
commit | edf2130edb3a84b16c84bee7749b7bc57d10a837 (patch) | |
tree | 6caa4e7d54390e9b54a3ff11f068cd003c622017 /numpy/core/setup_common.py | |
parent | e5d7653f8456c66ccb005eb50a139b1a9b044b3f (diff) | |
parent | 5b38e86dc118ed3afece54cb6b01bef0c7a1a4df (diff) | |
download | numpy-edf2130edb3a84b16c84bee7749b7bc57d10a837.tar.gz |
Merge pull request #8141 from juliantaylor/build-fixes
improve configure checks for broken systems
Diffstat (limited to 'numpy/core/setup_common.py')
-rw-r--r-- | numpy/core/setup_common.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py index cc2047b45..a97b02645 100644 --- a/numpy/core/setup_common.py +++ b/numpy/core/setup_common.py @@ -116,7 +116,7 @@ OPTIONAL_HEADERS = [ ] # optional gcc compiler builtins and their call arguments and optional a -# required header +# required header and definition name (HAVE_ prepended) # call arguments are required as the compiler will do strict signature checking OPTIONAL_INTRINSICS = [("__builtin_isnan", '5.'), ("__builtin_isinf", '5.'), @@ -125,12 +125,19 @@ OPTIONAL_INTRINSICS = [("__builtin_isnan", '5.'), ("__builtin_bswap64", '5u'), ("__builtin_expect", '5, 0'), ("__builtin_mul_overflow", '5, 5, (int*)5'), - ("__builtin_cpu_supports", '"sse"'), + # broken on OSX 10.11, make sure its not optimized away + ("volatile int r = __builtin_cpu_supports", '"sse"', + "stdio.h", "__BUILTIN_CPU_SUPPORTS"), ("_mm_load_ps", '(float*)0', "xmmintrin.h"), # SSE ("_mm_prefetch", '(float*)0, _MM_HINT_NTA', "xmmintrin.h"), # SSE ("_mm_load_pd", '(double*)0', "emmintrin.h"), # SSE2 ("__builtin_prefetch", "(float*)0, 0, 3"), + # check that the linker can handle avx + ("__asm__ volatile", '"vpand %xmm1, %xmm2, %xmm3"', + "stdio.h", "LINK_AVX"), + ("__asm__ volatile", '"vpand %ymm1, %ymm2, %ymm3"', + "stdio.h", "LINK_AVX2"), ] # function attributes |