summaryrefslogtreecommitdiff
path: root/cmake/build_configurations
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2015-11-27 13:58:30 +0400
committerSergey Vojtovich <svoj@mariadb.org>2015-12-09 16:52:12 +0400
commit218da97d5d8e42de68d38aee25d5367569a35c4c (patch)
tree1c21d2fc0917878d0490e0e765ed34ea7df20e2a /cmake/build_configurations
parentf3e5329846a99339d8b69e27b2470956bcf1ed29 (diff)
downloadmariadb-git-218da97d5d8e42de68d38aee25d5367569a35c4c.tar.gz
MDEV-9172 - Analyze patches for IBM System z
Extended my_timer_cycles() to support s390. Some compiler tunings for RHEL/SLES RPM packages on s390.
Diffstat (limited to 'cmake/build_configurations')
-rw-r--r--cmake/build_configurations/mysql_release.cmake19
1 files changed, 19 insertions, 0 deletions
diff --git a/cmake/build_configurations/mysql_release.cmake b/cmake/build_configurations/mysql_release.cmake
index 8c79ec2dea2..75ce57e45e0 100644
--- a/cmake/build_configurations/mysql_release.cmake
+++ b/cmake/build_configurations/mysql_release.cmake
@@ -154,6 +154,25 @@ IF(UNIX)
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}")
ENDIF()
+ # IBM Z flags
+ IF(CMAKE_SYSTEM_PROCESSOR MATCHES "s390x")
+ IF(RPM MATCHES "(rhel|centos)6" OR RPM MATCHES "(suse|sles)11")
+ SET(z_flags "-funroll-loops -march=z9-109 -mtune=z10 ")
+ ELSEIF(RPM MATCHES "(rhel|centos)7" OR RPM MATCHES "(suse|sles)12")
+ SET(z_flags "-funroll-loops -march=z196 -mtune=zEC12 ")
+ ELSE()
+ SET(z_flags "")
+ ENDIF()
+
+ IF(CMAKE_COMPILER_IS_GNUCC)
+ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${z_flags}${CMAKE_C_FLAGS_RELWITHDEBINFO}")
+ ENDIF()
+ IF(CMAKE_COMPILER_IS_GNUCXX)
+ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${z_flags}${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
+ ENDIF()
+ UNSET(z_flags)
+ ENDIF()
+
# HPUX flags
IF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
IF(CMAKE_C_COMPILER_ID MATCHES "HP")