summaryrefslogtreecommitdiff
path: root/numpy/core/setup_common.py
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2016-10-11 19:03:02 +0200
committerJulian Taylor <jtaylor.debian@googlemail.com>2016-10-11 19:20:51 +0200
commitb5471e08bd4fe30363c1f66a640e9ceae1653a86 (patch)
tree8a117962bdb86d94e936001bf960f2fc14a5bffe /numpy/core/setup_common.py
parentdbb70947b95b92abf3e48ef8be7bd3ab79489892 (diff)
downloadnumpy-b5471e08bd4fe30363c1f66a640e9ceae1653a86.tar.gz
MAINT: check that linker can handle AVX
some people use new compilers with old linkers so the target attribute check for AVX is not enough closes gh-8128
Diffstat (limited to 'numpy/core/setup_common.py')
-rw-r--r--numpy/core/setup_common.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py
index cc2047b45..9202faecf 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.'),
@@ -131,6 +131,11 @@ OPTIONAL_INTRINSICS = [("__builtin_isnan", '5.'),
"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