index : packages | |
Archlinux32 package modifications | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | extra/mariadb/mariadb-10.5.10-atomic.patch | 59 |
diff --git a/extra/mariadb/mariadb-10.5.10-atomic.patch b/extra/mariadb/mariadb-10.5.10-atomic.patch new file mode 100644 index 00000000..bd6307a1 --- /dev/null +++ b/extra/mariadb/mariadb-10.5.10-atomic.patch @@ -0,0 +1,59 @@ +diff -rauN mariadb-10.5.10/configure.cmake mariadb-10.5.10-atomic-patch/configure.cmake +--- mariadb-10.5.10/configure.cmake 2021-05-05 23:00:18.000000000 +0200 ++++ mariadb-10.5.10-atomic-patch/configure.cmake 2021-05-30 13:26:47.387151901 +0200 +@@ -865,7 +865,26 @@ + long long int *ptr= &var; + return (int)__atomic_load_n(ptr, __ATOMIC_SEQ_CST); + }" +-HAVE_GCC_C11_ATOMICS) ++HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC) ++IF (HAVE_GCC_C11_ATOMICS_WITHOUT_LIBATOMIC) ++ SET(HAVE_GCC_C11_ATOMICS True) ++ELSE() ++ SET(OLD_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}) ++ LIST(APPEND CMAKE_REQUIRED_LIBRARIES "atomic") ++ 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); ++ }" ++ HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) ++ IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) ++ SET(HAVE_GCC_C11_ATOMICS True) ++ ENDIF() ++ SET(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES}) ++ENDIF() ++ + + IF(WITH_VALGRIND) + SET(HAVE_valgrind 1) +diff -rauN mariadb-10.5.10/mysys/CMakeLists.txt mariadb-10.5.10-atomic-patch/mysys/CMakeLists.txt +--- mariadb-10.5.10/mysys/CMakeLists.txt 2021-05-05 23:00:19.000000000 +0200 ++++ mariadb-10.5.10-atomic-patch/mysys/CMakeLists.txt 2021-05-30 13:28:17.793904044 +0200 +@@ -181,6 +181,11 @@ + TARGET_LINK_LIBRARIES(mysys pthread) + ENDIF() + ++# Explicit libatomic for i486 ++IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) ++ TARGET_LINK_LIBRARIES(mysys atomic) ++ENDIF() ++ + ADD_EXECUTABLE(thr_lock thr_lock.c) + TARGET_LINK_LIBRARIES(thr_lock mysys) + SET_TARGET_PROPERTIES(thr_lock PROPERTIES COMPILE_FLAGS "-DMAIN") +diff -rauN mariadb-10.5.10/storage/rocksdb/build_rocksdb.cmake mariadb-10.5.10-atomic-patch/storage/rocksdb/build_rocksdb.cmake +--- mariadb-10.5.10/storage/rocksdb/build_rocksdb.cmake 2021-05-05 23:00:19.000000000 +0200 ++++ mariadb-10.5.10-atomic-patch/storage/rocksdb/build_rocksdb.cmake 2021-05-30 13:29:54.193990574 +0200 +@@ -498,6 +498,9 @@ + + ADD_CONVENIENCE_LIBRARY(rocksdblib ${SOURCES}) + target_link_libraries(rocksdblib ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) ++IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC) ++ TARGET_LINK_LIBRARIES(rocksdblib atomic) ++ENDIF() + IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set_target_properties(rocksdblib PROPERTIES COMPILE_FLAGS "-fPIC -fno-builtin-memcmp -Wno-error") + endif() |