summaryrefslogtreecommitdiff
path: root/numpy/core/setup_common.py
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2014-05-22 20:15:15 +0200
committerJulian Taylor <jtaylor.debian@googlemail.com>2014-05-22 20:17:49 +0200
commit848cd10bcc4b46be599de9cd3bd46d6b8859152e (patch)
tree80bc38c3e11e5aa48da557d2d3b8948dea412e5b /numpy/core/setup_common.py
parent2d7a9eedc6570017a2e305c9ec67bab982b12810 (diff)
downloadnumpy-848cd10bcc4b46be599de9cd3bd46d6b8859152e.tar.gz
MAINT: move variable attribute checks into a common variable
also rename GCC_ATTRIBUTES to FUNCTION_ATTRIBUTES
Diffstat (limited to 'numpy/core/setup_common.py')
-rw-r--r--numpy/core/setup_common.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py
index 85e92d923..8a06b40fd 100644
--- a/numpy/core/setup_common.py
+++ b/numpy/core/setup_common.py
@@ -121,16 +121,19 @@ OPTIONAL_INTRINSICS = [("__builtin_isnan", '5.'),
("_mm_load_pd", '(double*)0', "emmintrin.h"), # SSE2
]
-# gcc function attributes
-# (attribute as understood by gcc, function name),
+# function attributes
+# tested via "int %s %s(void *);" % (attribute, name)
# function name will be converted to HAVE_<upper-case-name> preprocessor macro
-OPTIONAL_GCC_ATTRIBUTES = [('__attribute__((optimize("unroll-loops")))',
- 'attribute_optimize_unroll_loops'),
- ('__attribute__((optimize("O3")))',
- 'attribute_optimize_opt_3'),
- ('__attribute__((nonnull (1)))',
- 'attribute_nonnull'),
- ]
+OPTIONAL_FUNCTION_ATTRIBUTES = [('__attribute__((optimize("unroll-loops")))',
+ 'attribute_optimize_unroll_loops'),
+ ('__attribute__((optimize("O3")))',
+ 'attribute_optimize_opt_3'),
+ ('__attribute__((nonnull (1)))',
+ 'attribute_nonnull'),
+ ]
+
+# variable attributes tested via "int %s a" % attribute
+OPTIONAL_VARIABLE_ATTRIBUTES = ["__thread", "__declspec(thread)"]
# Subset of OPTIONAL_STDFUNCS which may alreay have HAVE_* defined by Python.h
OPTIONAL_STDFUNCS_MAYBE = ["expm1", "log1p", "acosh", "atanh", "asinh", "hypot",