Commit graph

18 commits

Author SHA1 Message Date
Xisco Fauli
0e334b25b9 libcdr: upgrade to 0.1.8
Generated with:
./autogen.sh
./configure
make dist-xz

Change-Id: I46b921f3c2ef41ab52e272df5afd82a1d9331f42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177332
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-11-26 15:09:25 +01:00
David Tardon
64788738db upload libcdr 0.1.7
Change-Id: Ie01fdee7379c398fe7df7c140e2f0059bea71abe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113380
Tested-by: Jenkins
Reviewed-by: David Tardon <dtardon@redhat.com>
2021-03-30 19:46:50 +02:00
Stephan Bergmann
05aedcba66 Fix use of -fvisibility=hidden with Clang in external/libcdr, external/libqxp
At least on macOS x86-64 you get a warning

> [build LNK] Library/libwpftdrawlo.dylib
> ld: warning: direct access in function 'std::__1::__shared_ptr_pointer<librevenge::RVNGInputStream*, std::__1::shared_ptr<librevenge::RVNGInputStream>::__shared_ptr_default_delete<librevenge::RVNGInputStream, librevenge::RVNGInputStream>, std::__1::allocator<librevenge::RVNGInputStream> >::__get_deleter(std::type_info const&) const' from file 'workdir/UnpackedTarball/libzmf/src/lib/.libs/libzmf-0.0.a(ZMFDocument.o)' to global weak symbol 'typeinfo for std::__1::shared_ptr<librevenge::RVNGInputStream>::__shared_ptr_default_delete<librevenge::RVNGInputStream, librevenge::RVNGInputStream>' from file 'workdir/UnpackedTarball/libcdr/src/lib/.libs/libcdr-0.1.a(CDRDocument.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.

The reason is that libzmf uses -fvisibility=hidden and generates

> $ nm -m workdir/UnpackedTarball/libzmf/src/lib/.libs/libzmf-0.0.a | grep __ZTINSt3__110shared_ptrIN10librevenge15RVNGInputStreamEE27__shared_ptr_default_deleteIS2_S2_EE
> 0000000000006dd8 (__DATA,__const) weak private external __ZTINSt3__110shared_ptrIN10librevenge15RVNGInputStreamEE27__shared_ptr_default_deleteIS2_S2_EE

while libcdr erroneously does not use -fvisibility=hidden and generates

> $ nm -m workdir/UnpackedTarball/libcdr/src/lib/.libs/libcdr-0.1.a | grep __ZTINSt3__110shared_ptrIN10librevenge15RVNGInputStreamEE27__shared_ptr_default_deleteIS2_S2_EE
> 00000000000072b8 (__DATA,__const) weak external __ZTINSt3__110shared_ptrIN10librevenge15RVNGInputStreamEE27__shared_ptr_default_deleteIS2_S2_EE

The reason for that error is as follows:
workdir/UnpackedTarball/libcdr/configure.ac uses, among other things, the result
of

  AX_GCC_FUNC_ATTRIBUTE([visibility])

when deciding whether to use -fvisibility=hidden.  And the old ("serial 5")
workdir/UnpackedTarball/libcdr/m4/ax_gcc_func_attribute.m4 decides "no" if its
test compilation generates any warning output.  But Clang on macOS generates

> conftest.cpp:34:56: warning: target does not support 'protected' visibility; using 'default' [-Wunsupported-visibility]
>                     int foo_pro( void ) __attribute__((visibility("protected")));
>                                                        ^

and lots of

> conftest.cpp:2:9: warning: macro is not used [-Wunused-macros]
> #define PACKAGE_NAME "libcdr"
>         ^

(because of -Wunused-macros set for Clang in
solenv/gbuild/platform/com_GCC_defs.mk).

Same issue with external/libqxp, which would cause

> [LNK] Library/libwpftdrawlo.dylib
> ld: warning: direct access in function 'std::__1::__shared_ptr_pointer<librevenge::RVNGInputStream*, std::__1::shared_ptr<librevenge::RVNGInputStream>::__shared_ptr_default_delete<librevenge::RVNGInputStream, librevenge::RVNGInputStream>, std::__1::allocator<librevenge::RVNGInputStream> >::__get_deleter(std::type_info const&) const' from file 'workdir/UnpackedTarball/libcdr/src/lib/.libs/libcdr-0.1.a(CDRDocument.o)' to global weak symbol 'typeinfo for std::__1::shared_ptr<librevenge::RVNGInputStream>::__shared_ptr_default_delete<librevenge::RVNGInputStream, librevenge::RVNGInputStream>' from file 'workdir/UnpackedTarball/libqxp/src/lib/.libs/libqxp-0.0.a(QXPMacFileParser.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.

<http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=commitdiff;
h=df0894ad1a8195df67a52108b931e07d708cec9a> "ax_gcc_func_attribute: Revise the
detection of unknown attributes", even though it was apparently meant to fix
something different, nicely fixes this Clang issue, making AX_GCC_FUNC_ATTRIBUTE
correctly detect support for visibility now.

