Skip to content
Permalink
Browse files

MDEV-19696 - Cleanup gcc sync builtins

Since 10.4 requires C++11 capable compiler, gcc sync builtins became
dead code. Remove relevant cmake checks and cleanup include files.
  • Loading branch information...
robertbindar committed Jul 1, 2019
1 parent 3acf741 commit e8392e58b2a5a69f9c0bd5b5aed90348b4a0ccb3
Showing with 0 additions and 134 deletions.
  1. +0 −1 cmake/os/WindowsCache.cmake
  2. +0 −1 config.h.cmake
  3. +0 −24 configure.cmake
  4. +0 −106 include/atomic/gcc_sync.h
  5. +0 −2 include/my_atomic.h
@@ -299,7 +299,6 @@ SET(HAVE_SYS_UTSNAME_H CACHE INTERNAL "")
SET(HAVE_PTHREAD_ATTR_GETGUARDSIZE CACHE INTERNAL "")
SET(HAVE_SOCKPEERCRED CACHE INTERNAL "")
SET(HAVE_ABI_CXA_DEMANGLE CACHE INTERNAL "")
SET(HAVE_GCC_ATOMIC_BUILTINS CACHE INTERNAL "")
SET(HAVE_GCC_C11_ATOMICS CACHE INTERNAL "")
SET(HAVE_VISIBILITY_HIDDEN CACHE INTERNAL "")
ENDIF(MSVC)
@@ -380,7 +380,6 @@

#cmakedefine HAVE_SOLARIS_STYLE_GETHOST 1

#cmakedefine HAVE_GCC_ATOMIC_BUILTINS 1
#cmakedefine HAVE_GCC_C11_ATOMICS 1
#cmakedefine HAVE_SOLARIS_ATOMIC 1
#cmakedefine HAVE_DECL_SHM_HUGETLB 1
@@ -859,30 +859,6 @@ SET(SIGNAL_WITH_VIO_CLOSE 1)
MARK_AS_ADVANCED(NO_ALARM)


CHECK_CXX_SOURCE_COMPILES("
int main()
{
int foo= -10; int bar= 10;
long long int foo64= -10; long long int bar64= 10;
if (!__sync_fetch_and_add(&foo, bar) || foo)
return -1;
bar= __sync_lock_test_and_set(&foo, bar);
if (bar || foo != 10)
return -1;
bar= __sync_val_compare_and_swap(&bar, foo, 15);
if (bar)
return -1;
if (!__sync_fetch_and_add(&foo64, bar64) || foo64)
return -1;
bar64= __sync_lock_test_and_set(&foo64, bar64);
if (bar64 || foo64 != 10)
return -1;
bar64= __sync_val_compare_and_swap(&bar64, foo, 15);
if (bar64)
return -1;
return 0;
}"
HAVE_GCC_ATOMIC_BUILTINS)
CHECK_CXX_SOURCE_COMPILES("
int main()
{

This file was deleted.

@@ -112,8 +112,6 @@
#include "atomic/solaris.h"
#elif defined(HAVE_GCC_C11_ATOMICS)
#include "atomic/gcc_builtins.h"
#elif defined(HAVE_GCC_ATOMIC_BUILTINS)
#include "atomic/gcc_sync.h"
#endif

#if SIZEOF_LONG == 4

0 comments on commit e8392e5

Please sign in to comment.
You can’t perform that action at this time.