summaryrefslogtreecommitdiff
path: root/configure.cmake
diff options
context:
space:
mode:
authorTzachi Zidenberg <tsahee@amazon.com>2020-07-05 15:21:43 +0300
committerTzachi Zidenberg <tsahee@amazon.com>2020-07-23 15:08:54 +0300
commitf843e215f3f640de377d8fd60e85bb372fb138fd (patch)
treee408f53e303f822aa643340d80ab79bb37bbd5dd /configure.cmake
parentc76b45a5242f50d00c16f0bbf1dbecd4e359e02c (diff)
downloadmariadb-git-f843e215f3f640de377d8fd60e85bb372fb138fd.tar.gz
aarch64: use compiler flag outline-atomics if available
outline-atomics compilation flag changes behaviour of builtin_atomics, by adding runtime detection of LSE atomics. If these are supported, they will be used. This gains LSE atomics use without hurting compatibility with older aarch64 machines.
Diffstat (limited to 'configure.cmake')
-rw-r--r--configure.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.cmake b/configure.cmake
index 43c32fda0ee..5dd45a6b05d 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -69,6 +69,11 @@ IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "i686" AND CMAKE_COMPILER_IS_GNUCC AND
SET(PLUGIN_QUERY_RESPONSE_TIME NO CACHE BOOL "Disabled, gcc is too old")
ENDIF()
+# use runtime atomic-support detection in aarch64
+IF(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
+ MY_CHECK_AND_SET_COMPILER_FLAG("-moutline-atomics")
+ENDIF()
+
IF(WITHOUT_DYNAMIC_PLUGINS)
MESSAGE("Dynamic plugins are disabled.")
ENDIF(WITHOUT_DYNAMIC_PLUGINS)