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
This commit is contained in:
redfish 2016-07-26 02:30:59 +00:00
parent 3c92c2f096
commit 4b3a7885ac

View file

@ -423,6 +423,9 @@ else()
if(STATIC AND NOT APPLE AND NOT FREEBSD AND NOT OPENBSD) if(STATIC AND NOT APPLE AND NOT FREEBSD AND NOT OPENBSD)
set(COMMON_EXE_LINKER_FLAGS "${COMMON_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++") 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) # Install hook on throw for dumping stack on exception (implemented in libcommon)
set(WRAP_CXA_THROW_FLAG "-Wl,--wrap=__cxa_throw") set(WRAP_CXA_THROW_FLAG "-Wl,--wrap=__cxa_throw")
endif() endif()