MDEV-21362 do something with -fno-builtin-memcmp for rem0cmp.cc

innodb.cmake: restrict -fno-builtin-memcmp for GCC versions older that 4.6
where optimization issue was solved.
This commit is contained in:
Eugene Kosov 2019-12-20 13:33:31 +08:00
parent 17b1b8118a
commit cbc170adf2

View file

@ -100,7 +100,8 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wconversion")
IF (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64" OR
CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
CMAKE_SYSTEM_PROCESSOR MATCHES "i386" AND
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6)
INCLUDE(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-fno-builtin-memcmp" HAVE_NO_BUILTIN_MEMCMP)
IF (HAVE_NO_BUILTIN_MEMCMP)