mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-07 23:53:51 +02:00
parent
a16b525cdb
commit
5ab3307fcb
4 changed files with 5 additions and 133 deletions
|
@ -1,108 +0,0 @@
|
||||||
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>
|
|
||||||
|
|
||||||
--- a/configure.cmake
|
|
||||||
+++ b/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)
|
|
||||||
--- a/mysys/CMakeLists.txt
|
|
||||||
+++ b/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)
|
|
||||||
--- a/sql/CMakeLists.txt
|
|
||||||
+++ b/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
|
|
||||||
--- a/storage/rocksdb/build_rocksdb.cmake
|
|
||||||
+++ b/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,6 +1,6 @@
|
||||||
--- a/cmake/install_layout.cmake
|
--- a/cmake/install_layout.cmake
|
||||||
+++ b/cmake/install_layout.cmake
|
+++ b/cmake/install_layout.cmake
|
||||||
@@ -88,7 +88,7 @@
|
@@ -86,7 +86,7 @@ IF(UNIX)
|
||||||
ELSEIF(INSTALL_LAYOUT MATCHES "SVR4")
|
ELSEIF(INSTALL_LAYOUT MATCHES "SVR4")
|
||||||
SET(default_prefix "/opt/mysql/mysql")
|
SET(default_prefix "/opt/mysql/mysql")
|
||||||
ELSE()
|
ELSE()
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
SET(CMAKE_INSTALL_PREFIX ${default_prefix}
|
SET(CMAKE_INSTALL_PREFIX ${default_prefix}
|
||||||
--- a/scripts/CMakeLists.txt
|
--- a/scripts/CMakeLists.txt
|
||||||
+++ b/scripts/CMakeLists.txt
|
+++ b/scripts/CMakeLists.txt
|
||||||
@@ -181,7 +181,7 @@
|
@@ -182,7 +182,7 @@ ENDIF(UNIX)
|
||||||
# the documentation, so better not change this.
|
# the documentation, so better not change this.
|
||||||
|
|
||||||
IF(INSTALL_LAYOUT MATCHES "STANDALONE")
|
IF(INSTALL_LAYOUT MATCHES "STANDALONE")
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
Forwarded: No, but should be
|
|
||||||
Subject: Revert upstream "MDEV-24630: MY_RELAX_CPU assembly instruction upgrade"
|
|
||||||
Description:
|
|
||||||
It was noticed that MariaDB 10.5.10 regressed and no longer built on armhf.
|
|
||||||
For details see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=988629
|
|
||||||
Reverting the upstream commit
|
|
||||||
https://github.com/MariaDB/server/commit/76d2846a71a155ee2861fd52e6635e35490a9dd1
|
|
||||||
is likely to fix it and make armhf build again.
|
|
||||||
|
|
||||||
--- a/include/my_cpu.h
|
|
||||||
+++ b/include/my_cpu.h
|
|
||||||
@@ -84,7 +84,7 @@ static inline void MY_RELAX_CPU(void)
|
|
||||||
__ppc_get_timebase();
|
|
||||||
#elif defined __GNUC__ && (defined __arm__ || defined __aarch64__)
|
|
||||||
/* Mainly, prevent the compiler from optimizing away delay loops */
|
|
||||||
- __asm__ __volatile__ ("isb":::"memory");
|
|
||||||
+ __asm__ __volatile__ ("":::"memory");
|
|
||||||
#else
|
|
||||||
int32 var, oldval = 0;
|
|
||||||
my_atomic_cas32_strong_explicit(&var, &oldval, 1, MY_MEMORY_ORDER_RELAXED,
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'mariadb'
|
# Template file for 'mariadb'
|
||||||
pkgname=mariadb
|
pkgname=mariadb
|
||||||
version=10.5.10
|
version=10.5.22
|
||||||
revision=6
|
revision=1
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
build_helper=qemu
|
build_helper=qemu
|
||||||
configure_args="-DBUILD_CONFIG=mysql_release
|
configure_args="-DBUILD_CONFIG=mysql_release
|
||||||
|
@ -27,7 +27,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
|
||||||
license="GPL-2.0-only"
|
license="GPL-2.0-only"
|
||||||
homepage="https://mariadb.com"
|
homepage="https://mariadb.com"
|
||||||
distfiles="http://archive.mariadb.org/$pkgname-$version/source/${pkgname}-${version}.tar.gz"
|
distfiles="http://archive.mariadb.org/$pkgname-$version/source/${pkgname}-${version}.tar.gz"
|
||||||
checksum=a5ff32f9fcaaf26bf5cba94accc7b246d2d5eb75710d027e40122df6bac0babb
|
checksum=3e2386bb5ee25a8ddcd21cffc48c76097e5ca41a6e4a098f6b2ee4012b0d638e
|
||||||
lib32disabled=yes
|
lib32disabled=yes
|
||||||
provides="mysql-${version}_${revision}"
|
provides="mysql-${version}_${revision}"
|
||||||
replaces="mysql>=0"
|
replaces="mysql>=0"
|
||||||
|
|
Loading…
Add table
Reference in a new issue