[libunwind][mips] Include gcc_s for linkage
authorStefan Maksimovic <stefan.maksimovic@mips.com>
Thu, 16 Aug 2018 13:40:16 +0000 (13:40 +0000)
committerStefan Maksimovic <stefan.maksimovic@mips.com>
Thu, 16 Aug 2018 13:40:16 +0000 (13:40 +0000)
When compiling with optimizations, mips requires various helper routines(__ashldi3 and the like) contained in libgcc_s.
Conditionally include libgcc_s in the set of libraries to be linked to.

Differential Revision: https://reviews.llvm.org/D50243

llvm-svn: 339878

libunwind/src/CMakeLists.txt

index 7a737ef..484d00d 100644 (file)
@@ -52,6 +52,7 @@ set(LIBUNWIND_SOURCES
 # Generate library list.
 set(libraries ${LIBUNWINDCXX_ABI_LIBRARIES})
 append_if(libraries LIBUNWIND_HAS_C_LIB c)
+append_if(libraries LIBUNWIND_HAS_GCC_S_LIB gcc_s)
 append_if(libraries LIBUNWIND_HAS_DL_LIB dl)
 if (LIBUNWIND_ENABLE_THREADS)
   append_if(libraries LIBUNWIND_HAS_PTHREAD_LIB pthread)