diff options
author | Zachary Michaels <mikezackles@gmail.com> | 2014-06-11 13:13:43 -0400 |
---|---|---|
committer | Zachary Michaels <mikezackles@gmail.com> | 2014-06-11 13:13:43 -0400 |
commit | c8626dff3fedd86cf697e49aec00c9e17c9015d8 (patch) | |
tree | 5fa3440c17f9aed267dc8650cca8bd20bcae46b3 /CMakeLists.txt | |
parent | Correcting high orphan rate of blocks at pool (diff) | |
download | monero-c8626dff3fedd86cf697e49aec00c9e17c9015d8.tar.xz |
Gcc 4.9 LTO fix
The new lto format requires use of the gcc-provided gcc-ar and
gcc-ranlib binaries.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 28130e566..8b1e61a51 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,11 @@ else() else() set(WARNINGS "${WARNINGS} -Wlogical-op -Wno-error=maybe-uninitialized") endif() + # Since gcc 4.9 the LTO format is non-standard (slim), so we need the gcc-specific ar and ranlib binaries + if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9.0)) + set(CMAKE_AR "gcc-ar") + set(CMAKE_RANLIB "gcc-ranlib") + endif() if(MINGW) set(WARNINGS "${WARNINGS} -Wno-error=unused-value") set(MINGW_FLAG "-DWIN32_LEAN_AND_MEAN") |