summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2018-09-19 15:23:27 -0400
committerBen Gamari <ben@smart-cactus.org>2018-09-20 10:13:55 -0400
commitd7fa8695324d6e0c3ea77228f9de93d529afc23e (patch)
tree7b9f23449b7c8bbc1ebe9c23dcaf831f2d3f1824 /aclocal.m4
parentba086ca72ee6c77abba685f3100ad513e38a1a87 (diff)
downloadhaskell-d7fa8695324d6e0c3ea77228f9de93d529afc23e.tar.gz
Revert "adds -latomic to. ghc-prim"
This commit was never properly justified and relies on the existence of libatomic, which doesn't appear to exist on Darwin. This reverts commit ec9aacf3eb2975fd302609163aaef429962ecd87.
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m418
1 files changed, 18 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 141235057c..e2804cf642 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1296,6 +1296,24 @@ AC_SUBST(GccIsClang)
rm -f conftest.txt
])
+# FP_GCC_SUPPORTS__ATOMICS
+# ------------------------
+# Does gcc support the __atomic_* family of builtins?
+AC_DEFUN([FP_GCC_SUPPORTS__ATOMICS],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_MSG_CHECKING([whether GCC supports __atomic_ builtins])
+ echo 'int test(int *x) { int y; __atomic_load(&x, &y, __ATOMIC_SEQ_CST); return x; }' > conftest.c
+ if $CC -c conftest.c > /dev/null 2>&1; then
+ CONF_GCC_SUPPORTS__ATOMICS=YES
+ AC_MSG_RESULT([yes])
+ else
+ CONF_GCC_SUPPORTS__ATOMICS=NO
+ AC_MSG_RESULT([no])
+ fi
+ rm -f conftest.c conftest.o
+])
+
# FP_GCC_SUPPORTS_NO_PIE
# ----------------------
# Does gcc support the -no-pie option? If so we should pass it to gcc when