Commit 8b2e8f87 authored by Rafael Kitover's avatar Rafael Kitover
Browse files

only use -mtune=generic on x86/amd64 #146

This flags breaks the build on e.g. ARM, so only use it when a PC
architecture (x86 or amd64) has been detected. Thanks to ZachBacon for
spotting this.
parent 350619be
......@@ -311,10 +311,15 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL Clang)
# common optimization flags
IF(NOT (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL Clang AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.3))
SET(MY_C_OPT_FLAGS -O2 -mtune=generic -fomit-frame-pointer ${LTO_FLAG})
SET(MY_C_OPT_FLAGS -O2 -fomit-frame-pointer ${LTO_FLAG})
ELSE()
# LTO and -fomit-frame-pointer generate broken binaries on Lion with XCode 4.2 tools
SET(MY_C_OPT_FLAGS -O2 -mtune=generic)
SET(MY_C_OPT_FLAGS -O2)
ENDIF()
# only use -mtune=generic on PC architectures
IF(X86_32 OR AMD64)
SET(MY_C_OPT_FLAGS ${MY_C_OPT_FLAGS} -mtune=generic)
ENDIF()
# common debug flags
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment