about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/sql/percona-server/no-force-outline-atomics.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/sql/percona-server/no-force-outline-atomics.patch')
-rw-r--r--nixpkgs/pkgs/servers/sql/percona-server/no-force-outline-atomics.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/sql/percona-server/no-force-outline-atomics.patch b/nixpkgs/pkgs/servers/sql/percona-server/no-force-outline-atomics.patch
new file mode 100644
index 000000000000..a716a4f7f481
--- /dev/null
+++ b/nixpkgs/pkgs/servers/sql/percona-server/no-force-outline-atomics.patch
@@ -0,0 +1,24 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 727d66011f9..acae1aada57 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1338,19 +1338,6 @@ IF(UNIX AND MY_COMPILER_IS_GNU_OR_CLANG
+   ENDIF()
+ ENDIF()
+ 
+-# For aarch64 some sub-architectures support LSE atomics and some don't. Thus,
+-# compiling for the common denominator (-march=armv8-a) means LSE is not used.
+-# The -moutline-atomics switch enables run-time detection of LSE support.
+-# There are compilers (gcc 9.3.1 for example) which support this switch, but
+-# do not enable it by default, even though it seems to help. So, we force it.
+-IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
+-  MY_CHECK_CXX_COMPILER_FLAG( "-moutline-atomics" HAVE_OUTLINE_ATOMICS)
+-  IF(HAVE_OUTLINE_ATOMICS)
+-    STRING_APPEND(CMAKE_C_FLAGS   " -moutline-atomics")
+-    STRING_APPEND(CMAKE_CXX_FLAGS " -moutline-atomics")
+-  ENDIF()
+-ENDIF()
+-
+ IF(LINUX)
+   OPTION(LINK_RANDOMIZE "Randomize the order of all symbols in the binary" OFF)
+   SET(LINK_RANDOMIZE_SEED "mysql"