fix detection of "-Wa,-nH" compiler flags on SunOS/i386

This commit is contained in:
Sergei Golubchik 2018-04-03 14:14:00 +02:00
parent e7cbb2afa1
commit 85194bd6ba

View file

@ -33,6 +33,8 @@ MYSQL_CHECK_BZIP2()
MYSQL_CHECK_SNAPPY() MYSQL_CHECK_SNAPPY()
MYSQL_CHECK_NUMA() MYSQL_CHECK_NUMA()
INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake)
IF(CMAKE_CROSSCOMPILING) IF(CMAKE_CROSSCOMPILING)
# Use CHECK_C_SOURCE_COMPILES instead of CHECK_C_SOURCE_RUNS when # Use CHECK_C_SOURCE_COMPILES instead of CHECK_C_SOURCE_RUNS when
# cross-compiling. Not as precise, but usually good enough. # cross-compiling. Not as precise, but usually good enough.
@ -241,9 +243,8 @@ ENDIF()
# Avoid generating Hardware Capabilities due to crc32 instructions # Avoid generating Hardware Capabilities due to crc32 instructions
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND CMAKE_SYSTEM_PROCESSOR MATCHES "i386") IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake) MY_CHECK_CXX_COMPILER_FLAG("-Wa,-nH")
MY_CHECK_CXX_COMPILER_FLAG("-Wa,-nH" HAVE_WA_NH) IF(have_CXX__Wa__nH)
IF(HAVE_WA_NH)
ADD_COMPILE_FLAGS( ADD_COMPILE_FLAGS(
ut/ut0crc32.cc ut/ut0crc32.cc
COMPILE_FLAGS "-Wa,-nH" COMPILE_FLAGS "-Wa,-nH"