mirror of
https://github.com/monero-project/monero.git
synced 2024-11-18 00:37:43 +00:00
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).
This commit is contained in:
parent
18dd507024
commit
ab250754f2
1 changed files with 5 additions and 0 deletions
|
@ -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_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}")
|
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})
|
option(NO_AES "Explicitly disable AES support" ${NO_AES})
|
||||||
|
|
||||||
if(NOT NO_AES AND NOT (ARM6 OR ARM7))
|
if(NOT NO_AES AND NOT (ARM6 OR ARM7))
|
||||||
|
|
Loading…
Reference in a new issue