summaryrefslogtreecommitdiffstats
path: root/CompileFlags.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-11-10 15:43:01 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-11-10 15:43:01 (GMT)
commit6431cc641bf42551ef6b5d7019fe857909d593fc (patch)
tree02b7382237adb6771ba743726c584d64965d0de8 /CompileFlags.cmake
parentee6c79d1a34fba29d321ff00b19e79bda472c0d7 (diff)
parent04f442f755fbfb317f6790e36686e05c4c906ba0 (diff)
downloadCMake-6431cc641bf42551ef6b5d7019fe857909d593fc.zip
CMake-6431cc641bf42551ef6b5d7019fe857909d593fc.tar.gz
CMake-6431cc641bf42551ef6b5d7019fe857909d593fc.tar.bz2
Merge topic 'fix-gcc-hppa'
04f442f7 Workaround for short jump tables on PA-RISC.
Diffstat (limited to 'CompileFlags.cmake')
-rw-r--r--CompileFlags.cmake16
1 files changed, 10 insertions, 6 deletions
diff --git a/CompileFlags.cmake b/CompileFlags.cmake
index 5d86876..e7beb3f 100644
--- a/CompileFlags.cmake
+++ b/CompileFlags.cmake
@@ -65,6 +65,16 @@ if(CMAKE_SYSTEM_NAME MATCHES "HP-UX" AND CMAKE_CXX_COMPILER_ID MATCHES "HP")
endif()
endif()
+# Workaround for short jump tables on PA-RISC
+if(CMAKE_SYSTEM_PROCESSOR MATCHES "^parisc")
+ if(CMAKE_COMPILER_IS_GNUC)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mlong-calls")
+ endif()
+ if(CMAKE_COMPILER_IS_GNUCXX)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mlong-calls")
+ endif()
+endif()
+
# use the ansi CXX compile flag for building cmake
if (CMAKE_ANSI_CXXFLAGS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}")
@@ -74,10 +84,4 @@ if (CMAKE_ANSI_CFLAGS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")
endif ()
-# avoid binutils problem with large binaries, e.g. when building CMake in debug mode
-# See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50230
-if (CMAKE_SYSTEM_NAME STREQUAL Linux AND CMAKE_SYSTEM_PROCESSOR STREQUAL parisc)
- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--unique=.text._*")
-endif ()
-
include (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake)