diff options
| author | redfish <redfish@galactica.pw> | 2016-07-05 01:36:55 +0000 |
|---|---|---|
| committer | redfish <redfish@galactica.pw> | 2016-07-08 21:42:05 -0400 |
| commit | ab250754f23c74434342a77b631f803e432279c8 (patch) | |
| tree | 91b96bd22dfb12f54c9ee21b82c9a7e40520f4bd | |
| parent | 18dd50702407ece54a98563921fa744c6b7c15b2 (diff) | |
| download | monzero-core-ab250754f23c74434342a77b631f803e432279c8.tar.gz monzero-core-ab250754f23c74434342a77b631f803e432279c8.tar.xz monzero-core-ab250754f23c74434342a77b631f803e432279c8.zip | |
cmake: pass -fno-strict-aliasing to fix build with GCC 6.1.1
This patch is a temprorary workaround until aliasing is fixed in the
code (Issue #847).
| -rw-r--r-- | CMakeLists.txt | 5 |
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)) |
