File tlsdesc_test.patch of Package Mesa
16
1
LTO defeats the -fpic workaround and enables TLS relaxation anyway
2
3
Index: mesa-24.3.0-rc1/meson.build
4
===================================================================
5
--- mesa-24.3.0-rc1.orig/meson.build
6
+++ mesa-24.3.0-rc1/meson.build
7
8
foreach tlsdesc_arg : ['-mtls-dialect=gnu2', '-mtls-dialect=desc']
9
# -fpic to force dynamic tls, otherwise TLS relaxation defeats check
10
tlsdesc_test = cc.run('int __thread x; int main() { return x; }',
11
- args: [tlsdesc_arg, '-fpic'],
12
+ args: [tlsdesc_arg, '-fpic', '-fno-lto'],
13
name: tlsdesc_arg)
14
if tlsdesc_test.returncode() == 0 and (
15
# check for lld 13 bug: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5665
16