Fix check whether GCC supports __atomic_ builtins
authorIlias Tsitsimpis <iliastsi@debian.org>
Tue, 18 Sep 2018 15:45:17 +0000 (17:45 +0200)
committerKrzysztof Gogolewski <krz.gogolewski@gmail.com>
Tue, 18 Sep 2018 17:05:56 +0000 (19:05 +0200)
commitce3897ffd6e7c8b8f36b8e920168bac8c7f836ae
treef0b940424a955084c7d2bdab8876a8cc3f517e0a
parent01f7cd799c1c0eb3fa91e5e0c3ca1d08594121bd
Fix check whether GCC supports __atomic_ builtins

Summary:
C11 atomics are never used because:

* The program used for checking whether GCC supports
__atomic_ builtins fails with the following error:

```
  error: size mismatch in argument 2 of `__atomic_load`
   int test(int *x) { int y; __atomic_load(&x, &y, __ATOMIC_SEQ_CST); return x; }
```

* There is a typo when checking if CONF_GCC_SUPPORTS__ATOMICS equals YES,
resulting in PRIM_CFLAGS and PRIM_EXTRA_LIBRARIES never being set.

Reviewers: bgamari

Reviewed By: bgamari

Subscribers: rwbarton, erikd, carter

Differential Revision: https://phabricator.haskell.org/D5154
libraries/ghc-prim/aclocal.m4
libraries/ghc-prim/configure.ac