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.
)
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()
endif()
target_link_libraries(coreclrpal
+ gcc_s
pthread
rt
dl