From 4b3a7885ac0ecbcf399c7784162751aadd0c90ea Mon Sep 17 00:00:00 2001 From: redfish Date: Tue, 26 Jul 2016 02:30:59 +0000 Subject: [PATCH] cmake: install throw hook in OSX build too This is an attempt to fix build with STATIC=ON on OSX (#932): [ 95%] Linking CXX executable ../../bin/bitmonerod Undefined symbols for architecture x86_64: "___real___cxa_throw", referenced from: ___wrap___cxa_throw in libcommon.a(stack_trace.cpp.o) ld: symbol(s) not found for architecture x86_64 --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6783b5002..0a0e75119 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -423,6 +423,9 @@ else() if(STATIC AND NOT APPLE AND NOT FREEBSD AND NOT OPENBSD) set(COMMON_EXE_LINKER_FLAGS "${COMMON_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++") + endif() + + if(STATIC AND NOT FREEBSD AND NOT OPENBSD) # Install hook on throw for dumping stack on exception (implemented in libcommon) set(WRAP_CXA_THROW_FLAG "-Wl,--wrap=__cxa_throw") endif()