From 85194bd6bae76ecb99e89cb20658fe4ad5f641b8 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 3 Apr 2018 14:14:00 +0200 Subject: [PATCH] fix detection of "-Wa,-nH" compiler flags on SunOS/i386 --- storage/innobase/innodb.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/storage/innobase/innodb.cmake b/storage/innobase/innodb.cmake index c053924a948..50d6b4bbeec 100644 --- a/storage/innobase/innodb.cmake +++ b/storage/innobase/innodb.cmake @@ -33,6 +33,8 @@ MYSQL_CHECK_BZIP2() MYSQL_CHECK_SNAPPY() MYSQL_CHECK_NUMA() +INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake) + IF(CMAKE_CROSSCOMPILING) # Use CHECK_C_SOURCE_COMPILES instead of CHECK_C_SOURCE_RUNS when # cross-compiling. Not as precise, but usually good enough. @@ -241,9 +243,8 @@ ENDIF() # Avoid generating Hardware Capabilities due to crc32 instructions 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" HAVE_WA_NH) - IF(HAVE_WA_NH) + MY_CHECK_CXX_COMPILER_FLAG("-Wa,-nH") + IF(have_CXX__Wa__nH) ADD_COMPILE_FLAGS( ut/ut0crc32.cc COMPILE_FLAGS "-Wa,-nH"