summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-12 15:52:51 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-12 15:53:25 +0200
commit4764958607d8360091edf5a548509e7627df7aa8 (patch)
tree72568f9d39b7c8ce9e3cff83df10bfef85fa2110 /external
parente6c37fdee5ddd35460aacca401bf581d021384d9 (diff)
For Clang -fsanitize=vptr use -fvisibility-ms-compat, not -fvisibility=hidden
...same as f0aa1a78fb209310e8baef53c02f365fca518d11 Change-Id: I35c1e6928dd4b29ef0ab448a181a5af7fb0640ab
Diffstat (limited to 'external')
-rw-r--r--external/libfreehand/UnpackedTarball_libfreehand.mk10
-rw-r--r--external/libfreehand/ubsan-visibility.patch11
2 files changed, 21 insertions, 0 deletions
diff --git a/external/libfreehand/UnpackedTarball_libfreehand.mk b/external/libfreehand/UnpackedTarball_libfreehand.mk
index a6cf1c790f32..de07ef509b4e 100644
--- a/external/libfreehand/UnpackedTarball_libfreehand.mk
+++ b/external/libfreehand/UnpackedTarball_libfreehand.mk
@@ -11,4 +11,14 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libfreehand))
$(eval $(call gb_UnpackedTarball_set_tarball,libfreehand,$(FREEHAND_TARBALL)))
+$(eval $(call gb_UnpackedTarball_set_patchlevel,libfreehand,0))
+
+ifeq ($(COM_GCC_IS_CLANG),TRUE)
+ifneq ($(filter -fsanitize=%,$(CC)),)
+$(eval $(call gb_UnpackedTarball_add_patches,libfreehand, \
+ external/libfreehand/ubsan-visibility.patch \
+))
+endif
+endif
+
# vim: set noet sw=4 ts=4:
diff --git a/external/libfreehand/ubsan-visibility.patch b/external/libfreehand/ubsan-visibility.patch
new file mode 100644
index 000000000000..dff5cdbdb57f
--- /dev/null
+++ b/external/libfreehand/ubsan-visibility.patch
@@ -0,0 +1,11 @@
+--- configure
++++ configure
+@@ -18369,7 +18369,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. */
+