[Libreoffice-commits] core.git: external/libepubgen
Stephan Bergmann
sbergman at redhat.com
Wed Aug 9 14:16:03 UTC 2017
external/libepubgen/UnpackedTarball_libepubgen.mk | 8 ++++++++
external/libepubgen/ubsan-visibility.patch | 11 +++++++++++
2 files changed, 19 insertions(+)
New commits:
commit fb899f976d2d8f15ca992ecb61511a2c83153c33
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Aug 9 16:04:48 2017 +0200
For Clang -fsanitize=vptr use -fvisibility-ms-compat in exernal/libepubgen too
...similarly to how it is used for other external libraries since
f0aa1a78fb209310e8baef53c02f365fca518d11 "For Clang -fsanitize=vptr use
-fvisibility-ms-compat, not -fvisibility=hidden". This caused
CppunitTest_writerperfect_writer to fail now with -fsanitize=vptr after
7915f35d7fca5d0720d96954beaa97c00a2c3821 "EPUB export: implement doc/para
open/close and text in doc handler", where additions to
writerperfect/source/writer/EPUBExportFilter.cxx caused Library_wpftwriter to
import more stuff from the libepubgen archive, which happend to make it pick up
the (erroneously hidden) definition of _ZTIN10librevenge17RVNGTextInterfaceE
from that archive, instead of from some other object/archive as happened before.
Change-Id: I2b56df38d7225505ff993321598ddd51812d9de4
diff --git a/external/libepubgen/UnpackedTarball_libepubgen.mk b/external/libepubgen/UnpackedTarball_libepubgen.mk
index 5525ca3b2ce7..8d60eccc65fe 100644
--- a/external/libepubgen/UnpackedTarball_libepubgen.mk
+++ b/external/libepubgen/UnpackedTarball_libepubgen.mk
@@ -17,10 +17,18 @@ epubgen_patches += libepubgen-validation3.patch.1
# Backport of <https://sourceforge.net/p/libepubgen/code/ci/49f6461d4751d3b16e32ab8f9c93a3856b33be49/>.
epubgen_patches += libepubgen-vc.patch.1
+ifeq ($(COM_IS_CLANG),TRUE)
+ifneq ($(filter -fsanitize=%,$(CC)),)
+epubgen_patches += ubsan-visibility.patch
+endif
+endif
+
$(eval $(call gb_UnpackedTarball_UnpackedTarball,libepubgen))
$(eval $(call gb_UnpackedTarball_set_tarball,libepubgen,$(EPUBGEN_TARBALL)))
+$(eval $(call gb_UnpackedTarball_set_patchlevel,libepubgen,0))
+
$(eval $(call gb_UnpackedTarball_add_patches,libepubgen,\
$(foreach patch,$(epubgen_patches),external/libepubgen/$(patch)) \
))
diff --git a/external/libepubgen/ubsan-visibility.patch b/external/libepubgen/ubsan-visibility.patch
new file mode 100644
index 000000000000..10234b308ba5
--- /dev/null
+++ b/external/libepubgen/ubsan-visibility.patch
@@ -0,0 +1,11 @@
+--- configure
++++ configure
+@@ -18425,7 +18425,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. */
+
More information about the Libreoffice-commits
mailing list