external/cppunit: Visible function type RTTI for Clang -fsanitize=function

Change-Id: Ie2a6e993b7982629aed650d6534a09a9eefe1c51
This commit is contained in:
Stephan Bergmann
2015-01-26 15:17:29 +01:00
parent 875dc064aa
commit b3a7e32e8d
2 changed files with 16 additions and 0 deletions
+1
View File
@@ -19,6 +19,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,cppunit,\
external/cppunit/CPPUNIT_PLUGIN_EXPORT.patch.0 \
external/cppunit/enable-win32-debug.patch \
external/cppunit/0001-mark-the-fails-as-no-return.patch.1 \
external/cppunit/rtti.patch.0 \
))
ifeq ($(DISABLE_DYNLOADING),TRUE)
$(eval $(call gb_UnpackedTarball_add_patches,cppunit,\
+15
View File
@@ -0,0 +1,15 @@
--- include/cppunit/config/CppUnitApi.h
+++ include/cppunit/config/CppUnitApi.h
@@ -20,6 +20,12 @@
#define CPPUNIT_NEED_DLL_DECL 1
#endif
+#elif defined __GNUC__ //TODO: actually only works for modern enough GCC
+
+#define CPPUNIT_API __attribute__ ((visibility("default")))
+#undef CPPUNIT_NEED_DLL_DECL
+#define CPPUNIT_NEED_DLL_DECL 0
+
#endif