diff options
author | Brad King <brad.king@kitware.com> | 2015-12-14 14:59:58 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-12-14 14:59:58 (GMT) |
commit | 09da79b40ff5a809490b40709a9e564e4ceec0b7 (patch) | |
tree | 0f58b591e9240fc3fb42e45b26244372ed90116b /Modules/Platform | |
parent | b97018534fbb4ce238561a1363f2698526bcda31 (diff) | |
parent | f254276fc1a17de7cd5cfc016fd2137937830fca (diff) | |
download | CMake-09da79b40ff5a809490b40709a9e564e4ceec0b7.zip CMake-09da79b40ff5a809490b40709a9e564e4ceec0b7.tar.gz CMake-09da79b40ff5a809490b40709a9e564e4ceec0b7.tar.bz2 |
Merge topic 'fix-CMP0065-NEW-AIX-HP'
f254276f AIX,HP-UX: Fix RPATH handling when CMP0065 is set to NEW
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/AIX-GNU.cmake | 12 | ||||
-rw-r--r-- | Modules/Platform/AIX-XL.cmake | 12 | ||||
-rw-r--r-- | Modules/Platform/HP-UX-GNU.cmake | 4 | ||||
-rw-r--r-- | Modules/Platform/HP-UX-HP.cmake | 4 |
4 files changed, 28 insertions, 4 deletions
diff --git a/Modules/Platform/AIX-GNU.cmake b/Modules/Platform/AIX-GNU.cmake index e5d9434..d6f5331 100644 --- a/Modules/Platform/AIX-GNU.cmake +++ b/Modules/Platform/AIX-GNU.cmake @@ -18,10 +18,20 @@ if(__AIX_COMPILER_GNU) endif() set(__AIX_COMPILER_GNU 1) +# +# By default, runtime linking is enabled. All shared objects specified on the command line +# will be listed, even if there are no symbols referenced, in the output file. +set (CMAKE_SHARED_LINKER_FLAGS_INIT "-Wl,-brtl") +set (CMAKE_MODULE_LINKER_FLAGS_INIT "-Wl,-brtl") +set (CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,-brtl") + + macro(__aix_compiler_gnu lang) set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-blibpath:") set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,-G,-bnoipath") - set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib + set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-bexpall") set(CMAKE_${lang}_USE_IMPLICIT_LINK_DIRECTORIES_IN_RUNTIME_PATH 1) + + set(CMAKE_${lang}_LINK_FLAGS "-Wl,-bnoipath") endmacro() diff --git a/Modules/Platform/AIX-XL.cmake b/Modules/Platform/AIX-XL.cmake index abf3855..5470441 100644 --- a/Modules/Platform/AIX-XL.cmake +++ b/Modules/Platform/AIX-XL.cmake @@ -18,11 +18,21 @@ if(__AIX_COMPILER_XL) endif() set(__AIX_COMPILER_XL 1) +# +# By default, runtime linking is enabled. All shared objects specified on the command line +# will be listed, even if there are no symbols referenced, in the output file. +set(CMAKE_SHARED_LINKER_FLAGS_INIT "-Wl,-brtl") +set(CMAKE_MODULE_LINKER_FLAGS_INIT "-Wl,-brtl") +set(CMAKE_EXE_LINKER_FLAGS_INIT "-Wl,-brtl") + + macro(__aix_compiler_xl lang) set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,-blibpath:") set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-G -Wl,-bnoipath") # -shared - set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-brtl,-bnoipath,-bexpall") # +s, flag for exe link to use shared lib + set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-bexpall") set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS " ") set(CMAKE_SHARED_MODULE_${lang}_FLAGS " ") + + set(CMAKE_${lang}_LINK_FLAGS "-Wl,-bnoipath") endmacro() diff --git a/Modules/Platform/HP-UX-GNU.cmake b/Modules/Platform/HP-UX-GNU.cmake index eb909fe..6c71784 100644 --- a/Modules/Platform/HP-UX-GNU.cmake +++ b/Modules/Platform/HP-UX-GNU.cmake @@ -20,8 +20,10 @@ set(__HPUX_COMPILER_GNU 1) macro(__hpux_compiler_gnu lang) set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "${CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS} -Wl,-E,-b,+nodefaultrpath") - set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,+s,-E,+nodefaultrpath") + set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-E") set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,+b") set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,+h") + + set(CMAKE_${lang}_LINK_FLAGS "-Wl,+s,+nodefaultrpath") endmacro() diff --git a/Modules/Platform/HP-UX-HP.cmake b/Modules/Platform/HP-UX-HP.cmake index 871ea13..3935c31 100644 --- a/Modules/Platform/HP-UX-HP.cmake +++ b/Modules/Platform/HP-UX-HP.cmake @@ -22,10 +22,12 @@ macro(__hpux_compiler_hp lang) set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "+Z") set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "+Z") set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-Wl,-E,+nodefaultrpath -b -L/usr/lib") - set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,+s,-E,+nodefaultrpath") + set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-Wl,-E") set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG "-Wl,+b") set(CMAKE_SHARED_LIBRARY_RUNTIME_${lang}_FLAG_SEP ":") set(CMAKE_SHARED_LIBRARY_SONAME_${lang}_FLAG "-Wl,+h") set(CMAKE_${lang}_FLAGS_INIT "") + + set(CMAKE_${lang}_LINK_FLAGS "-Wl,+s,+nodefaultrpath") endmacro() |