Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 655616 | Differences between
and this patch

Collapse All | Expand All

(-)mesa-18.1.1/configure.ac (-2 / +4 lines)
Lines 442-448 Link Here
442
    struct {
442
    struct {
443
        uint64_t *v;
443
        uint64_t *v;
444
    } x;
444
    } x;
445
    return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE);
445
    return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE) &
446
        (int)__atomic_add_fetch(x.v, (uint64_t)1, __ATOMIC_ACQ_REL);
446
}]])], GCC_ATOMIC_BUILTINS_SUPPORTED=yes, GCC_ATOMIC_BUILTINS_SUPPORTED=no)
447
}]])], GCC_ATOMIC_BUILTINS_SUPPORTED=yes, GCC_ATOMIC_BUILTINS_SUPPORTED=no)
447
448
448
dnl If that didn't work, we try linking with -latomic, which is needed on some
449
dnl If that didn't work, we try linking with -latomic, which is needed on some
Lines 456-462 Link Here
456
        struct {
457
        struct {
457
            uint64_t *v;
458
            uint64_t *v;
458
        } x;
459
        } x;
459
        return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE);
460
        return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE) &
461
            (int)__atomic_add_fetch(x.v, (uint64_t)1, __ATOMIC_ACQ_REL);
460
   }]])], GCC_ATOMIC_BUILTINS_SUPPORTED=yes LIBATOMIC_LIBS="-latomic",
462
   }]])], GCC_ATOMIC_BUILTINS_SUPPORTED=yes LIBATOMIC_LIBS="-latomic",
461
          GCC_ATOMIC_BUILTINS_SUPPORTED=no)
463
          GCC_ATOMIC_BUILTINS_SUPPORTED=no)
462
   LDFLAGS=$save_LDFLAGS
464
   LDFLAGS=$save_LDFLAGS
(-)mesa-18.1.1/meson.build (-2 / +3 lines)
Lines 836-842 Link Here
836
# Check for GCC style atomics
836
# Check for GCC style atomics
837
dep_atomic = null_dep
837
dep_atomic = null_dep
838
838
839
if cc.compiles('int main() { int n; return __atomic_load_n(&n, __ATOMIC_ACQUIRE); }',
839
if cc.compiles('int main() { int n; return __atomic_load_n(&n, __ATOMIC_ACQUIRE) & __atomic_add_fetch(&n, 1, __ATOMIC_ACQ_REL); }',
840
               name : 'GCC atomic builtins')
840
               name : 'GCC atomic builtins')
841
  pre_args += '-DUSE_GCC_ATOMIC_BUILTINS'
841
  pre_args += '-DUSE_GCC_ATOMIC_BUILTINS'
842
842
Lines 851-857 Link Here
851
                       struct {
851
                       struct {
852
                         uint64_t *v;
852
                         uint64_t *v;
853
                       } x;
853
                       } x;
854
                       return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE);
854
                       return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE) &
855
                         __atomic_add_fetch(&n, 1, __ATOMIC_ACQ_REL);
855
                     }''',
856
                     }''',
856
                  name : 'GCC atomic builtins required -latomic')
857
                  name : 'GCC atomic builtins required -latomic')
857
    dep_atomic = cc.find_library('atomic')
858
    dep_atomic = cc.find_library('atomic')

Return to bug 655616