Move RPATH flags to AIX per-compiler information files
Move RPATH flags out of Platform/AIX.cmake into platform-specific compiler information files Platform/AIX-XL and Platform/AIX-GNU. The flags need to be set for each compiler of each language.
This commit is contained in:
parent
89ea7a3d3c
commit
d30dcf18b9
|
@ -19,5 +19,7 @@ endif()
|
|||
set(__AIX_COMPILER_GNU 1)
|
||||
|
||||
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")
|
||||
endmacro()
|
||||
|
|
|
@ -19,6 +19,8 @@ endif()
|
|||
set(__AIX_COMPILER_XL 1)
|
||||
|
||||
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,-brtl,-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_${lang}_FLAGS " ")
|
||||
|
|
|
@ -9,8 +9,6 @@ SET(CMAKE_DL_LIBS "-lld")
|
|||
# When our own RPATH is to be added it may be inserted before the
|
||||
# "always" paths.
|
||||
SET(CMAKE_PLATFORM_REQUIRED_RUNTIME_PATH /usr/lib /lib)
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-blibpath:")
|
||||
SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
|
||||
|
||||
# Files named "libfoo.a" may actually be shared libraries.
|
||||
SET_PROPERTY(GLOBAL PROPERTY TARGET_ARCHIVES_MAY_BE_SHARED_LIBS 1)
|
||||
|
|
Loading…
Reference in New Issue