When building with Clang on Linux, there is no -Wunsupported-visibility about
__attribute__((visibility("protected"))), but all the -Wunused-macros are
present as well, which caused all the AX_GCC_FUNC_ATTRIBUTE checks to be mis-
detected as "no" there, too.

There are more uses of AX_GCC_FUNC_ATTRIBUTE in
workdir/UnpackedTarball/libcdr/configure.ac and
workdir/UnpackedTarball/libqxp/configure.ac, and there are many more
workdir/UnpackedTarball/*/m4/ax_gcc_func_attribute.m4 in other external projects,
all of which may cause similar AX_GCC_FUNC_ATTRIBUTE mis-detections.  However,
they do not cause any noticeable traces like the "direct access" ld warning here,
so I left those alone for now.  (Ultimately, all the upstream external projects
should probably deploy the latest version of ax_gcc_func_attribute.m4 from
<http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;
f=m4/ax_gcc_func_attribute.m4>.)

Change-Id: Ia0560cace770ec7da9ee390566a01a5c592f9209
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109774
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-22 07:31:49 +01:00
Eike Rathke
8335c8c207 Update to ICU 68.1
Also made it necessary to adapt two places in libcdr and libebook
that used UBool TRUE which is gone now to use standard true
instead.

Change-Id: I1c1df3030f8b883bec6045756907ee0b78060382
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105964
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
2020-11-17 16:33:33 +01:00
David Tardon
85dc497f15 upload libcdr 0.1.6
Change-Id: I569f8ed92358982edbc419a6b687652ffd4fcb14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88236
Tested-by: Jenkins
Reviewed-by: David Tardon <dtardon@redhat.com>
2020-02-08 16:26:23 +01:00
Stephan Bergmann
28e028680b Remove legacy NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY support
...for ASan/UBSan builds using Clang older than current trunk twoards Clang 9,
as announced at
<https://lists.freedesktop.org/archives/libreoffice/2019-May/082654.html> "Re:
[Libreoffice-commits] core.git: The -fvisibility-ms-compat hack is no longer
needed for UBSan on Linux...".  (And drop the no longer needed
solenv/sanitizers/asan-suppressions, which people might still reference from
their ASAN_OPTIONS.)

Change-Id: Iedc0c5955366d2cbe7dc847990e2b1576750e85b
Reviewed-on: https://gerrit.libreoffice.org/72493
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-20 13:31:50 +02:00
Stephan Bergmann
4c707b78a7 external/libcdr: Avoid UB converting from double to int via unsigned
Opening cdr/fdo53278-4.cdr as obtained by
bin/get-bugzilla-attachments-by-mimetype (i.e., the attachment at
<https://bugs.documentfoundation.org/show_bug.cgi?id=53278#c14>) under
-fsanitize=undefined causes

> CDRPath.cpp:821:34: runtime error: -173.908 is outside the range of representable values of type 'unsigned int'
>  #0 in libcdr::CDRPath::writeOut(librevenge::RVNGString&, librevenge::RVNGString&, double&) const at workdir/UnpackedTarball/libcdr/src/lib/CDRPath.cpp:821:34 (instdir/program/../program/libwpftdrawlo.so +0x2380015)
>  #1 in libcdr::CDRContentCollector::_lineProperties(librevenge::RVNGPropertyList&) at workdir/UnpackedTarball/libcdr/src/lib/CDRContentCollector.cpp:1118:17 (instdir/program/../program/libwpftdrawlo.so +0x2090b54)
>  #2 in libcdr::CDRContentCollector::_flushCurrentPath() at workdir/UnpackedTarball/libcdr/src/lib/CDRContentCollector.cpp:240:5 (instdir/program/../program/libwpftdrawlo.so +0x2070a9e)
>  #3 in libcdr::CDRContentCollector::collectLevel(unsigned int) at workdir/UnpackedTarball/libcdr/src/lib/CDRContentCollector.cpp:563:5 (instdir/program/../program/libwpftdrawlo.so +0x209243d)
>  #4 in libcdr::CDRParser::parseRecord(librevenge::RVNGInputStream*, std::vector<unsigned int, std::allocator<unsigned int> > const&, unsigned int) at workdir/UnpackedTarball/libcdr/src/lib/CDRParser.cpp:514:18 (instdir/program/../program/libwpftdrawlo.so +0x213bdff)
>  #5 in libcdr::CDRParser::parseRecords(librevenge::RVNGInputStream*, std::vector<unsigned int, std::allocator<unsigned int> > const&, unsigned int) at workdir/UnpackedTarball/libcdr/src/lib/CDRParser.cpp:500:10 (instdir/program/../program/libwpftdrawlo.so +0x213b93f)
[...]

Change-Id: Ie73965851102689ebb7895d61edb3d32ff47c60c
Reviewed-on: https://gerrit.libreoffice.org/73181
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-29 21:42:24 +02:00
Stephan Bergmann
c7ece07d2e Pass --enable-debug into external/libcdr
(but which requires a little upstream master patch)

Change-Id: I4bea938c402b03d8b05b6e70694ecc0184544b81
Reviewed-on: https://gerrit.libreoffice.org/73179
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-29 21:41:48 +02:00
Stephan Bergmann
9a7aa3326d The -fvisibility-ms-compat hack is no longer needed for UBSan on Linux...
...with latest Clang trunk towards Clang 9.  All the no-longer necessary hacks
are made conditional on new NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY, which is
still set for UBSan builds with older Clang on Linux (but which should
eventually be purged).

Various classes needed additional SAL_DLLPUBLIC_RTTI annotations, as building
with UBSan instrumentation can generate references to RTTI symbols from
additional places like outside a dynamic library that used to hide those symbols
by default (but used to not hide them for old UBSan builds thanks to the
-fvisibility-ms-compat hack).

The odr-violation suppressions in solenv/sanitizers/asan-suppressions (which is
not referenced from anywhere in the code base, but meant to be included in an
ASan/UBSan build's ASAN_OPTIONS env var) are also no longer needed when
NEED_CLANG_LINUX_UBSAN_RTTI_VISIBILITY is false.

Change-Id: I24ec3e388b0cbab50dbe2bf008d9569bff7bf25a
Reviewed-on: https://gerrit.libreoffice.org/70829
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-03 13:46:25 +02:00
David Tardon
a8965ebc1b upload libcdr 0.1.5
Change-Id: I01454cc35baf96743bd19e64dd3a7269c58621bf
Reviewed-on: https://gerrit.libreoffice.org/65715
Tested-by: Jenkins
Reviewed-by: David Tardon <dtardon@redhat.com>
2018-12-29 22:01:48 +01:00
David Tardon
f2db08b28e use the new gbuild way to update config.*
Change-Id: I43805ac8c3d5c1b65519da02c3cc50fdb9729ea6
Reviewed-on: https://gerrit.libreoffice.org/42941
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
2017-10-04 08:12:43 +02:00
jan Iversen
bc6aa1c4c3 iOS, patch libcdr to accept 64bit compile
Change-Id: Ifa52ee6caedbf79450b098a3a0debe75836debb8
2017-09-19 15:39:32 +02:00
David Tardon
a359d8dbd5 upload libcdr 0.1.4
Change-Id: Ie90a720d249ff85e667c6e96d639369ed48519b8
Reviewed-on: https://gerrit.libreoffice.org/42352
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
2017-09-16 15:27:26 +02:00
jan Iversen
ca0bcd62b9 iOS, patch libcdr
support for arm64

Change-Id: I8d7bd37ce4c6ebde06b0662dd3d959337384d35e
2017-06-12 18:13:36 +02:00
Stephan Bergmann
ba8a957bfa Generalize COM_GCC_IS_CLANG -> COM_IS_CLANG
...in anticipation of building with clang-cl.exe on Windows

Change-Id: I1d723c9d3b5ca8a2bc6b27ef0189a7b053581398
Reviewed-on: https://gerrit.libreoffice.org/19928
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2015-11-12 17:37:11 +00:00
Stephan Bergmann
f0aa1a78fb For Clang -fsanitize=vptr use -fvisibility-ms-compat, not -fvisibility=hidden
As discussed in b4f6b26b5a "SAL_DLLPUBLIC_RTTI for
proper RTTI visibility for LLVM," RTTI-based -fsanitize= checks with Clang on
Linux need special precautions to make RTTI symbols visible across DSOs.  The
approach taken there, as well as in 598d8194b0
"Visible function type RTTI for Clang -fsanitize=function," was to add explicit
SAL_DLLPUBLIC_RTTI annontations to relevant type definitions.  However, for
-fsanitize=vptr that would have required many more of those, so it appears
easier to "misuse" -fsanitize-ms-compat in that case, which happens to give all
RTTI symbols default visibility (while otherwise still honoring our
SAL_DLLPUBLIC/PRIVATE annotations).

The SAL_DLLPUBLIC_RTTI annotations from 598d8194b0
"Visible function type RTTI for Clang -fsanitize=function" can likely be removed
again.

Change-Id: Ibeff7ab8c908111a7dc66ff0677204f112b24db8
2015-02-27 10:05:22 +01:00
Fridrich Štrba
32f301f5a6 Uploading libcdr-0.0.15: Support for CorelDraw x7
Change-Id: I1cc6c6ab39ec27dbf08c2019c7dd7f8f29537520
2014-04-04 15:45:52 +02:00
Khaled Hosny
e65ca87fd1 fdo#70393: move libcdr to a subdir of external
Change-Id: If862bdfc338daa60a104e9b28924343363bb2fab
Reviewed-on: https://gerrit.libreoffice.org/6328
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
2013-10-19 07:33:37 +00:00
Renamed from libcdr/UnpackedTarball_libcdr.mk (Browse further)