mariadb: update to 10.5.9.
This commit is contained in:
parent
33ea1605ba
commit
ab007f5081
16 changed files with 332 additions and 612 deletions
|
@ -557,8 +557,6 @@ libecpg.so.6 postgresql-libs-13.2_2
|
|||
libpgtypes.so.3 postgresql-libs-13.2_2
|
||||
libpq.so.5 postgresql-libs-13.2_2
|
||||
libmypaint.so.0 libmypaint-1.6.1_1
|
||||
libmysqlclient_r.so.18 libmariadbclient-10.1.48_2
|
||||
libmysqlclient.so.18 libmariadbclient-10.1.48_2
|
||||
libgssapi_krb5.so.2 mit-krb5-libs-1.8_1
|
||||
libgssrpc.so.4 mit-krb5-libs-1.8_1
|
||||
libk5crypto.so.3 mit-krb5-libs-1.8_1
|
||||
|
@ -571,8 +569,6 @@ libkrb5support.so.0 mit-krb5-libs-1.8_1
|
|||
libkdb_ldap.so.1 mit-krb5-libs-1.14.2_2
|
||||
libverto.so.0 mit-krb5-libs-1.8_1
|
||||
libverto-k5ev.so.0 mit-krb5-libs-1.8_1
|
||||
libmysqlclient_r.so.18 libmariadbclient-10.1.48_2
|
||||
libmysqlclient.so.18 libmariadbclient-10.1.48_2
|
||||
libgssapi_krb5.so.2 mit-krb5-libs-1.18.3_2
|
||||
libgssrpc.so.4 mit-krb5-libs-1.18.3_2
|
||||
libk5crypto.so.3 mit-krb5-libs-1.18.3_2
|
||||
|
@ -1604,14 +1600,12 @@ libdovecot-compression.so.0 dovecot-2.3.13_3
|
|||
libdovecot-sql.so.0 dovecot-2.3.13_3
|
||||
libdovecot-storage.so.0 dovecot-2.3.13_3
|
||||
libdovecot-lda.so.0 dovecot-2.3.13_3
|
||||
libmysqld.so.18 libmariadbclient-5.5.36_1
|
||||
libdovecot.so.0 dovecot-2.3.13_3
|
||||
libdovecot-login.so.0 dovecot-2.3.13_3
|
||||
libdovecot-compression.so.0 dovecot-2.3.13_3
|
||||
libdovecot-sql.so.0 dovecot-2.3.13_3
|
||||
libdovecot-storage.so.0 dovecot-2.3.13_3
|
||||
libdovecot-lda.so.0 dovecot-2.3.13_3
|
||||
libmysqld.so.18 libmariadbclient-10.1.48_2
|
||||
libwiretap.so.11 libwireshark-3.4.0_1
|
||||
libwireshark.so.14 libwireshark-3.4.0_1
|
||||
libwsutil.so.12 libwireshark-3.4.0_1
|
||||
|
@ -3963,3 +3957,5 @@ libmd.so.0 libmd-1.0.3_1
|
|||
libldacBT_abr.so.2 ldacBT-2.0.2.3_1
|
||||
libldacBT_enc.so.2 ldacBT-2.0.2.3_1
|
||||
libgumbo.so.1 gumbo-parser-0.10.1_2
|
||||
libmariadb.so.3 libmariadbclient-10.5.9_1
|
||||
libmariadbd.so.19 libmariadbclient-10.5.9_1
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
#
|
||||
case ${ACTION} in
|
||||
post)
|
||||
install -dm0700 var/lib/mysql
|
||||
usr/bin/mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
|
||||
chown -R mysql:mysql var/lib/mysql
|
||||
chpst -u mysql:mysql usr/bin/mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
If you come from a System that used the MySQL package,
|
||||
than restart your mysql service and upgrade your database
|
||||
wtih mysql_upgrade(1)
|
|
@ -1,13 +1,11 @@
|
|||
https://jira.mariadb.org/browse/MDEV-24131
|
||||
|
||||
diff --git a/unittest/mysys/stacktrace-t.c b/unittest/mysys/stacktrace-t.c
|
||||
index 8fa0db15b36..67eb099028e 100644
|
||||
--- unittest/mysys/stacktrace-t.c
|
||||
+++ unittest/mysys/stacktrace-t.c
|
||||
--- ./unittest/mysys/stacktrace-t.c
|
||||
+++ ./unittest/mysys/stacktrace-t.c
|
||||
@@ -22,6 +22,14 @@
|
||||
|
||||
|
||||
char b_bss[10];
|
||||
|
||||
|
||||
+#ifndef HAVE_STACKTRACE
|
||||
+int my_safe_print_str(const char* val, size_t max_len)
|
||||
+{
|
47
srcpkgs/mariadb/files/musl-ppc-remove-glibc-dep.patch
Normal file
47
srcpkgs/mariadb/files/musl-ppc-remove-glibc-dep.patch
Normal file
|
@ -0,0 +1,47 @@
|
|||
--- ./include/my_cpu.h
|
||||
+++ ./include/my_cpu.h
|
||||
@@ -24,17 +24,16 @@
|
||||
*/
|
||||
|
||||
#ifdef _ARCH_PWR8
|
||||
-#include <sys/platform/ppc.h>
|
||||
/* Very low priority */
|
||||
-#define HMT_very_low() __ppc_set_ppr_very_low()
|
||||
+#define HMT_very_low() asm volatile("or 31,31,31")
|
||||
/* Low priority */
|
||||
-#define HMT_low() __ppc_set_ppr_low()
|
||||
+#define HMT_low() asm volatile ("or 1,1,1")
|
||||
/* Medium low priority */
|
||||
-#define HMT_medium_low() __ppc_set_ppr_med_low()
|
||||
+#define HMT_medium_low() asm volatile ("or 6,6,6")
|
||||
/* Medium priority */
|
||||
-#define HMT_medium() __ppc_set_ppr_med()
|
||||
+#define HMT_medium() asm volatile ("or 2,2,2")
|
||||
/* Medium high priority */
|
||||
-#define HMT_medium_high() __ppc_set_ppr_med_high()
|
||||
+#define HMT_medium_high() asm volatile("or 5,5,5")
|
||||
/* High priority */
|
||||
#define HMT_high() asm volatile("or 3,3,3")
|
||||
#else
|
||||
@@ -72,7 +71,7 @@ static inline void MY_RELAX_CPU(void)
|
||||
__asm__ __volatile__ ("pause");
|
||||
#endif
|
||||
#elif defined(_ARCH_PWR8)
|
||||
- __ppc_get_timebase();
|
||||
+ __builtin_ppc_get_timebase();
|
||||
#elif defined __GNUC__ && (defined __arm__ || defined __aarch64__)
|
||||
/* Mainly, prevent the compiler from optimizing away delay loops */
|
||||
__asm__ __volatile__ ("":::"memory");
|
||||
diff --git a/storage/tokudb/PerconaFT/portability/toku_time.h b/storage/tokudb/PerconaFT/portability/toku_time.h
|
||||
index c4c45b8e..2f7a07f5 100644
|
||||
--- ./storage/tokudb/PerconaFT/portability/toku_time.h
|
||||
+++ ./storage/tokudb/PerconaFT/portability/toku_time.h
|
||||
@@ -110,7 +110,7 @@ static inline tokutime_t toku_time_now(void) {
|
||||
__asm __volatile__ ("mrs %[rt], cntvct_el0" : [rt] "=r" (result));
|
||||
return result;
|
||||
#elif defined(__powerpc__)
|
||||
- return __ppc_get_timebase();
|
||||
+ return __builtin_ppc_get_timebase();
|
||||
#else
|
||||
#error No timer implementation for this platform
|
||||
#endif
|
108
srcpkgs/mariadb/patches/atomic-fix.patch
Normal file
108
srcpkgs/mariadb/patches/atomic-fix.patch
Normal file
|
@ -0,0 +1,108 @@
|
|||
Forwarded: https://github.com/MariaDB/server/pull/1716
|
||||
Author: Vicențiu Ciorbaru <vicentiu@mariadb.org>
|
||||
Date: Fri Dec 21 19:14:04 2018 +0200
|
||||
|
||||
Link with libatomic to enable C11 atomics support
|
||||
|
||||
Some architectures (mips) require libatomic to support proper
|
||||
atomic operations. Check first if support is available without
|
||||
linking, otherwise use the library.
|
||||
|
||||
Original commit:
|
||||
Detect whether libatomic is needed rather than hard-coding for mips
|
||||
|
||||
Fixes FTBFS on powerpc, since it needs libatomic too for C11 atomics,
|
||||
and possibly m68k.
|
||||
|
||||
Contributors:
|
||||
James Cowgill <jcowgill@debian.org>
|
||||
Jessica Clarke <jrtc27@debian.org>
|
||||
|
||||
--- configure.cmake
|
||||
+++ configure.cmake
|
||||
@@ -862,7 +862,25 @@ int main()
|
||||
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)
|
||||
--- mysys/CMakeLists.txt
|
||||
+++ mysys/CMakeLists.txt
|
||||
@@ -154,6 +154,10 @@ TARGET_LINK_LIBRARIES(mysys dbug strings
|
||||
${LIBNSL} ${LIBM} ${LIBRT} ${CMAKE_DL_LIBS} ${LIBSOCKET} ${LIBEXECINFO})
|
||||
DTRACE_INSTRUMENT(mysys)
|
||||
|
||||
+IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
|
||||
+ TARGET_LINK_LIBRARIES(mysys atomic)
|
||||
+ENDIF()
|
||||
+
|
||||
IF(HAVE_BFD_H)
|
||||
TARGET_LINK_LIBRARIES(mysys bfd)
|
||||
ENDIF(HAVE_BFD_H)
|
||||
--- sql/CMakeLists.txt
|
||||
+++ sql/CMakeLists.txt
|
||||
@@ -318,6 +318,10 @@ IF(WITH_MYSQLD_LDFLAGS)
|
||||
"${MYSQLD_LINK_FLAGS} ${WITH_MYSQLD_LDFLAGS}")
|
||||
ENDIF()
|
||||
|
||||
+IF (HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
|
||||
+ TARGET_LINK_LIBRARIES(sql atomic)
|
||||
+ENDIF()
|
||||
+
|
||||
|
||||
FIND_PACKAGE(BISON 2.0)
|
||||
|
||||
From f447aca534d1a12809eeb146e8220d305cc3884d Mon Sep 17 00:00:00 2001
|
||||
From: Mingli Yu <mingli.yu@windriver.com>
|
||||
Date: Thu, 9 Apr 2020 14:07:19 +0800
|
||||
Subject: [PATCH] build_rocksdb.cmake: fix atomic support on arm
|
||||
|
||||
Check to link with libatomic to enable C11 atomics support
|
||||
to fix below build error on arm:
|
||||
| /build/tmp/work/armv5e-wrs-linux-gnueabi/mariadb/10.3.13-r0/recipe-sysroot-native/usr/bin/arm-wrs-linux-gnueabi/../../libexec/arm-wrs-linux-gnueabi/gcc/arm-wrs-linux-gnueabi/8.3.0/ld.bfd: librocksdblib.a(env_posix.cc.o): in function `std::__atomic_base<unsigned long long>::store(unsigned long long, std::memory_order)':
|
||||
| /usr/include/c++/8.3.0/bits/atomic_base.h:374: undefined reference to `__atomic_store_8'
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
|
||||
---
|
||||
storage/rocksdb/build_rocksdb.cmake | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/storage/rocksdb/build_rocksdb.cmake b/storage/rocksdb/build_rocksdb.cmake
|
||||
index d7895b0..3bcd52a 100644
|
||||
--- storage/rocksdb/build_rocksdb.cmake
|
||||
+++ storage/rocksdb/build_rocksdb.cmake
|
||||
@@ -470,6 +470,9 @@ list(APPEND SOURCES ${CMAKE_CURRENT_BINARY_DIR}/build_version.cc)
|
||||
|
||||
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()
|
||||
--
|
||||
2.7.4
|
|
@ -1,128 +0,0 @@
|
|||
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
|
||||
Date: Thu, 10 Aug 2017 20:40:29 +0200
|
||||
Subject: c11_atomics
|
||||
|
||||
---
|
||||
configure.cmake | 23 +++++++++++++++++++++--
|
||||
include/atomic/gcc_builtins.h | 15 +++++++++++++++
|
||||
include/atomic/nolock.h | 4 ++--
|
||||
mysys/CMakeLists.txt | 4 ++++
|
||||
sql/CMakeLists.txt | 4 ++++
|
||||
5 files changed, 46 insertions(+), 4 deletions(-)
|
||||
|
||||
--- configure.cmake
|
||||
+++ configure.cmake
|
||||
@@ -128,7 +128,7 @@ IF(UNIX)
|
||||
ENDIF()
|
||||
FIND_PACKAGE(Threads)
|
||||
|
||||
- SET(CMAKE_REQUIRED_LIBRARIES
|
||||
+ LIST(APPEND CMAKE_REQUIRED_LIBRARIES
|
||||
${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${LIBEXECINFO})
|
||||
# Need explicit pthread for gcc -fsanitize=address
|
||||
IF(CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES "-fsanitize=")
|
||||
@@ -1038,7 +1038,26 @@ ELSEIF(NOT WITH_ATOMIC_OPS)
|
||||
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)
|
||||
+ ELSE()
|
||||
+ SET(CMAKE_REQUIRED_LIBRARIES ${OLD_CMAKE_REQUIRED_LIBRARIES})
|
||||
+ ENDIF()
|
||||
+ ENDIF()
|
||||
ELSE()
|
||||
MESSAGE(FATAL_ERROR "${WITH_ATOMIC_OPS} is not a valid value for WITH_ATOMIC_OPS!")
|
||||
ENDIF()
|
||||
--- include/atomic/gcc_builtins.h
|
||||
+++ include/atomic/gcc_builtins.h
|
||||
@@ -16,6 +16,7 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
|
||||
|
||||
+#if defined (HAVE_GCC_ATOMIC_BUILTINS)
|
||||
#define make_atomic_add_body(S) \
|
||||
v= __sync_fetch_and_add(a, v);
|
||||
#define make_atomic_fas_body(S) \
|
||||
@@ -26,6 +27,20 @@
|
||||
sav= __sync_val_compare_and_swap(a, cmp_val, set);\
|
||||
if (!(ret= (sav == cmp_val))) *cmp= sav
|
||||
|
||||
+#elif defined(HAVE_GCC_C11_ATOMICS)
|
||||
+
|
||||
+#define make_atomic_add_body(S) \
|
||||
+ v= __atomic_fetch_add(a, v, __ATOMIC_SEQ_CST)
|
||||
+#define make_atomic_fas_body(S) \
|
||||
+ v= __atomic_exchange_n(a, v, __ATOMIC_SEQ_CST)
|
||||
+#define make_atomic_cas_body(S) \
|
||||
+ int ## S sav; \
|
||||
+ ret= __atomic_compare_exchange_n(a, cmp, set, \
|
||||
+ 0, \
|
||||
+ __ATOMIC_SEQ_CST,\
|
||||
+ __ATOMIC_SEQ_CST);
|
||||
+#endif
|
||||
+
|
||||
#ifdef MY_ATOMIC_MODE_DUMMY
|
||||
#define make_atomic_load_body(S) ret= *a
|
||||
#define make_atomic_store_body(S) *a= v
|
||||
--- include/atomic/nolock.h
|
||||
+++ include/atomic/nolock.h
|
||||
@@ -17,7 +17,7 @@
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
|
||||
|
||||
#if defined(__i386__) || defined(_MSC_VER) || defined(__x86_64__) \
|
||||
- || defined(HAVE_GCC_ATOMIC_BUILTINS) \
|
||||
+ || defined(HAVE_GCC_ATOMIC_BUILTINS) || defined(HAVE_GCC_C11_ATOMICS) \
|
||||
|| defined(HAVE_SOLARIS_ATOMIC)
|
||||
|
||||
# ifdef MY_ATOMIC_MODE_DUMMY
|
||||
@@ -41,7 +41,7 @@
|
||||
# elif __GNUC__
|
||||
# if defined(HAVE_SOLARIS_ATOMIC)
|
||||
# include "solaris.h"
|
||||
-# elif defined(HAVE_GCC_ATOMIC_BUILTINS)
|
||||
+# elif defined(HAVE_GCC_ATOMIC_BUILTINS) || defined(HAVE_GCC_C11_ATOMICS)
|
||||
# include "gcc_builtins.h"
|
||||
# elif defined(__i386__) || defined(__x86_64__)
|
||||
# include "x86-gcc.h"
|
||||
--- mysys/CMakeLists.txt
|
||||
+++ mysys/CMakeLists.txt
|
||||
@@ -79,6 +79,10 @@ IF(HAVE_BFD_H)
|
||||
TARGET_LINK_LIBRARIES(mysys bfd)
|
||||
ENDIF(HAVE_BFD_H)
|
||||
|
||||
+IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
|
||||
+ TARGET_LINK_LIBRARIES(mysys atomic)
|
||||
+ENDIF()
|
||||
+
|
||||
IF (WIN32)
|
||||
TARGET_LINK_LIBRARIES(mysys IPHLPAPI)
|
||||
ENDIF(WIN32)
|
||||
--- sql/CMakeLists.txt
|
||||
+++ sql/CMakeLists.txt
|
||||
@@ -165,6 +165,10 @@ TARGET_LINK_LIBRARIES(sql ${MYSQLD_STATI
|
||||
${SSL_LIBRARIES}
|
||||
${LIBSYSTEMD})
|
||||
|
||||
+IF(HAVE_GCC_C11_ATOMICS_WITH_LIBATOMIC)
|
||||
+ TARGET_LINK_LIBRARIES(sql atomic)
|
||||
+ENDIF()
|
||||
+
|
||||
IF(WIN32)
|
||||
SET(MYSQLD_SOURCE main.cc nt_servc.cc message.rc)
|
||||
TARGET_LINK_LIBRARIES(sql psapi)
|
|
@ -1,17 +1,126 @@
|
|||
--- ./CMakeLists.txt.orig 2015-09-17 15:47:59.794784111 -0400
|
||||
+++ ./CMakeLists.txt 2015-09-19 19:42:16.751348473 -0400
|
||||
@@ -362,10 +376,10 @@
|
||||
|
||||
CHECK_PCRE()
|
||||
|
||||
Author: Justin Jagieniak <justin@jagieniak.net>, John Zimmermann <me@johnnynator.dev>
|
||||
Date: Fri Apr 11 14:19:00 2021 +0200
|
||||
|
||||
Fix cross-compile patch to consider CMAKE_CROSSCOMPILING_EMULATOR aswell.
|
||||
|
||||
--- CMakeLists.txt.orig 2021-04-11 12:37:42.766483860 +0200
|
||||
+++ CMakeLists.txt 2021-04-11 13:05:49.491976374 +0200
|
||||
@@ -397,7 +397,7 @@
|
||||
|
||||
CHECK_SYSTEMD()
|
||||
|
||||
-IF(CMAKE_CROSSCOMPILING)
|
||||
- SET(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Path to import_executables.cmake from a native build")
|
||||
- INCLUDE(${IMPORT_EXECUTABLES})
|
||||
-ENDIF()
|
||||
+# IF(CMAKE_CROSSCOMPILING)
|
||||
+# SET(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Path to import_executables.cmake from a native build")
|
||||
+# INCLUDE(${IMPORT_EXECUTABLES})
|
||||
+# ENDIF()
|
||||
|
||||
#
|
||||
# Setup maintainer mode options. Platform checks are
|
||||
+IF(CMAKE_CROSSCOMPILING AND NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
|
||||
SET(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Path to import_executables.cmake from a native build")
|
||||
INCLUDE(${IMPORT_EXECUTABLES})
|
||||
ENDIF()
|
||||
@@ -479,7 +479,7 @@
|
||||
ADD_SUBDIRECTORY(support-files)
|
||||
ADD_SUBDIRECTORY(extra/aws_sdk)
|
||||
|
||||
-IF(NOT CMAKE_CROSSCOMPILING)
|
||||
+IF(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
|
||||
SET(EXPORTED comp_err comp_sql factorial)
|
||||
IF(NOT WITHOUT_SERVER)
|
||||
SET(EXPORTED ${EXPORTED} gen_lex_hash gen_lex_token)
|
||||
|
||||
--- configure.cmake.orig 2021-04-11 13:45:39.143733089 +0200
|
||||
+++ configure.cmake 2021-04-11 13:46:06.378730316 +0200
|
||||
@@ -668,7 +668,7 @@
|
||||
" HAVE_PTHREAD_YIELD_ZERO_ARG)
|
||||
|
||||
IF(NOT STACK_DIRECTION)
|
||||
- IF(CMAKE_CROSSCOMPILING)
|
||||
+ IF(CMAKE_CROSSCOMPILING AND NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
|
||||
MESSAGE(FATAL_ERROR
|
||||
"STACK_DIRECTION is not defined. Please specify -DSTACK_DIRECTION=1 "
|
||||
"or -DSTACK_DIRECTION=-1 when calling cmake.")
|
||||
|
||||
--- storage/mroonga/vendor/groonga/CMakeLists.txt.orig 2021-04-11 13:48:22.249716484 +0200
|
||||
+++ storage/mroonga/vendor/groonga/CMakeLists.txt 2021-04-11 13:49:44.050708156 +0200
|
||||
@@ -405,7 +405,7 @@
|
||||
set(MECAB_LIBRARIES libmecab)
|
||||
else()
|
||||
set(GRN_MECAB_CONFIG "mecab-config" CACHE FILEPATH "mecab-config path")
|
||||
- if(NOT CMAKE_CROSSCOMPILING)
|
||||
+ if(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
|
||||
find_program(GRN_MECAB_CONFIG_ABSOLUTE_PATH "${GRN_MECAB_CONFIG}")
|
||||
endif()
|
||||
if(EXISTS "${GRN_MECAB_CONFIG_ABSOLUTE_PATH}")
|
||||
|
||||
--- storage/innobase/innodb.cmake.orig 2021-04-11 13:52:39.129690331 +0200
|
||||
+++ storage/innobase/innodb.cmake 2021-04-11 13:53:03.656687834 +0200
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake)
|
||||
|
||||
-IF(CMAKE_CROSSCOMPILING)
|
||||
+IF(CMAKE_CROSSCOMPILING AND NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
|
||||
# Use CHECK_C_SOURCE_COMPILES instead of CHECK_C_SOURCE_RUNS when
|
||||
# cross-compiling. Not as precise, but usually good enough.
|
||||
# This only make sense for atomic tests in this file, this trick doesn't
|
||||
|
||||
--- sql/CMakeLists.txt.orig 2021-04-11 13:54:43.469677673 +0200
|
||||
+++ sql/CMakeLists.txt 2021-04-11 13:55:46.337671272 +0200
|
||||
@@ -356,7 +356,7 @@
|
||||
COMPILE_FLAGS "-p ORA")
|
||||
ENDIF()
|
||||
|
||||
-IF(NOT CMAKE_CROSSCOMPILING)
|
||||
+IF(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
|
||||
ADD_EXECUTABLE(gen_lex_token gen_lex_token.cc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.hh)
|
||||
ADD_EXECUTABLE(gen_lex_hash gen_lex_hash.cc)
|
||||
@@ -406,7 +406,7 @@
|
||||
)
|
||||
|
||||
# Install initial database (default on windows, optional target elsewhere)
|
||||
-IF(TARGET mariadbd AND NOT CMAKE_CROSSCOMPILING)
|
||||
+IF(TARGET mariadbd AND (NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR))
|
||||
IF(GENERATOR_IS_MULTI_CONFIG)
|
||||
SET (CONFIG_PARAM -DCONFIG=${CMAKE_CFG_INTDIR})
|
||||
ENDIF()
|
||||
|
||||
--- scripts/CMakeLists.txt.orig 2021-04-11 13:57:30.088660710 +0200
|
||||
+++ scripts/CMakeLists.txt 2021-04-11 13:58:12.486656393 +0200
|
||||
@@ -28,14 +28,14 @@
|
||||
)
|
||||
ENDMACRO()
|
||||
|
||||
-IF(NOT CMAKE_CROSSCOMPILING)
|
||||
+IF(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
|
||||
ADD_EXECUTABLE(comp_sql comp_sql.c)
|
||||
TARGET_LINK_LIBRARIES(comp_sql)
|
||||
ENDIF()
|
||||
|
||||
# Build mysql_fix_privilege_tables.sql (concatenate 3 sql scripts)
|
||||
-IF(NOT WIN32 OR CMAKE_CROSSCOMPILING)
|
||||
+IF(NOT WIN32 OR (CMAKE_CROSSCOMPILING AND NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR))
|
||||
FIND_PROGRAM(CAT_EXECUTABLE cat DOC "path to the executable")
|
||||
MARK_AS_ADVANCED(CAT_EXECUTABLE)
|
||||
ENDIF()
|
||||
|
||||
--- extra/CMakeLists.txt.orig 2021-04-11 14:02:55.048627626 +0200
|
||||
+++ extra/CMakeLists.txt 2021-04-11 14:03:24.136624665 +0200
|
||||
@@ -18,7 +18,7 @@
|
||||
# Default install component for the files is Server here
|
||||
SET(MYSQL_INSTALL_COMPONENT Server)
|
||||
|
||||
-IF(NOT CMAKE_CROSSCOMPILING)
|
||||
+IF(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
|
||||
ADD_EXECUTABLE(comp_err comp_err.c)
|
||||
TARGET_LINK_LIBRARIES(comp_err mysys)
|
||||
ENDIF()
|
||||
|
||||
--- dbug/CMakeLists.txt.orig 2021-04-11 14:12:39.744568100 +0200
|
||||
+++ dbug/CMakeLists.txt 2021-04-11 14:13:02.588565774 +0200
|
||||
@@ -25,7 +25,7 @@
|
||||
ADD_EXECUTABLE(tests tests.c)
|
||||
TARGET_LINK_LIBRARIES(tests dbug)
|
||||
|
||||
-IF(NOT CMAKE_CROSSCOMPILING)
|
||||
+IF(NOT CMAKE_CROSSCOMPILING OR DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
|
||||
ADD_EXECUTABLE(factorial my_main.c factorial.c)
|
||||
TARGET_LINK_LIBRARIES(factorial dbug)
|
||||
ENDIF()
|
||||
|
|
|
@ -1,257 +0,0 @@
|
|||
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
|
||||
Date: Thu, 10 Aug 2017 20:40:28 +0200
|
||||
Subject: mips-connect-unaligned
|
||||
|
||||
---
|
||||
storage/connect/valblk.cpp | 41 ++++++++++++++++++-------------------
|
||||
storage/connect/valblk.h | 51 +++++++++++++++++++++++++++++-----------------
|
||||
2 files changed, 52 insertions(+), 40 deletions(-)
|
||||
|
||||
--- storage/connect/valblk.cpp
|
||||
+++ storage/connect/valblk.cpp
|
||||
@@ -268,14 +268,14 @@ bool TYPBLK<TYPE>::Init(PGLOBAL g, bool
|
||||
template <class TYPE>
|
||||
char *TYPBLK<TYPE>::GetCharString(char *p, int n)
|
||||
{
|
||||
- sprintf(p, Fmt, Typp[n]);
|
||||
+ sprintf(p, Fmt, UnalignedRead(n));
|
||||
return p;
|
||||
} // end of GetCharString
|
||||
|
||||
template <>
|
||||
char *TYPBLK<double>::GetCharString(char *p, int n)
|
||||
{
|
||||
- sprintf(p, Fmt, Prec, Typp[n]);
|
||||
+ sprintf(p, Fmt, Prec, UnalignedRead(n));
|
||||
return p;
|
||||
} // end of GetCharString
|
||||
|
||||
@@ -291,7 +291,7 @@ void TYPBLK<TYPE>::SetValue(PVAL valp, i
|
||||
ChkTyp(valp);
|
||||
|
||||
if (!(b = valp->IsNull()))
|
||||
- Typp[n] = GetTypedValue(valp);
|
||||
+ UnalignedWrite(n, GetTypedValue(valp));
|
||||
else
|
||||
Reset(n);
|
||||
|
||||
@@ -353,9 +353,9 @@ void TYPBLK<TYPE>::SetValue(PCSZ p, int
|
||||
ulonglong val = CharToNumber(p, strlen(p), maxval, Unsigned, &minus);
|
||||
|
||||
if (minus && val < maxval)
|
||||
- Typp[n] = (TYPE)(-(signed)val);
|
||||
+ UnalignedWrite(n, (TYPE)(-(signed)val));
|
||||
else
|
||||
- Typp[n] = (TYPE)val;
|
||||
+ UnalignedWrite(n, (TYPE)val);
|
||||
|
||||
SetNull(n, false);
|
||||
} // end of SetValue
|
||||
@@ -398,7 +398,7 @@ void TYPBLK<double>::SetValue(PCSZ p, in
|
||||
throw Type;
|
||||
} // endif Check
|
||||
|
||||
- Typp[n] = atof(p);
|
||||
+ UnalignedWrite(n, atof(p));
|
||||
SetNull(n, false);
|
||||
} // end of SetValue
|
||||
|
||||
@@ -430,7 +430,7 @@ void TYPBLK<TYPE>::SetValue(PVBLK pv, in
|
||||
ChkTyp(pv);
|
||||
|
||||
if (!(b = pv->IsNull(n2) && Nullable))
|
||||
- Typp[n1] = GetTypedValue(pv, n2);
|
||||
+ UnalignedWrite(n1, GetTypedValue(pv, n2));
|
||||
else
|
||||
Reset(n1);
|
||||
|
||||
@@ -481,10 +481,10 @@ void TYPBLK<TYPE>::SetMin(PVAL valp, int
|
||||
{
|
||||
CheckParms(valp, n)
|
||||
TYPE tval = GetTypedValue(valp);
|
||||
- TYPE& tmin = Typp[n];
|
||||
+ TYPE tmin = UnalignedRead(n);
|
||||
|
||||
if (tval < tmin)
|
||||
- tmin = tval;
|
||||
+ UnalignedWrite(n, tval);
|
||||
|
||||
} // end of SetMin
|
||||
|
||||
@@ -496,10 +496,10 @@ void TYPBLK<TYPE>::SetMax(PVAL valp, int
|
||||
{
|
||||
CheckParms(valp, n)
|
||||
TYPE tval = GetTypedValue(valp);
|
||||
- TYPE& tmin = Typp[n];
|
||||
+ TYPE tmin = UnalignedRead(n);
|
||||
|
||||
if (tval > tmin)
|
||||
- tmin = tval;
|
||||
+ UnalignedWrite(n, tval);
|
||||
|
||||
} // end of SetMax
|
||||
|
||||
@@ -513,8 +513,7 @@ void TYPBLK<TYPE>::SetValues(PVBLK pv, i
|
||||
CheckType(pv)
|
||||
TYPE *lp = ((TYPBLK*)pv)->Typp;
|
||||
|
||||
- for (int i = k; i < n; i++) // TODO
|
||||
- Typp[i] = lp[i];
|
||||
+ memcpy(Typp + k, lp + k, sizeof(TYPE) * n);
|
||||
|
||||
} // end of SetValues
|
||||
#endif // 0
|
||||
@@ -525,7 +524,7 @@ void TYPBLK<TYPE>::SetValues(PVBLK pv, i
|
||||
template <class TYPE>
|
||||
void TYPBLK<TYPE>::Move(int i, int j)
|
||||
{
|
||||
- Typp[j] = Typp[i];
|
||||
+ UnalignedWrite(j, UnalignedRead(i));
|
||||
MoveNull(i, j);
|
||||
} // end of Move
|
||||
|
||||
@@ -539,7 +538,7 @@ int TYPBLK<TYPE>::CompVal(PVAL vp, int n
|
||||
ChkIndx(n);
|
||||
ChkTyp(vp);
|
||||
#endif // _DEBUG
|
||||
- TYPE mlv = Typp[n];
|
||||
+ TYPE mlv = UnalignedRead(n);
|
||||
TYPE vlv = GetTypedValue(vp);
|
||||
|
||||
return (vlv > mlv) ? 1 : (vlv < mlv) ? (-1) : 0;
|
||||
@@ -551,8 +550,8 @@ int TYPBLK<TYPE>::CompVal(PVAL vp, int n
|
||||
template <class TYPE>
|
||||
int TYPBLK<TYPE>::CompVal(int i1, int i2)
|
||||
{
|
||||
- TYPE lv1 = Typp[i1];
|
||||
- TYPE lv2 = Typp[i2];
|
||||
+ TYPE lv1 = UnalignedRead(i1);
|
||||
+ TYPE lv2 = UnalignedRead(i2);
|
||||
|
||||
return (lv1 > lv2) ? 1 : (lv1 < lv2) ? (-1) : 0;
|
||||
} // end of CompVal
|
||||
@@ -589,7 +588,7 @@ int TYPBLK<TYPE>::Find(PVAL vp)
|
||||
TYPE n = GetTypedValue(vp);
|
||||
|
||||
for (i = 0; i < Nval; i++)
|
||||
- if (n == Typp[i])
|
||||
+ if (n == UnalignedRead(i))
|
||||
break;
|
||||
|
||||
return (i < Nval) ? i : (-1);
|
||||
@@ -605,7 +604,7 @@ int TYPBLK<TYPE>::GetMaxLength(void)
|
||||
int i, n, m;
|
||||
|
||||
for (i = n = 0; i < Nval; i++) {
|
||||
- m = sprintf(buf, Fmt, Typp[i]);
|
||||
+ m = sprintf(buf, Fmt, UnalignedRead(i));
|
||||
n = MY_MAX(n, m);
|
||||
} // endfor i
|
||||
|
||||
@@ -1335,7 +1334,7 @@ char *DATBLK::GetCharString(char *p, int
|
||||
char *vp;
|
||||
|
||||
if (Dvalp) {
|
||||
- Dvalp->SetValue(Typp[n]);
|
||||
+ Dvalp->SetValue(UnalignedRead(n));
|
||||
vp = Dvalp->GetCharString(p);
|
||||
} else
|
||||
vp = TYPBLK<int>::GetCharString(p, n);
|
||||
@@ -1351,7 +1350,7 @@ void DATBLK::SetValue(PCSZ p, int n)
|
||||
if (Dvalp) {
|
||||
// Decode the string according to format
|
||||
Dvalp->SetValue_psz(p);
|
||||
- Typp[n] = Dvalp->GetIntValue();
|
||||
+ UnalignedWrite(n, Dvalp->GetIntValue());
|
||||
} else
|
||||
TYPBLK<int>::SetValue(p, n);
|
||||
|
||||
--- storage/connect/valblk.h
|
||||
+++ storage/connect/valblk.h
|
||||
@@ -139,6 +139,7 @@ class VALBLK : public BLOCK {
|
||||
int Prec; // Precision of float values
|
||||
}; // end of class VALBLK
|
||||
|
||||
+
|
||||
/***********************************************************************/
|
||||
/* Class TYPBLK: represents a block of typed values. */
|
||||
/***********************************************************************/
|
||||
@@ -151,40 +152,41 @@ class TYPBLK : public VALBLK {
|
||||
// Implementation
|
||||
virtual bool Init(PGLOBAL g, bool check);
|
||||
virtual int GetVlen(void) {return sizeof(TYPE);}
|
||||
- virtual char GetTinyValue(int n) {return (char)Typp[n];}
|
||||
- virtual uchar GetUTinyValue(int n) {return (uchar)Typp[n];}
|
||||
- virtual short GetShortValue(int n) {return (short)Typp[n];}
|
||||
- virtual ushort GetUShortValue(int n) {return (ushort)Typp[n];}
|
||||
- virtual int GetIntValue(int n) {return (int)Typp[n];}
|
||||
- virtual uint GetUIntValue(int n) {return (uint)Typp[n];}
|
||||
- virtual longlong GetBigintValue(int n) {return (longlong)Typp[n];}
|
||||
- virtual ulonglong GetUBigintValue(int n) {return (ulonglong)Typp[n];}
|
||||
- virtual double GetFloatValue(int n) {return (double)Typp[n];}
|
||||
+
|
||||
+ virtual char GetTinyValue(int n) {return (char)UnalignedRead(n);}
|
||||
+ virtual uchar GetUTinyValue(int n) {return (uchar)UnalignedRead(n);}
|
||||
+ virtual short GetShortValue(int n) {return (short)UnalignedRead(n);}
|
||||
+ virtual ushort GetUShortValue(int n) {return (ushort)UnalignedRead(n);}
|
||||
+ virtual int GetIntValue(int n) {return (int)UnalignedRead(n);}
|
||||
+ virtual uint GetUIntValue(int n) {return (uint)UnalignedRead(n);}
|
||||
+ virtual longlong GetBigintValue(int n) {return (longlong)UnalignedRead(n);}
|
||||
+ virtual ulonglong GetUBigintValue(int n) {return (ulonglong)UnalignedRead(n);}
|
||||
+ virtual double GetFloatValue(int n) {return (double)UnalignedRead(n);}
|
||||
virtual char *GetCharString(char *p, int n);
|
||||
- virtual void Reset(int n) {Typp[n] = 0;}
|
||||
+ virtual void Reset(int n) {UnalignedWrite(n, 0);}
|
||||
|
||||
// Methods
|
||||
using VALBLK::SetValue;
|
||||
virtual void SetValue(PCSZ sp, int n);
|
||||
virtual void SetValue(const char *sp, uint len, int n);
|
||||
virtual void SetValue(short sval, int n)
|
||||
- {Typp[n] = (TYPE)sval; SetNull(n, false);}
|
||||
+ {UnalignedWrite(n, (TYPE)sval); SetNull(n, false);}
|
||||
virtual void SetValue(ushort sval, int n)
|
||||
- {Typp[n] = (TYPE)sval; SetNull(n, false);}
|
||||
+ {UnalignedWrite(n, (TYPE)sval); SetNull(n, false);}
|
||||
virtual void SetValue(int lval, int n)
|
||||
- {Typp[n] = (TYPE)lval; SetNull(n, false);}
|
||||
+ {UnalignedWrite(n, (TYPE)lval); SetNull(n, false);}
|
||||
virtual void SetValue(uint lval, int n)
|
||||
- {Typp[n] = (TYPE)lval; SetNull(n, false);}
|
||||
+ {UnalignedWrite(n, (TYPE)lval); SetNull(n, false);}
|
||||
virtual void SetValue(longlong lval, int n)
|
||||
- {Typp[n] = (TYPE)lval; SetNull(n, false);}
|
||||
+ {UnalignedWrite(n, (TYPE)lval); SetNull(n, false);}
|
||||
virtual void SetValue(ulonglong lval, int n)
|
||||
- {Typp[n] = (TYPE)lval; SetNull(n, false);}
|
||||
+ {UnalignedWrite(n, (TYPE)lval); SetNull(n, false);}
|
||||
virtual void SetValue(double fval, int n)
|
||||
- {Typp[n] = (TYPE)fval; SetNull(n, false);}
|
||||
+ {UnalignedWrite(n, (TYPE)fval); SetNull(n, false);}
|
||||
virtual void SetValue(char cval, int n)
|
||||
- {Typp[n] = (TYPE)cval; SetNull(n, false);}
|
||||
+ {UnalignedWrite(n, (TYPE)cval); SetNull(n, false);}
|
||||
virtual void SetValue(uchar cval, int n)
|
||||
- {Typp[n] = (TYPE)cval; SetNull(n, false);}
|
||||
+ {UnalignedWrite(n, (TYPE)cval); SetNull(n, false);}
|
||||
virtual void SetValue(PVAL valp, int n);
|
||||
virtual void SetValue(PVBLK pv, int n1, int n2);
|
||||
virtual void SetMin(PVAL valp, int n);
|
||||
@@ -206,6 +208,17 @@ class TYPBLK : public VALBLK {
|
||||
// Members
|
||||
TYPE* const &Typp;
|
||||
const char *Fmt;
|
||||
+
|
||||
+ // Unaligned access
|
||||
+ TYPE UnalignedRead(int n) const {
|
||||
+ TYPE result;
|
||||
+ memcpy(&result, Typp + n, sizeof(TYPE));
|
||||
+ return result;
|
||||
+ }
|
||||
+
|
||||
+ void UnalignedWrite(int n, TYPE value) {
|
||||
+ memcpy(Typp + n, &value, sizeof(TYPE));
|
||||
+ }
|
||||
}; // end of class TYPBLK
|
||||
|
||||
/***********************************************************************/
|
|
@ -1,20 +0,0 @@
|
|||
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
|
||||
Date: Thu, 10 Aug 2017 20:40:29 +0200
|
||||
Subject: mips-innobase-atomic
|
||||
|
||||
---
|
||||
storage/innobase/include/os0sync.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git storage/innobase/include/os0sync.h storage/innobase/include/os0sync.h
|
||||
index bb225c5..6520237 100644
|
||||
--- storage/innobase/include/os0sync.h
|
||||
+++ storage/innobase/include/os0sync.h
|
||||
@@ -37,6 +37,7 @@ Created 9/6/1995 Heikki Tuuri
|
||||
|
||||
#include "univ.i"
|
||||
#include "ut0lst.h"
|
||||
+#include "sync0types.h"
|
||||
|
||||
/** CPU cache line size */
|
||||
#ifdef __powerpc__
|
|
@ -1,23 +0,0 @@
|
|||
From: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
|
||||
Date: Thu, 10 Aug 2017 20:40:29 +0200
|
||||
Subject: mips-machine
|
||||
|
||||
---
|
||||
cmake/package_name.cmake | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git cmake/package_name.cmake cmake/package_name.cmake
|
||||
index 4930a6b..7681f78 100644
|
||||
--- cmake/package_name.cmake
|
||||
+++ cmake/package_name.cmake
|
||||
@@ -34,6 +34,10 @@ IF(NOT VERSION)
|
||||
SET(DEFAULT_MACHINE "mips")
|
||||
ENDIF()
|
||||
|
||||
+ IF(NOT 64BIT AND CMAKE_SYSTEM_PROCESSOR MATCHES "^mips64")
|
||||
+ SET(DEFAULT_MACHINE "mips")
|
||||
+ ENDIF()
|
||||
+
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
SET(NEED_DASH_BETWEEN_PLATFORM_AND_MACHINE 0)
|
||||
SET(DEFAULT_PLATFORM "win")
|
|
@ -1,26 +0,0 @@
|
|||
This header does not exist on musl, but there has been a
|
||||
builtin for this in gcc for ages, so just use that instead.
|
||||
|
||||
--- storage/innobase/include/ut0ut.h
|
||||
+++ storage/innobase/include/ut0ut.h
|
||||
@@ -89,8 +89,7 @@ struct ut_when_dtor {
|
||||
independent way by using YieldProcessor. */
|
||||
# define UT_RELAX_CPU() YieldProcessor()
|
||||
# elif defined(__powerpc__)
|
||||
-#include <sys/platform/ppc.h>
|
||||
-# define UT_RELAX_CPU() __ppc_get_timebase()
|
||||
+# define UT_RELAX_CPU() __builtin_ppc_get_timebase()
|
||||
# else
|
||||
# define UT_RELAX_CPU() ((void)0) /* avoid warning for an empty statement */
|
||||
# endif
|
||||
--- storage/xtradb/include/ut0ut.h
|
||||
+++ storage/xtradb/include/ut0ut.h
|
||||
@@ -86,6 +86,8 @@
|
||||
# elif defined(__powerpc__) && defined __GLIBC__
|
||||
#include <sys/platform/ppc.h>
|
||||
# define UT_RELAX_CPU() __ppc_get_timebase()
|
||||
+# elif defined(__powerpc__)
|
||||
+# define UT_RELAX_CPU() __builtin_ppc_get_timebase()
|
||||
# else
|
||||
# define UT_RELAX_CPU() ((void)0) /* avoid warning for an empty statement */
|
||||
# endif
|
|
@ -1,11 +0,0 @@
|
|||
--- ./include/my_context.h.orig 2016-02-24 09:25:21.000000000 -0500
|
||||
+++ ./include/my_context.h 2016-02-28 15:14:29.098180308 -0500
|
||||
@@ -31,7 +31,7 @@
|
||||
#define MY_CONTEXT_USE_X86_64_GCC_ASM
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 3 && defined(__i386__)
|
||||
#define MY_CONTEXT_USE_I386_GCC_ASM
|
||||
-#elif defined(HAVE_UCONTEXT_H)
|
||||
+#elif defined (__GLIBC__) && defined(HAVE_UCONTEXT_H)
|
||||
#define MY_CONTEXT_USE_UCONTEXT
|
||||
#else
|
||||
#define MY_CONTEXT_DISABLE
|
|
@ -1,57 +0,0 @@
|
|||
From 9ee82c476fcd5005d3ec1b6282464d9cc98d3726 Mon Sep 17 00:00:00 2001
|
||||
From: q66 <daniel@octaforge.org>
|
||||
Date: Thu, 11 Feb 2021 14:24:44 +0100
|
||||
Subject: [PATCH] fix build on ppcle
|
||||
|
||||
---
|
||||
storage/innobase/ut/ut0crc32.cc | 4 ++--
|
||||
storage/xtradb/ut/ut0crc32.cc | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git storage/innobase/ut/ut0crc32.cc storage/innobase/ut/ut0crc32.cc
|
||||
index 4d2d311..897c23e 100644
|
||||
--- storage/innobase/ut/ut0crc32.cc
|
||||
+++ storage/innobase/ut/ut0crc32.cc
|
||||
@@ -194,7 +194,7 @@ ut_crc32_power8(
|
||||
const byte* buf, /*!< in: data over which to calculate CRC32 */
|
||||
ulint len) /*!< in: data length */
|
||||
{
|
||||
-#if defined(__powerpc__) && !defined(WORDS_BIGENDIAN)
|
||||
+#if defined(__powerpc64__) && !defined(WORDS_BIGENDIAN)
|
||||
return crc32_vpmsum(0, buf, len);
|
||||
#else
|
||||
ut_error;
|
||||
@@ -319,7 +319,7 @@ ut_crc32_init()
|
||||
ut_crc32_sse2_enabled = (features_ecx >> 20) & 1;
|
||||
#endif /* defined(__GNUC__) && defined(__x86_64__) */
|
||||
|
||||
-#if defined(__linux__) && defined(__powerpc__) && defined(AT_HWCAP2) \
|
||||
+#if defined(__linux__) && defined(__powerpc64__) && defined(AT_HWCAP2) \
|
||||
&& !defined(WORDS_BIGENDIAN)
|
||||
if (getauxval(AT_HWCAP2) & PPC_FEATURE2_ARCH_2_07)
|
||||
ut_crc32_power8_enabled = true;
|
||||
diff --git storage/xtradb/ut/ut0crc32.cc storage/xtradb/ut/ut0crc32.cc
|
||||
index 4ace913..e3526e4 100644
|
||||
--- storage/xtradb/ut/ut0crc32.cc
|
||||
+++ storage/xtradb/ut/ut0crc32.cc
|
||||
@@ -194,7 +194,7 @@ ut_crc32_power8(
|
||||
const byte* buf, /*!< in: data over which to calculate CRC32 */
|
||||
ulint len) /*!< in: data length */
|
||||
{
|
||||
-#if defined(__powerpc__) && !defined(WORDS_BIGENDIAN)
|
||||
+#if defined(__powerpc64__) && !defined(WORDS_BIGENDIAN)
|
||||
return crc32_vpmsum(0, buf, len);
|
||||
#else
|
||||
ut_error;
|
||||
@@ -319,7 +319,7 @@ ut_crc32_init()
|
||||
ut_crc32_sse2_enabled = (features_ecx >> 20) & 1;
|
||||
#endif /* defined(__GNUC__) && defined(__x86_64__) */
|
||||
|
||||
-#if defined(__linux__) && defined(__powerpc__) && defined(AT_HWCAP2) \
|
||||
+#if defined(__linux__) && defined(__powerpc64__) && defined(AT_HWCAP2) \
|
||||
&& !defined(WORDS_BIGENDIAN)
|
||||
if (getauxval(AT_HWCAP2) & PPC_FEATURE2_ARCH_2_07)
|
||||
ut_crc32_power8_enabled = true;
|
||||
--
|
||||
2.30.0
|
||||
|
|
@ -1,69 +1,59 @@
|
|||
# Template file for 'mariadb'
|
||||
pkgname=mariadb
|
||||
version=10.1.48
|
||||
revision=2
|
||||
version=10.5.9
|
||||
revision=1
|
||||
build_style=cmake
|
||||
configure_args="-DMYSQL_DATADIR=/var/lib/mysql
|
||||
-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock -DDEFAULT_CHARSET=utf8
|
||||
-DDEFAULT_COLLATION=utf8_general_ci -DENABLED_LOCAL_INFILE=ON
|
||||
-DINSTALL_INFODIR=share/mysql/docs -DINSTALL_MANDIR=share/man
|
||||
-DINSTALL_PLUGINDIR=lib/mysql/plugin -DINSTALL_SCRIPTDIR=bin
|
||||
-DINSTALL_INCLUDEDIR=include/mysql -DINSTALL_DOCREADMEDIR=share/mysql
|
||||
-DINSTALL_SUPPORTFILESDIR=share/mysql -DINSTALL_MYSQLSHAREDIR=share/mysql
|
||||
-DINSTALL_DOCDIR=share/mysql/docs -DINSTALL_SHAREDIR=share/mysql
|
||||
-DWITH_ZLIB=system -DWITH_READLINE=ON -DWITH_SSL=bundled
|
||||
-DWITH_EMBEDDED_SERVER=ON -DWITH_ARCHIVE_STORAGE_ENGINE=1 -DPLUGIN_TOKUDB=NO
|
||||
-DWITH_BLACKHOLE_STORAGE_ENGINE=1 -DWITH_PARTITION_STORAGE_ENGINE=1
|
||||
-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 -DWITHOUT_FEDERATED_STORAGE_ENGINE=1
|
||||
-DWITH_EXTRA_CHARSETS=complex -DWITH_LIBWRAP=OFF -DSTACK_DIRECTION=1
|
||||
-DWITHOUT_PBXT_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1"
|
||||
hostmakedepends="perl bison ncurses-devel openssl-devel libatomic-devel
|
||||
pkg-config"
|
||||
makedepends="zlib-devel ncurses-devel openssl-devel readline-devel pcre-devel
|
||||
libatomic-devel"
|
||||
build_helper=qemu
|
||||
configure_args="-DBUILD_CONFIG=mysql_release
|
||||
-DMYSQL_DATADIR=/var/lib/mysql -DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock
|
||||
-DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci
|
||||
-DENABLED_LOCAL_INFILE=ON -DINSTALL_INFODIR=share/mysql/docs
|
||||
-DINSTALL_MANDIR=share/man -DINSTALL_PLUGINDIR=lib/mysql/plugin
|
||||
-DINSTALL_SCRIPTDIR=bin -DINSTALL_INCLUDEDIR=include/mysql
|
||||
-DINSTALL_DOCREADMEDIR=share/mysql -DINSTALL_SUPPORTFILESDIR=share/mysql
|
||||
-DINSTALL_MYSQLSHAREDIR=share/mysql -DINSTALL_DOCDIR=share/mysql/docs
|
||||
-DINSTALL_SHAREDIR=share/mysql -DSTACK_DIRECTION=1
|
||||
-DWITH_ZLIB=system -DWITH_SSL=system -DWITH_LIBARCHIVE=system
|
||||
-DWITH_EMBEDDED_SERVER=ON -DPLUGIN_TOKUDB=NO -DPLUGIN_BLACKHOLE=YES
|
||||
-DPLUGIN_PARTITION=YES -DWITH_EXTRA_CHARSETS=complex -DWITH_LIBWRAP=OFF
|
||||
-DWITH_READLINE=ON -DWITH_SYSTEMD=no -DWITH_PCRE=system"
|
||||
hostmakedepends="bison perl flex pkg-config git"
|
||||
makedepends="ncurses-devel gnutls-devel libaio-devel boost-devel pam-devel zlib-devel
|
||||
pcre2-devel libatomic-devel"
|
||||
depends="mariadb-client"
|
||||
checkdepends="perl"
|
||||
short_desc="Fast SQL database server, drop-in replacement for MySQL"
|
||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||
maintainer="Justin Jagieniak <justin@jagieniak.net>"
|
||||
license="GPL-2.0-only"
|
||||
homepage="https://mariadb.org/"
|
||||
distfiles="http://archive.mariadb.org/$pkgname-$version/source/$pkgname-$version.tar.gz"
|
||||
checksum=069d58b1e2c06bb1e6c31249eda34138f41fb8ae3dec7ecaeba8035812c87cf9
|
||||
homepage="https://mariadb.com"
|
||||
distfiles="http://archive.mariadb.org/$pkgname-$version/source/${pkgname}-${version}.tar.gz"
|
||||
checksum=40ab19aeb8de141fdc188cf2251213c9e7351bee4d0cd29db704fae68d1068cf
|
||||
lib32disabled=yes
|
||||
provides="mysql-${version}_${revision}"
|
||||
replaces="mysql>=0"
|
||||
conf_files="/etc/mysql/my.cnf"
|
||||
system_accounts="mysql"
|
||||
mysql_homedir="/var/lib/mysql"
|
||||
CFLAGS="-w -fcommon -DDBUG_OFF=1"
|
||||
CXXFLAGS="-DDBUG_OFF=1"
|
||||
make_dirs="/var/lib/mysql 0700 mysql mysql"
|
||||
|
||||
pre_configure() {
|
||||
# We need some host binaries before starting cross compilation.
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
mkdir -p build.native
|
||||
# XXX still broken: jemalloc configure execs host bins.
|
||||
CC= CXX= CPP= LD= AR= AS= RANLIB= CFLAGS= CXXFLAGS= LDFLAGS= \
|
||||
cmake -S . -B build.native
|
||||
make -C build.native comp_err comp_sql gen_lex_hash gen_lex_token
|
||||
fi
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
*-musl)
|
||||
patch -p0 -i ${FILESDIR}/musl-have-stacktrace.patch
|
||||
patch -p0 -i ${FILESDIR}/musl-ppc-remove-glibc-dep.patch
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
pre_build() {
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
# CMake complains if those binaries ain't in build
|
||||
cp build.native/extra/comp_err ${wrksrc}/extra
|
||||
cp build.native/extra/comp_err ${wrksrc}/build/extra
|
||||
cp build.native/scripts/comp_sql ${wrksrc}/scripts
|
||||
cp build.native/scripts/comp_sql ${wrksrc}/build/scripts
|
||||
cp build.native/sql/gen_lex_hash ${wrksrc}/sql
|
||||
cp build.native/sql/gen_lex_hash ${wrksrc}/build/sql
|
||||
cp build.native/sql/gen_lex_token ${wrksrc}/sql
|
||||
cp build.native/sql/gen_lex_token ${wrksrc}/build/sql
|
||||
export PATH=${PATH}:${wrksrc}/extra:${wrksrc}/scripts:${wrksrc}/sql
|
||||
do_check() {
|
||||
cd build
|
||||
if [ "$XBPS_CHECK_PKGS" = full ]; then
|
||||
if [ ! "$CROSS_BUILD" ]; then
|
||||
mem="--mem"
|
||||
fi
|
||||
vtargetrun ${XBPS_CROSS_BASE}/usr/bin/perl mysql-test/mtr --parallel=${XBPS_MAKEJOBS} ${mem} --force --max-test-fail=40
|
||||
else
|
||||
CTEST_OUTPUT_ON_FAILURE=TRUE ctest -E "(conc336|bulk1|performance|basic-t|fetch|charset|logs|cursor|errors|view|ps|ps_bugs|sp|result|connection|misc|ps_new|thread|features-10_2|async|test-connect)"
|
||||
fi
|
||||
export LD_LIBRARY_PATH=${wrksrc}/build/storage/tokudb/ft-index/portability
|
||||
# It seems that there is no dependency listed in cmake on them, but they are still needed
|
||||
ninja -C build sql/sql_yacc.cc sql/lex_hash.h
|
||||
}
|
||||
|
||||
post_install() {
|
||||
|
@ -72,8 +62,10 @@ post_install() {
|
|||
rm -f ${DESTDIR}/usr/share/man/man1/mysql-test-run.pl.1
|
||||
rm -f ${DESTDIR}/usr/bin/mytop
|
||||
|
||||
# Configuration file.
|
||||
install -Dm644 ${DESTDIR}/usr/share/mysql/my-medium.cnf ${DESTDIR}/etc/mysql/my.cnf
|
||||
vmkdir usr/lib/security
|
||||
vmkdir etc/security
|
||||
mv ${DESTDIR}/usr/share/pam_user_map.so ${DESTDIR}/usr/lib/security/
|
||||
mv ${DESTDIR}/usr/share/user_map.conf etc/security/
|
||||
|
||||
vsv mysqld
|
||||
}
|
||||
|
@ -83,8 +75,7 @@ libmariadbclient_package() {
|
|||
provides="libmysqlclient-${version}_${revision}"
|
||||
replaces="libmysqlclient>=0"
|
||||
pkg_install() {
|
||||
vmove "usr/lib/libmysqld.so.*"
|
||||
vmove "usr/lib/libmysqlclient*.so.*"
|
||||
vmove "usr/lib/libmariadb*.so.*"
|
||||
}
|
||||
}
|
||||
libmariadbclient-devel_package() {
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
site="https://downloads.mariadb.org/mariadb/"
|
||||
pattern="/mariadb/\K[\d.]+(?=/)"
|
Loading…
Reference in a new issue