summaryrefslogtreecommitdiff
path: root/CompileFlags.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'CompileFlags.cmake')
-rw-r--r--CompileFlags.cmake12
1 files changed, 2 insertions, 10 deletions
diff --git a/CompileFlags.cmake b/CompileFlags.cmake
index 053259f47..91f2adffe 100644
--- a/CompileFlags.cmake
+++ b/CompileFlags.cmake
@@ -54,20 +54,12 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "^parisc")
endif()
# Workaround for TOC Overflow on ppc64
-set(bigTocFlag "")
if(CMAKE_SYSTEM_NAME STREQUAL "AIX" AND
CMAKE_SYSTEM_PROCESSOR MATCHES "powerpc")
- set(bigTocFlag "-Wl,-bbigtoc")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-bbigtoc")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND
CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64")
- set(bigTocFlag "-Wl,--no-multi-toc")
-endif()
-if(bigTocFlag)
- include(CheckCXXLinkerFlag)
- check_cxx_linker_flag(${bigTocFlag} BIG_TOC_FLAG_SUPPORTED)
- if(BIG_TOC_FLAG_SUPPORTED)
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${bigTocFlag}")
- endif()
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-multi-toc")
endif()
if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro AND