Commit Graph

4 Commits

Author SHA1 Message Date
Marc Chevrier f254276fc1 AIX,HP-UX: Fix RPATH handling when CMP0065 is set to NEW
The CMAKE_SHARED_LIBRARY_LINK_<LANG>_FLAGS setting has always been meant
for flags needed to export symbols from executables for use by shared
library plugins.  Since commit v3.4.0-rc1~58^2~1 (CMP0065: Restrict the
use of CMAKE_SHARED_LIBRARY_LINK_<LANG>_FLAGS, 2015-08-24) this is made
explicit by using the flags only for executables with ENABLE_EXPORTS,
guarded by CMP0065 for compatibility.

On some platforms we were accidentally using this setting to pass other
flags to the linker:

* AIX: -bnoipath, -brtl
* HP-UX: +s, +nodefaultrpath

These flags are incorrectly dropped when CMP0065 is set to NEW.  Fix
this by moving the flags to more appropriate places for linking
executables.
2015-12-11 09:21:47 -05:00
Brad King bce7a2a3a5 AIX: Do not use -brtl to create shared libraries (#13997)
The flag was added incorrectly by commit 9c3a6eb4 (Need -brtl when creating
shared libraries, 2003-05-16).  According to "man ld" the -G option implies
"-brtl -bnortllib ...", -brtl implies "-brtllib", and -brtllib should only be
used for executables, not shared libraries.  Therefore it is incorrect and
unnecessary to specify -brtl explicitly after -G.

Reported-by: Kevin Burge <kcburge@gmail.com>
2013-03-11 09:01:27 -04:00
Brad King d30dcf18b9 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.
2011-03-02 11:21:54 -05:00
Brad King 89ea7a3d3c Factor AIX and XL compiler flags into common module
Factor duplicate flag information from Platform/AIX-XL-*.cmake into
Platform/AIX-XL.cmake and load it from the original files.
2011-03-02 11:20:50 -05:00