summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/Platform/Linux-GNU.cmake3
-rw-r--r--Modules/Platform/Linux-Intel.cmake4
2 files changed, 7 insertions, 0 deletions
diff --git a/Modules/Platform/Linux-GNU.cmake b/Modules/Platform/Linux-GNU.cmake
index df6295b..d257f34 100644
--- a/Modules/Platform/Linux-GNU.cmake
+++ b/Modules/Platform/Linux-GNU.cmake
@@ -19,4 +19,7 @@ endif()
set(__LINUX_COMPILER_GNU 1)
macro(__linux_compiler_gnu lang)
+ # We pass this for historical reasons. Projects may have
+ # executables that use dlopen but do not set ENABLE_EXPORTS.
+ set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-rdynamic")
endmacro()
diff --git a/Modules/Platform/Linux-Intel.cmake b/Modules/Platform/Linux-Intel.cmake
index 1474051..dff90e9 100644
--- a/Modules/Platform/Linux-Intel.cmake
+++ b/Modules/Platform/Linux-Intel.cmake
@@ -34,6 +34,10 @@ macro(__linux_compiler_intel lang)
set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC")
set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
+ # We pass this for historical reasons. Projects may have
+ # executables that use dlopen but do not set ENABLE_EXPORTS.
+ set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-rdynamic")
+
if(XIAR)
# INTERPROCEDURAL_OPTIMIZATION
set(CMAKE_${lang}_COMPILE_OPTIONS_IPO -ipo)