void-packages/srcpkgs/libglvnd/patches/musl-noasm-use-o0.patch

42 lines
1.3 KiB
Diff

lower optimization for dispatch code when using C
there appears to be some bug in the code which causes crashes
with threaded opengl setups; this manifests at least on ppc64(le)
with musl, using either tsd or tls. I haven't been able to track
it down yet, but this workaround at least makes it stop happening.
--- a/src/GLdispatch/vnd-glapi/meson.build
+++ b/src/GLdispatch/vnd-glapi/meson.build
@@ -35,8 +35,10 @@ else
endif
_entry_files = []
+_extra_cflags = []
if gl_dispatch_type == 'pure_c'
_entry_files += 'entry_pure_c.c'
+ _extra_cflags += '-O0'
else
_entry_files += 'entry_common.c'
if gl_dispatch_type != 'armv7_tsd'
@@ -73,7 +77,7 @@ libglapi = static_library(
glapi_mapi_tmp_h,
_entry_files,
],
- c_args : ['-DMAPI_ABI_HEADER="@0@"'.format(glapi_mapi_tmp_h.full_path())],
+ c_args : ['-DMAPI_ABI_HEADER="@0@"'.format(glapi_mapi_tmp_h.full_path())] + _extra_cflags,
include_directories : inc_include,
dependencies : idep_utils_misc,
gnu_symbol_visibility : 'hidden',
@@ -89,7 +93,7 @@ foreach g : ['gl', 'opengl', 'glesv1', 'glesv2']
c_args : [
'-DSTATIC_DISPATCH_ONLY',
'-DMAPI_ABI_HEADER="@0@"'.format(header.full_path()),
- ],
+ ] + _extra_cflags,
include_directories : [inc_include, inc_util],
gnu_symbol_visibility : 'hidden',
)
--
2.31.1