diff options
author | Matt Turner <[email protected]> | 2018-06-11 14:56:26 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2018-06-13 10:09:46 -0700 |
commit | b29b5a82a17e845e73ebef845176d9d1f44a2d00 (patch) | |
tree | a60de66c2c6a433a68ea453db2cf00edf478daa9 /meson.build | |
parent | 9cc577761ff1165e0b99d3ceaa936b342dea10b1 (diff) |
meson: Fix -latomic check
Commit 54ba73ef102f (configure.ac/meson.build: Fix -latomic test) fixed
some checks for -latomic, and then commit 54bbe600ec26 (configure.ac:
rework -latomic check) further extended the fixes in configure.ac but
not in Meson. This commit extends those fixes to the Meson tests.
Fixes: 54bbe600ec26 (configure.ac: rework -latomic check)
Reviewed-by: Eric Engestrom <[email protected]>
Reviewed-by: Dylan Baker <[email protected]>
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/meson.build b/meson.build index aefb9f3c85e..375751bce10 100644 --- a/meson.build +++ b/meson.build @@ -830,7 +830,13 @@ endif # Check for GCC style atomics dep_atomic = null_dep -if cc.compiles('int main() { int n; return __atomic_load_n(&n, __ATOMIC_ACQUIRE); }', +if cc.compiles('''#include <stdint.h> + int main() { + struct { + uint64_t *v; + } x; + return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE); + }''', name : 'GCC atomic builtins') pre_args += '-DUSE_GCC_ATOMIC_BUILTINS' |