summaryrefslogtreecommitdiff
path: root/numpy/distutils/command/autodist.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/distutils/command/autodist.py')
-rw-r--r--numpy/distutils/command/autodist.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/numpy/distutils/command/autodist.py b/numpy/distutils/command/autodist.py
index 1b9b1dd57..5602f3857 100644
--- a/numpy/distutils/command/autodist.py
+++ b/numpy/distutils/command/autodist.py
@@ -41,3 +41,20 @@ main()
}
"""
return cmd.try_compile(body, None, None)
+
+
+def check_gcc_function_attribute(cmd, attribute, name):
+ """Return True if the given function attribute is supported."""
+ cmd._check_compiler()
+ body = """
+int %s %s(void*);
+
+int
+main()
+{
+}
+""" % (attribute, name)
+ ret, output = cmd.try_output_compile(body, None, None)
+ if not ret or len(output) > 0:
+ return False
+ return True