aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-07-20 13:51:27 +0200
committerRiccardo Spagni <ric@spagni.net>2016-07-20 13:51:27 +0200
commit83ccaf316db19af1d09c84924ec1c60d0b8f8748 (patch)
tree59b1aa72749ca192858cdc5fdd2b0caf3503c5dc
parentMerge pull request #818 (diff)
parentcmake: pass -fno-strict-aliasing to fix build with GCC 6.1.1 (diff)
downloadmonero-83ccaf316db19af1d09c84924ec1c60d0b8f8748.tar.xz
Merge pull request #887
ab25075 cmake: pass -fno-strict-aliasing to fix build with GCC 6.1.1 (redfish)
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6b9c81895..34b4eb7ca 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -350,6 +350,11 @@ else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_GNU_SOURCE ${MINGW_FLAG} ${STATIC_ASSERT_FLAG} ${WARNINGS} ${C_WARNINGS} ${ARCH_FLAG}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -D_GNU_SOURCE ${MINGW_FLAG} ${WARNINGS} ${CXX_WARNINGS} ${ARCH_FLAG}")
+ # With GCC 6.1.1 the compiled binary malfunctions due to aliasing. Until that
+ # is fixed in the code (Issue #847), force compiler to be conservative.
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-strict-aliasing")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
+
option(NO_AES "Explicitly disable AES support" ${NO_AES})
if(NOT NO_AES AND NOT (ARM6 OR ARM7))