diff options
author | David Cole <david.cole@kitware.com> | 2012-10-31 20:35:17 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-10-31 20:35:17 (GMT) |
commit | 4129397b8e6778426d1ffe4193cbf1c5fe4f499b (patch) | |
tree | 49759d23d0275307b2375ca8a627199195b8f813 | |
parent | e2006ce5a9a0e8d914cd2930618d587b5bf1a30b (diff) | |
parent | e496c5402193ee26fa245c1970f87d795f56bdab (diff) | |
download | CMake-4129397b8e6778426d1ffe4193cbf1c5fe4f499b.zip CMake-4129397b8e6778426d1ffe4193cbf1c5fe4f499b.tar.gz CMake-4129397b8e6778426d1ffe4193cbf1c5fe4f499b.tar.bz2 |
Merge topic 'parisc-default-flags'
e496c54 Linux/PA-RISC: Link with --unique=.text.* to help binutils
-rw-r--r-- | CompileFlags.cmake | 6 | ||||
-rwxr-xr-x | bootstrap | 21 |
2 files changed, 27 insertions, 0 deletions
diff --git a/CompileFlags.cmake b/CompileFlags.cmake index b2044e4..20f5dec 100644 --- a/CompileFlags.cmake +++ b/CompileFlags.cmake @@ -62,3 +62,9 @@ endif () 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 () @@ -93,6 +93,19 @@ else cmake_system_openvms=false fi +# Determine whether this is Linux +if echo "${cmake_system}" | grep Linux >/dev/null 2>&1; then + cmake_system_linux=true + # find out if it is a HP PA-RISC machine + if uname -m | grep parisc >/dev/null 2>&1; then + cmake_machine_parisc=true + else + cmake_machine_parisc=false + fi +else + cmake_system_linux=false +fi + # Choose the generator to use for bootstrapping. if ${cmake_system_mingw}; then # Bootstrapping from an MSYS prompt. @@ -678,6 +691,14 @@ if ${cmake_system_haiku}; then cmake_ld_flags="${LDFLAGS} -lroot -lbe" fi +if ${cmake_system_linux}; then + # 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_machine_parisc}; then + cmake_ld_flags="${LDFLAGS} -Wl,--unique=.text.*" + fi +fi + #----------------------------------------------------------------------------- # Detect known toolchains on some platforms. cmake_toolchains='' |