* [PATCH] mesa: Disble TLS for musl
@ 2018-08-14 18:21 Khem Raj
0 siblings, 0 replies; only message in thread
From: Khem Raj @ 2018-08-14 18:21 UTC (permalink / raw)
To: openembedded-core
See https://bugs.freedesktop.org/show_bug.cgi?id=35268
mesa should infact stop using __attribute__((tls_model("initial-exec")))
until then we disale TLS in glx for musl
The problem could happen even on glibc if static TLS sizes are large enough
which would mean that additional space the glibc leaves for such rogue libraries
get consumed and then same problems show up there as well
Fixes errors seen in xorg logs e.g.
(EE) Failed to load /usr/lib/xorg/modules/extensions/libglx.so: Error relocating /usr/lib/libGL.so.1: _ITM_deregisterTMCloneTable: initial-exec TLS resolves to dynamic definition in /usr/lib/libGL.so.1
enable readonly text segment on x86 for musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/recipes-graphics/mesa/mesa.inc | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 860a2d94cc..3a723b59a6 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -105,11 +105,15 @@ PACKAGECONFIG[osmesa] = "--enable-${OSMESA},--disable-${OSMESA}"
PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
+EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls"
+EXTRA_OECONF_append_libc-musl = " --disable-glx-tls"
+
# llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"
CFLAGS_append_armv5 = " -DMISSING_64BIT_ATOMICS"
-
+CFLAGS_append_x86_libc-musl = " -DGLX_X86_READONLY_TEXT"
+CFLAGS_append_x86-64_libc-musl = " -DGLX_X86_READONLY_TEXT"
EXTRA_OEMAKE += "WAYLAND_PROTOCOLS_DATADIR=${STAGING_DATADIR}/wayland-protocols"
# Remove the mesa dependency on mesa-dev, as mesa is empty
--
2.18.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-08-14 18:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-14 18:21 [PATCH] mesa: Disble TLS for musl Khem Raj
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox