aports/community/webkit2gtk-4.1/initial-exec.patch

23 lines
1.1 KiB
Diff

it is not portable to use initial-exec in shared objects that are meant to be
dlopen'd.
glibc reserves some space to allow this anyway- but other libcs like musl do
not.
using an initial-exec variables forces the entire libwebkit2gtk.so to gain a TLS
program header, which makes it fail to dlopen with musl's loader.
see https://gitlab.freedesktop.org/mesa/mesa/-/commit/8570a2a280587a1e43ac11ad46ad62dfdd6c7b39
--
diff --git a/Source/WebCore/platform/graphics/gbm/GraphicsContextGLANGLELinux.cpp b/Source/WebCore/platform/graphics/gbm/GraphicsContextGLANGLELinux.cpp
index f8627d2c..6666f6d0 100644
--- a/Source/WebCore/platform/graphics/gbm/GraphicsContextGLANGLELinux.cpp
+++ b/Source/WebCore/platform/graphics/gbm/GraphicsContextGLANGLELinux.cpp
@@ -108,7 +108,7 @@ RefPtr<PixelBuffer> GraphicsContextGLANGLE::readCompositedResults()
bool GraphicsContextGLANGLE::makeContextCurrent()
{
- static thread_local TLS_MODEL_INITIAL_EXEC GraphicsContextGLANGLE* s_currentContext { nullptr };
+ static thread_local GraphicsContextGLANGLE* s_currentContext { nullptr };
if (s_currentContext == this)
return true;