diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2015-12-10 13:36:30 +0100 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2015-12-10 13:36:30 +0100 |
commit | 66f2dc336b476e76e91bb3291d029ecc2e4b04dc (patch) | |
tree | 697e7d42a034defafca685b6f4dd4b421693e90b | |
parent | 202c2810f80c7b05042fc40a320b32d9087870f0 (diff) | |
download | coreclr-66f2dc336b476e76e91bb3291d029ecc2e4b04dc.tar.gz coreclr-66f2dc336b476e76e91bb3291d029ecc2e4b04dc.tar.bz2 coreclr-66f2dc336b476e76e91bb3291d029ecc2e4b04dc.zip |
Fix C++ exception handling when coreclr is loaded before C++ runtime
This change fixes a problem that happens when libcoreclr.so is loaded before
C++ runtime libraries. In that case, linker resolves the C++ exception handling
functions against the libunwind8 and exception handling doesn't work.
The fix is the same as someone has already made in the past for ARM - to
add gcc_s to the library list of coreclrpal before the libunwind8. Then
the linker does the right thing.
-rw-r--r-- | src/pal/src/CMakeLists.txt | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/pal/src/CMakeLists.txt b/src/pal/src/CMakeLists.txt index ad5425b8df..b460665f61 100644 --- a/src/pal/src/CMakeLists.txt +++ b/src/pal/src/CMakeLists.txt @@ -203,11 +203,8 @@ add_library(coreclrpal ) if(CMAKE_SYSTEM_NAME STREQUAL Linux) - # On ARM linking with libunwind will break C++ exceptions unless we first - # link with gcc_s, this is a libunwind issue if(PAL_CMAKE_PLATFORM_ARCH_ARM) target_link_libraries(coreclrpal - gcc_s unwind-arm ) endif() @@ -219,6 +216,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux) endif() target_link_libraries(coreclrpal + gcc_s pthread rt dl |