summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-12 10:25:51 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-12 10:25:51 +0200
commitc5ca7ede1d330dad73355bc9769b2ca9db1fc66b (patch)
tree07d669287151ed776c2c76b066fcf6a6cbf29789 /external
parent45cf2e2c58c3d113632f5b9c776df3d15df816f9 (diff)
For Clang -fsanitize=vptr use -fvisibility-ms-compat, not -fvisibility=hidden
...same as f0aa1a78fb209310e8baef53c02f365fca518d11 Change-Id: I89e20a57125012a6805b8d61ec668068b7149be2
Diffstat (limited to 'external')
-rw-r--r--external/libwps/UnpackedTarball_libwps.mk8
-rw-r--r--external/libwps/ubsan-visibility.patch.011
2 files changed, 19 insertions, 0 deletions
diff --git a/external/libwps/UnpackedTarball_libwps.mk b/external/libwps/UnpackedTarball_libwps.mk
index 77662a7944f2..39f4e6d9b376 100644
--- a/external/libwps/UnpackedTarball_libwps.mk
+++ b/external/libwps/UnpackedTarball_libwps.mk
@@ -18,4 +18,12 @@ $(eval $(call gb_UnpackedTarball_add_patches,libwps,\
external/libwps/0001-error-C2065-M_PI-undeclared-identifier.patch \
))
+ifeq ($(COM_GCC_IS_CLANG),TRUE)
+ifneq ($(filter -fsanitize=%,$(CC)),)
+$(eval $(call gb_UnpackedTarball_add_patches,libwps, \
+ external/libwps/ubsan-visibility.patch.0 \
+))
+endif
+endif
+
# vim: set noet sw=4 ts=4:
diff --git a/external/libwps/ubsan-visibility.patch.0 b/external/libwps/ubsan-visibility.patch.0
new file mode 100644
index 000000000000..50efe41c22aa
--- /dev/null
+++ b/external/libwps/ubsan-visibility.patch.0
@@ -0,0 +1,11 @@
+--- configure
++++ configure
+@@ -16632,7 +16632,7 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fvisibility=hidden compiler flag" >&5
+ $as_echo_n "checking for -fvisibility=hidden compiler flag... " >&6; }
+ saved_CXXFLAGS="$CXXFLAGS"
+- CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
++ CXXFLAGS="$CXXFLAGS -fvisibility-ms-compat"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h. */
+