diff options
Diffstat (limited to 'extra')
-rw-r--r-- | extra/mariadb/PKGBUILD | 33 | ||||
-rw-r--r-- | extra/mariadb/mariadb-10.1.32-atomic.patch | 79 | ||||
-rw-r--r-- | extra/mariadb/mariadb-10.5.10-atomic.patch | 59 |
3 files changed, 76 insertions, 95 deletions
diff --git a/extra/mariadb/PKGBUILD b/extra/mariadb/PKGBUILD index 3d843259..83ea7950 100644 --- a/extra/mariadb/PKGBUILD +++ b/extra/mariadb/PKGBUILD @@ -1,24 +1,25 @@ # add -latomic where needed # e.g.TARGET_LINK_LIBRARIES(mariabackup sql crc atomic) -source+=('mariadb-10.1.32-atomic.patch') -sha256sums+=('194e43ca5468d4f4634f45eed6aaf08865c2d351fcc500696d4dc578fe94902e') +source+=('mariadb-10.5.10-atomic.patch') +sha256sums+=('b235236c9a872a4921e5c6e57dbcc75e52d544ddd6ed4ac84ebd627853207b15') eval "$( declare -f prepare | \ sed ' - /patch -Np1.*openssl-1-1-0.patch/ a \ patch -Np1 -i "${srcdir}/mariadb-10.1.32-atomic.patch" + /patch -Np1.*0001-arch-specific.patch/ a \ patch -Np1 -i "${srcdir}/mariadb-10.5.10-atomic.patch" ' )" -# 486-specific -if [ "${CARCH}" = "i486" ]; then - # no java - eval "$( - declare -f build | \ - sed ' - s/cmake /cmake -DCONNECT_WITH_JDBC=0 / - ' - )" -fi - -# temporary checksum workaround -sha256sums[0]='40ab19aeb8de141fdc188cf2251213c9e7351bee4d0cd29db704fae68d1068cf' +# tests are also disabled upstream, running them manually on i486 looks ok +#The servers were restarted 1548 times +#Spent 5008.297 of 859 seconds executing testcases +# +#Completed: Failed 5/5417 tests, 99.91% were successful. +# +#Failing test(s): main.mysqldump main.ddl_i18n_koi8r main.ddl_i18n_utf8 main.flush_logs_not_windows perfschema.bad_option +# +#The log files in var/log may give you some hint of what went wrong. +# +#If you want to report this error, please read first the documentation +#at http://dev.mysql.com/doc/mysql/en/mysql-test-suite.html +# +#962 tests were skipped, 293 by the test itself. diff --git a/extra/mariadb/mariadb-10.1.32-atomic.patch b/extra/mariadb/mariadb-10.1.32-atomic.patch deleted file mode 100644 index 42baf27c..00000000 --- a/extra/mariadb/mariadb-10.1.32-atomic.patch +++ /dev/null @@ -1,79 +0,0 @@ -diff -rauN mariadb-10.1.32/extra/mariabackup/CMakeLists.txt mariadb-10.1.32-atomic-patch/extra/mariabackup/CMakeLists.txt ---- mariadb-10.1.32/extra/mariabackup/CMakeLists.txt 2018-03-26 16:18:02.000000000 +0200 -+++ mariadb-10.1.32-atomic-patch/extra/mariabackup/CMakeLists.txt 2018-03-28 20:44:20.926068353 +0200 -@@ -86,7 +86,7 @@ - ADD_SUBDIRECTORY(crc) - - --TARGET_LINK_LIBRARIES(mariabackup sql crc) -+TARGET_LINK_LIBRARIES(mariabackup sql crc atomic) - - IF(NOT HAVE_SYSTEM_REGEX) - TARGET_LINK_LIBRARIES(mariabackup pcreposix) -diff -rauN mariadb-10.1.32/libmysqld/CMakeLists.txt mariadb-10.1.32-atomic-patch/libmysqld/CMakeLists.txt ---- mariadb-10.1.32/libmysqld/CMakeLists.txt 2018-03-26 16:18:02.000000000 +0200 -+++ mariadb-10.1.32-atomic-patch/libmysqld/CMakeLists.txt 2018-03-28 20:48:26.807077308 +0200 -@@ -184,7 +184,9 @@ - SET_TARGET_PROPERTIES(libmysqld PROPERTIES CLEAN_DIRECT_OUTPUT 1) - SET_TARGET_PROPERTIES(mysqlserver PROPERTIES CLEAN_DIRECT_OUTPUT 1) - IF(LIBMYSQLD_SO_EXTRA_LIBS) -- TARGET_LINK_LIBRARIES(libmysqld ${LIBMYSQLD_SO_EXTRA_LIBS}) -+ TARGET_LINK_LIBRARIES(libmysqld ${LIBMYSQLD_SO_EXTRA_LIBS} atomic) -+ ELSE() -+ TARGET_LINK_LIBRARIES(libmysqld atomic) - ENDIF() - ENDIF() - ENDIF() -diff -rauN mariadb-10.1.32/libmysqld/examples/CMakeLists.txt mariadb-10.1.32-atomic-patch/libmysqld/examples/CMakeLists.txt ---- mariadb-10.1.32/libmysqld/examples/CMakeLists.txt 2018-03-26 16:18:02.000000000 +0200 -+++ mariadb-10.1.32-atomic-patch/libmysqld/examples/CMakeLists.txt 2018-03-28 20:49:49.911092297 +0200 -@@ -27,14 +27,14 @@ - MYSQL_ADD_EXECUTABLE(mysql_embedded ../../client/completion_hash.cc - ../../client/mysql.cc ../../client/readline.cc - COMPONENT Client) --TARGET_LINK_LIBRARIES(mysql_embedded mysqlserver) -+TARGET_LINK_LIBRARIES(mysql_embedded mysqlserver atomic) - IF(UNIX) - TARGET_LINK_LIBRARIES(mysql_embedded ${MY_READLINE_LIBRARY}) - ENDIF(UNIX) - - MYSQL_ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.cc - COMPONENT Test) --TARGET_LINK_LIBRARIES(mysqltest_embedded mysqlserver pcre pcreposix) -+TARGET_LINK_LIBRARIES(mysqltest_embedded mysqlserver pcre pcreposix atomic) - - IF(CMAKE_GENERATOR MATCHES "Xcode") - # It does not seem possible to tell Xcode the resulting target might need -@@ -53,7 +53,7 @@ - COMPONENT Test) - SET_TARGET_PROPERTIES(mysql_client_test_embedded PROPERTIES HAS_CXX TRUE) - ENDIF() --TARGET_LINK_LIBRARIES(mysql_client_test_embedded mysqlserver) -+TARGET_LINK_LIBRARIES(mysql_client_test_embedded mysqlserver atomic) - - IF(UNIX) - SET_TARGET_PROPERTIES(mysql_embedded PROPERTIES ENABLE_EXPORTS TRUE) -diff -rauN mariadb-10.1.32/sql/CMakeLists.txt mariadb-10.1.32-atomic-patch/sql/CMakeLists.txt ---- mariadb-10.1.32/sql/CMakeLists.txt 2018-03-26 16:18:03.000000000 +0200 -+++ mariadb-10.1.32-atomic-patch/sql/CMakeLists.txt 2018-03-28 20:47:43.783551473 +0200 -@@ -276,7 +276,7 @@ - ENDIF() - ENDIF(NOT WITHOUT_DYNAMIC_PLUGINS) - --TARGET_LINK_LIBRARIES(mysqld sql) -+TARGET_LINK_LIBRARIES(mysqld sql atomic) - - # Provide plugins with minimal set of libraries - SET(INTERFACE_LIBS ${LIBRT}) -diff -rauN mariadb-10.1.32/unittest/sql/CMakeLists.txt mariadb-10.1.32-atomic-patch/unittest/sql/CMakeLists.txt ---- mariadb-10.1.32/unittest/sql/CMakeLists.txt 2018-03-26 16:18:05.000000000 +0200 -+++ mariadb-10.1.32-atomic-patch/unittest/sql/CMakeLists.txt 2018-03-28 20:45:33.566958289 +0200 -@@ -27,7 +27,7 @@ - ADD_EXECUTABLE(explain_filename-t explain_filename-t.cc) - ENDIF() - --TARGET_LINK_LIBRARIES(explain_filename-t sql mytap) -+TARGET_LINK_LIBRARIES(explain_filename-t sql mytap atomic) - MY_ADD_TEST(explain_filename) - - ADD_EXECUTABLE(mf_iocache-t mf_iocache-t.cc ../../sql/mf_iocache_encr.cc) 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() |