summaryrefslogtreecommitdiff
path: root/mysys/CMakeLists.txt
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-06-28 12:52:13 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-06-28 19:19:31 +0300
commit5e929ee8a0487f8929386031e84b1884f503eb48 (patch)
tree5cf8660a940742890a3f3ccc3ae3cc5e7c14e1ad /mysys/CMakeLists.txt
parent1635ea9474dc84d1e9a8f8dd6f6cce1c47473b5c (diff)
downloadmariadb-git-5e929ee8a0487f8929386031e84b1884f503eb48.tar.gz
MDEV-19845: Define my_timer_cycles() inline
On clang, use __builtin_readcyclecounter() when available. Hinted by Sergey Vojtovich. (This may lead to runtime failure on ARM systems. The hardware should be available on ARMv8 (AArch64), but access to it may require special privileges.) We remove support for the proprietary Sun Microsystems compiler, and rely on clang or the __GNUC__ assembler syntax instead. For now, we retain support for IA-64 (Itanium) and 32-bit SPARC, even though those platforms are likely no longer widely used. We remove support for clock_gettime(CLOCK_SGI_CYCLE), because Silicon Graphics ceased supporting IRIX in December 2013. This was the only cycle timer interface available for MIPS. On PowerPC, we rely on the GCC 4.8 __builtin_ppc_get_timebase() (or clang __builtin_readcyclecounter()), which should be equivalent to the old assembler code on both 64-bit and 32-bit targets.
Diffstat (limited to 'mysys/CMakeLists.txt')
-rw-r--r--mysys/CMakeLists.txt6
1 files changed, 0 insertions, 6 deletions
diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt
index 438d6b428e0..add7ad9a811 100644
--- a/mysys/CMakeLists.txt
+++ b/mysys/CMakeLists.txt
@@ -59,12 +59,6 @@ IF(HAVE_ALARM)
SET(MYSYS_SOURCES ${MYSYS_SOURCES} my_alarm.c)
ENDIF()
-IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND CMAKE_C_COMPILER_ID MATCHES "SunPro")
- # Inline assembly template for rdtsc
- SET_SOURCE_FILES_PROPERTIES(my_rdtsc.c
- PROPERTIES COMPILE_FLAGS "${CMAKE_CURRENT_SOURCE_DIR}/my_timer_cycles.il")
-ENDIF()
-
IF(HAVE_LINUX_LARGE_PAGES)
SET(MYSYS_SOURCES ${MYSYS_SOURCES} my_largepage.c)
ENDIF()