[Mesa-dev] [PATCH 1/3] meson: Fix -latomic check

Dylan Baker dylan at pnwbakers.com
Wed Jun 13 15:37:14 UTC 2018


Quoting Matt Turner (2018-06-12 17:50:20)
> 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)
> ---
>  meson.build | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index 7dba52369b0..62200476216 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -836,7 +836,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'
>  
> -- 
> 2.16.1
> 

Should patches 2 and 3 be cc 18.1?

Reviewed-by: Dylan Baker <dylan at pnwbakers.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180613/13fa5b20/attachment.sig>


More information about the mesa-dev mailing list