summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-26 15:05:18 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-01-26 15:17:29 +0100
commitb3a7e32e8d92bb2ef5b9ec4ec7149518cf3741ba (patch)
tree0588f85e9296b00fbc89e764722d130a5f5352e1 /external
parent875dc064aa3533dcc41416166ba957c02f81f0bf (diff)
external/cppunit: Visible function type RTTI for Clang -fsanitize=function
Change-Id: Ie2a6e993b7982629aed650d6534a09a9eefe1c51
Diffstat (limited to 'external')
-rw-r--r--external/cppunit/UnpackedTarball_cppunit.mk1
-rw-r--r--external/cppunit/rtti.patch.015
2 files changed, 16 insertions, 0 deletions
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
+
+