[Libreoffice-commits] core.git: external/epoxy

Stephan Bergmann sbergman at redhat.com
Fri Apr 21 16:47:18 UTC 2017


 external/epoxy/UnpackedTarball_epoxy.mk |    1 +
 external/epoxy/clang-cl.patch           |   14 ++++++++++++++
 2 files changed, 15 insertions(+)

New commits:
commit a49d3b14a65a32b8f8c511d38904b41a2c2b447f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri Apr 21 18:34:46 2017 +0200

    external/epoxy: Work around missing clang-cl DLL-init CONSTRUCT support
    
    Looks like neither the __GNUC__ specific __attribute__((constructor)) definition
    of CONSTRUCT nor the _MSC_VER specific one (if the #ifs were reordered so that
    clang-cl would pick the latter) with __declspec(allocate(".CRT$XCU")) are
    supported by clang-cl, and both are rather silently ignored.  That means that
    library_init is not called, library_initialized remains false, and the first
    call to get_dlopen_handle aborts.
    
    But this whole "verify that get_dlopen_handle isn't called too early" business
    is somewhat pointless here (and that's the only use of the CONSTRUCT macro, and
    DESTRUCT isn't used at all), so just short-circuit it for clang-cl for now.
    
    Change-Id: I5d50df3574d350f9591e807ef0fb6a1b02dc34ec

diff --git a/external/epoxy/UnpackedTarball_epoxy.mk b/external/epoxy/UnpackedTarball_epoxy.mk
index 0d51548e3eee..ea088058429e 100644
--- a/external/epoxy/UnpackedTarball_epoxy.mk
+++ b/external/epoxy/UnpackedTarball_epoxy.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,epoxy,0))
 $(eval $(call gb_UnpackedTarball_add_patches,epoxy, \
     external/epoxy/epoxy.windows.api.patch \
     external/epoxy/epoxy.noegl.by.default.patch \
+    external/epoxy/clang-cl.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/epoxy/clang-cl.patch b/external/epoxy/clang-cl.patch
new file mode 100755
index 000000000000..80b49127104b
--- /dev/null
+++ b/external/epoxy/clang-cl.patch
@@ -0,0 +1,14 @@
+--- src/dispatch_common.c
++++ src/dispatch_common.c
+@@ -190,7 +190,11 @@
+ #endif
+ };
+ 
++#if defined _MSC_VER && defined __clang__
++static bool library_initialized = true;
++#else
+ static bool library_initialized;
++#endif
+ 
+ static bool epoxy_current_context_is_glx(void);
+ 


More information about the Libreoffice-commits mailing list