Notes |
|
(0018625)
|
Brad King
|
2009-12-01 14:26
|
|
The following commit addresses this issue:
---------------------------------------------------------------------------
Drop -rdynamic from Linux build rules
This is a GNU-specific option that should not be specified for all
compilers on Linux. It tells the GNU compiler to pass -export-dynamic
to the linker to export symbols from executables for use by plugins.
Since we provide the ENABLE_EXPORTS target property to do the same thing
in a cross-platform way, there is no need to pass -rdynamic always.
Since the option is not useful for GNU tools and breaks other tools on
Linux we simply remove it from CMAKE_SHARED_LIBRARY_LINK_<lang>_FLAGS.
This also allows us to stop setting the variable in other Linux compiler
files just to erase the bad flag.
---------------------------------------------------------------------------
/cvsroot/CMake/CMake/Modules/Compiler/SunPro-C.cmake,v <-- Modules/Compiler/SunPro-C.cmake
new revision: 1.3; previous revision: 1.2
/cvsroot/CMake/CMake/Modules/Compiler/SunPro-CXX.cmake,v <-- Modules/Compiler/SunPro-CXX.cmake
new revision: 1.3; previous revision: 1.2
/cvsroot/CMake/CMake/Modules/Compiler/SunPro-Fortran.cmake,v <-- Modules/Compiler/SunPro-Fortran.cmake
new revision: 1.3; previous revision: 1.2
/cvsroot/CMake/CMake/Modules/Platform/GNU.cmake,v <-- Modules/Platform/GNU.cmake
new revision: 1.2; previous revision: 1.1
/cvsroot/CMake/CMake/Modules/Platform/Linux-PGI-C.cmake,v <-- Modules/Platform/Linux-PGI-C.cmake
new revision: 1.3; previous revision: 1.2
/cvsroot/CMake/CMake/Modules/Platform/Linux-PGI-CXX.cmake,v <-- Modules/Platform/Linux-PGI-CXX.cmake
new revision: 1.3; previous revision: 1.2
/cvsroot/CMake/CMake/Modules/Platform/Linux-PGI-Fortran.cmake,v <-- Modules/Platform/Linux-PGI-Fortran.cmake
new revision: 1.3; previous revision: 1.2
/cvsroot/CMake/CMake/Modules/Platform/Linux-XL-C.cmake,v <-- Modules/Platform/Linux-XL-C.cmake
new revision: 1.3; previous revision: 1.2
/cvsroot/CMake/CMake/Modules/Platform/Linux-XL-CXX.cmake,v <-- Modules/Platform/Linux-XL-CXX.cmake
new revision: 1.3; previous revision: 1.2
/cvsroot/CMake/CMake/Modules/Platform/Linux-XL-Fortran.cmake,v <-- Modules/Platform/Linux-XL-Fortran.cmake
new revision: 1.3; previous revision: 1.2
/cvsroot/CMake/CMake/Modules/Platform/Linux-como.cmake,v <-- Modules/Platform/Linux-como.cmake
new revision: 1.6; previous revision: 1.5
/cvsroot/CMake/CMake/Modules/Platform/Linux.cmake,v <-- Modules/Platform/Linux.cmake
new revision: 1.20; previous revision: 1.19 |
|
|
(0018642)
|
Brad King
|
2009-12-02 09:46
|
|
The Linux builds on our dashboard look good after this fix.
I'll schedule it for 2.8.1. |
|
|
(0019106)
|
Brad King
|
2010-01-12 17:10
|
|
We need to export symbols from any executable on Linux that uses dlopen() even if we do not export an API explicitly. The compiler may need RTTI symbols as an implementation detail. Furthermore, we still pass export flags when linking executables on other platforms. If we want to do change behavior on Linux we should do it on all platforms at once. |
|
|
(0019107)
|
Brad King
|
2010-01-12 17:15
|
|
It is likely that many projects already use the workaround mentioned in issue 0005833:
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
to erase -rdynamic. Restoring the flag to match 2.8.0 behavior will have to be done in this variable, but only on compilers known to support it. |
|
|
(0019113)
|
Brad King
|
2010-01-13 08:14
|
|
I've committed changes to restore -rdynamic.
Create Linux GNU compiler flag consolidation macro
/cvsroot/CMake/CMake/Modules/Platform/Linux-GNU-C.cmake,v <-- Modules/Platform/Linux-GNU-C.cmake
initial revision: 1.1
/cvsroot/CMake/CMake/Modules/Platform/Linux-GNU-CXX.cmake,v <-- Modules/Platform/Linux-GNU-CXX.cmake
initial revision: 1.1
/cvsroot/CMake/CMake/Modules/Platform/Linux-GNU-Fortran.cmake,v <-- Modules/Platform/Linux-GNU-Fortran.cmake
new revision: 1.4; previous revision: 1.3
/cvsroot/CMake/CMake/Modules/Platform/Linux-GNU.cmake,v <-- Modules/Platform/Linux-GNU.cmake
initial revision: 1.1
Restore -rdynamic in Linux build rules
/cvsroot/CMake/CMake/Modules/Platform/Linux-GNU.cmake,v <-- Modules/Platform/Linux-GNU.cmake
new revision: 1.2; previous revision: 1.1
/cvsroot/CMake/CMake/Modules/Platform/Linux-Intel.cmake,v <-- Modules/Platform/Linux-Intel.cmake
new revision: 1.4; previous revision: 1.3 |
|
|
(0019114)
|
Brad King
|
2010-01-13 08:17
|
|
I'm closing this because Linux.cmake no longer hard-codes -rdynamic and prior behavior for compilers that support it is preserved. If we want to avoid exporting symbols from executables that is a separate issue that should be tackled on all platforms at once. |
|