diff options
author | Chuck Atkins <chuck.atkins@kitware.com> | 2019-02-27 17:31:57 (GMT) |
---|---|---|
committer | Chuck Atkins <chuck.atkins@kitware.com> | 2019-02-27 19:00:00 (GMT) |
commit | 5c58a7e4d2eca9aa93518cc567e874fedcdf2a80 (patch) | |
tree | 7b57c9beb762a147c504576004ee8ea00ff7b5a0 /CompileFlags.cmake | |
parent | b13a8441cd1338ac9f8352a4df54759a1b19088a (diff) | |
download | CMake-5c58a7e4d2eca9aa93518cc567e874fedcdf2a80.zip CMake-5c58a7e4d2eca9aa93518cc567e874fedcdf2a80.tar.gz CMake-5c58a7e4d2eca9aa93518cc567e874fedcdf2a80.tar.bz2 |
ppc64: Work around TOC overflow with platform specific linker flags
Diffstat (limited to 'CompileFlags.cmake')
-rw-r--r-- | CompileFlags.cmake | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/CompileFlags.cmake b/CompileFlags.cmake index 5d0e144..c8a039a 100644 --- a/CompileFlags.cmake +++ b/CompileFlags.cmake @@ -44,6 +44,15 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "^parisc") endif() endif() +# Workaround for TOC Overflow on ppc64 +if(CMAKE_SYSTEM_NAME STREQUAL "AIX" AND + CMAKE_SYSTEM_PROCESSOR MATCHES "powerpc") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-bbigtoc") +elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND + CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-multi-toc") +endif() + if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro AND NOT DEFINED CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION) if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.13) |