diff --git a/srcpkgs/libglvnd/patches/musl-noasm-use-o0.patch b/srcpkgs/libglvnd/patches/musl-noasm-use-o0.patch index 8c84c489a57..ecfc90aaf9c 100644 --- a/srcpkgs/libglvnd/patches/musl-noasm-use-o0.patch +++ b/srcpkgs/libglvnd/patches/musl-noasm-use-o0.patch @@ -1,31 +1,20 @@ -From d82adbb78a246d68d67a951cdfc81b757fac2453 Mon Sep 17 00:00:00 2001 -From: Daniel Kolesa -Date: Mon, 10 May 2021 23:02:21 +0200 -Subject: [PATCH] lower optimization for dispatch code when using C + tsb +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 (where one must set `-Dtls=enabled`). I haven't been -able to track it down yet, but this workaround at least makes it -stop happening. ---- - src/GLdispatch/vnd-glapi/meson.build | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) +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. -diff --git src/GLdispatch/vnd-glapi/meson.build src/GLdispatch/vnd-glapi/meson.build -index 615cdff..94310b3 100644 --- a/src/GLdispatch/vnd-glapi/meson.build +++ b/src/GLdispatch/vnd-glapi/meson.build -@@ -35,8 +35,12 @@ else +@@ -35,8 +35,10 @@ else endif _entry_files = [] +_extra_cflags = [] if gl_dispatch_type == 'pure_c' _entry_files += 'entry_pure_c.c' -+ if not have_tls -+ _extra_cflags += '-O0' -+ endif ++ _extra_cflags += '-O0' else _entry_files += 'entry_common.c' if gl_dispatch_type != 'armv7_tsd' diff --git a/srcpkgs/libglvnd/template b/srcpkgs/libglvnd/template index fbfa0908133..56e095decdd 100644 --- a/srcpkgs/libglvnd/template +++ b/srcpkgs/libglvnd/template @@ -1,6 +1,6 @@ # Template file for 'libglvnd' pkgname=libglvnd -version=1.3.3 +version=1.4.0 revision=1 wrksrc="libglvnd-v${version}" build_style=meson @@ -12,22 +12,14 @@ maintainer="Stefano Ragni " license="custom:MIT-alike" homepage="https://gitlab.freedesktop.org/glvnd/libglvnd" distfiles="https://gitlab.freedesktop.org/glvnd/libglvnd/-/archive/v${version}/libglvnd-v${version}.tar.gz" -checksum=e768f43a0b23d9a8c9f1bed425f7f15d8491a1780253945a4445ddc40e5f6f84 +checksum=33b8b993adf47a21bc1c46bcf970927edeb9884390d5b09b1aed051d600c0b2f provides="libGL-7.11_1 libEGL-7.11_1 libGLES-7.11_1" replaces="libGL>=0 libEGL>=0 libGLES>=0" -# Disable TLS with musl: https://bugs.freedesktop.org/show_bug.cgi?id=35268 -if [ "$XBPS_TARGET_LIBC" = "musl" ]; then - configure_args="-Dtls=disabled" -fi - -# ppc64_tsd (used when ppc64_tls is not available) -# is broken with threads, so disable it on musl +# tls asm requires initial-exec, disable asm for musl case "$XBPS_TARGET_MACHINE" in - ppc*-musl) configure_args+=" -Dasm=disabled";; - ppc64*) ;; - arm*|mips*|ppc*) configure_args+=" -Dasm=disabled";; + *-musl|arm*|mips*) configure_args+=" -Dasm=disabled";; esac do_check() {