diff options
author | Julian Taylor <jtaylor.debian@googlemail.com> | 2016-10-11 19:03:02 +0200 |
---|---|---|
committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2016-10-11 19:20:51 +0200 |
commit | b5471e08bd4fe30363c1f66a640e9ceae1653a86 (patch) | |
tree | 8a117962bdb86d94e936001bf960f2fc14a5bffe /numpy/core/include | |
parent | dbb70947b95b92abf3e48ef8be7bd3ab79489892 (diff) | |
download | numpy-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/include')
-rw-r--r-- | numpy/core/include/numpy/npy_common.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/include/numpy/npy_common.h b/numpy/core/include/numpy/npy_common.h index 11a988163..bd221547f 100644 --- a/numpy/core/include/numpy/npy_common.h +++ b/numpy/core/include/numpy/npy_common.h @@ -29,12 +29,12 @@ #endif /* compile target attributes */ -#ifdef HAVE_ATTRIBUTE_TARGET_AVX +#if defined HAVE_ATTRIBUTE_TARGET_AVX && defined HAVE_LINK_AVX #define NPY_GCC_TARGET_AVX __attribute__((target("avx"))) #else #define NPY_GCC_TARGET_AVX #endif -#ifdef HAVE_ATTRIBUTE_TARGET_AVX2 +#if defined HAVE_ATTRIBUTE_TARGET_AVX2 && defined HAVE_LINK_AVX2 #define NPY_GCC_TARGET_AVX2 __attribute__((target("avx2"))) #else #define NPY_GCC_TARGET_AVX2 |