From b3a7e32e8d92bb2ef5b9ec4ec7149518cf3741ba Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 26 Jan 2015 15:05:18 +0100 Subject: external/cppunit: Visible function type RTTI for Clang -fsanitize=function Change-Id: Ie2a6e993b7982629aed650d6534a09a9eefe1c51 --- external/cppunit/UnpackedTarball_cppunit.mk | 1 + external/cppunit/rtti.patch.0 | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 external/cppunit/rtti.patch.0 (limited to 'external') diff --git a/external/cppunit/UnpackedTarball_cppunit.mk b/external/cppunit/UnpackedTarball_cppunit.mk index e2f9fa55d2d9..b1264769c371 100644 --- a/external/cppunit/UnpackedTarball_cppunit.mk +++ b/external/cppunit/UnpackedTarball_cppunit.mk @@ -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,\ diff --git a/external/cppunit/rtti.patch.0 b/external/cppunit/rtti.patch.0 new file mode 100644 index 000000000000..38d2e6a909c9 --- /dev/null +++ b/external/cppunit/rtti.patch.0 @@ -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 + + -- cgit