diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2022-02-01 20:33:04 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2022-02-01 20:33:04 +0100 |
commit | cf63eecef44f189ce2d221612dee9dfc1885ba4e (patch) | |
tree | 93b4e6645a1d371bd8012a0aa8e6e3a3d541b2a6 /configure.cmake | |
parent | fb40a2fabf8d8cf765c83a0b8e609dd893c75ec3 (diff) | |
parent | c04a203a10e282e1f33fd04d8a1b7ff0b076bce5 (diff) | |
download | mariadb-git-cf63eecef44f189ce2d221612dee9dfc1885ba4e.tar.gz |
Merge branch '10.4' into 10.5
Diffstat (limited to 'configure.cmake')
-rw-r--r-- | configure.cmake | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/configure.cmake b/configure.cmake index c97240237e9..32ad11fac98 100644 --- a/configure.cmake +++ b/configure.cmake @@ -862,9 +862,16 @@ MARK_AS_ADVANCED(NO_ALARM) CHECK_CXX_SOURCE_COMPILES(" int main() { - long long int var= 1; - long long int *ptr= &var; - return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); + char x=1; + short y=1; + int z=1; + long w = 1; + long long s = 1; + x = __atomic_add_fetch(&x, 1, __ATOMIC_SEQ_CST); + y = __atomic_add_fetch(&y, 1, __ATOMIC_SEQ_CST); + z = __atomic_add_fetch(&z, 1, __ATOMIC_SEQ_CST); + w = __atomic_add_fetch(&w, 1, __ATOMIC_SEQ_CST); + return (int)__atomic_load_n(&s, __ATOMIC_SEQ_CST); }" HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC) IF (HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC) @@ -875,9 +882,16 @@ ELSE() CHECK_CXX_SOURCE_COMPILES(" int main() { - long long int var= 1; - long long int *ptr= &var; - return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); + char x=1; + short y=1; + int z=1; + long w = 1; + long long s = 1; + x = __atomic_add_fetch(&x, 1, __ATOMIC_SEQ_CST); + y = __atomic_add_fetch(&y, 1, __ATOMIC_SEQ_CST); + z = __atomic_add_fetch(&z, 1, __ATOMIC_SEQ_CST); + w = __atomic_add_fetch(&w, 1, __ATOMIC_SEQ_CST); + return (int)__atomic_load_n(&s, __ATOMIC_SEQ_CST); }" HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) |