diff options
author | Khem Raj <raj.khem@gmail.com> | 2018-10-02 17:44:05 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-10-04 14:21:41 +0100 |
commit | 68bf128e901e89d5b49a28b15d5083b2bf6b536f (patch) | |
tree | f4fd6d193d852602571c83e14a5e8a9eeef406d4 /meta/recipes-graphics/mesa | |
parent | 6667bc0b6d45c9054dc0ba5862e2f494f0e89f00 (diff) | |
download | poky-68bf128e901e89d5b49a28b15d5083b2bf6b536f.tar.gz |
mesa: Disable asm on musl
Musl started blocking dlopen of libs with initial-exec references into
dynamic TLS area, via
https://github.com/kraj/musl/commit/5c2f46a214fceeee3c3e41700c51415e0a4f1acd
prior to that commit, musl was loading it and silently letting
subsequent TLS accesses via the miscompiled code clobber memory that
didn't belong to them
This was wrong behavior and it relied on additional space reserved by
libc in TLS space to adjust fo such broken libs, but it also fails
with glibc if the reserved space was already used up
Right fix is that mesa should be patched to remove all the
initial-exec hacks and use real TLS, and -mtls-dialect=gnu2 (TLSDESC)
should be used on archs it's supported on (i386, x86_64, and aarch64)
to make up for the lost performance, but mesa hardcodes the initial-exec,
so there must be a reason that probably is better known to mesa devs.
but we 'fixed' it for musl by adding --disable-glx-tls for mesa in OE,
which uses pthread_getspecific instead and makes is lot slower.
this caused additional problems with security flags on, it get textrels
in .text segment. Therefore this is 'second fix' to get us through this
warning.
Cause is some unknown part of mesa's x86 assembly code is broken by
readonly text segments
[ YOCTO #12918 ]
(From OE-Core rev: 27c25de38aacc98fe376422bbbee417b2b45a98e)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/mesa')
-rw-r--r-- | meta/recipes-graphics/mesa/mesa.inc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 8d0e2cb67c..0dfdfbd5b4 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc | |||
@@ -108,6 +108,8 @@ PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind" | |||
108 | 108 | ||
109 | EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls" | 109 | EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls" |
110 | EXTRA_OECONF_append_libc-musl = " --disable-glx-tls" | 110 | EXTRA_OECONF_append_libc-musl = " --disable-glx-tls" |
111 | EXTRA_OECONF_append_libc-musl_x86 = " --disable-asm" | ||
112 | |||
111 | # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2) | 113 | # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2) |
112 | FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer" | 114 | FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer" |
113 | 115 | ||