mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
libGL: request stack size on newer musl systems
since 1.1.21 musl supports reading the minimal stack size from the PT_GNU_STACK elf header[1]. [1] https://git.musl-libc.org/cgit/musl/commit/?id=7b3348a98c139b4b4238384e52d4b0eb237e4833
This commit is contained in:
parent
b267b02a39
commit
3dc48b45dd
2 changed files with 2 additions and 36 deletions
|
@ -1,35 +0,0 @@
|
||||||
diff --git ./include/c11/threads_posix.h ./include/c11/threads_posix.h
|
|
||||||
index 45cb6075e6..1a2ea1a450 100644
|
|
||||||
--- ./include/c11/threads_posix.h
|
|
||||||
+++ ./include/c11/threads_posix.h
|
|
||||||
@@ -281,15 +281,29 @@ static inline int
|
|
||||||
thrd_create(thrd_t *thr, thrd_start_t func, void *arg)
|
|
||||||
{
|
|
||||||
struct impl_thrd_param *pack;
|
|
||||||
+#ifdef __GLIBC__
|
|
||||||
+ pthread_attr_t *attrp = NULL;
|
|
||||||
+#else
|
|
||||||
+ pthread_attr_t attr = { 0 };
|
|
||||||
+ pthread_attr_init(&attr);
|
|
||||||
+ pthread_attr_setstacksize(&attr, 8388608);
|
|
||||||
+ pthread_attr_t *attrp = &attr;
|
|
||||||
+#endif
|
|
||||||
assert(thr != NULL);
|
|
||||||
pack = (struct impl_thrd_param *)malloc(sizeof(struct impl_thrd_param));
|
|
||||||
if (!pack) return thrd_nomem;
|
|
||||||
pack->func = func;
|
|
||||||
pack->arg = arg;
|
|
||||||
- if (pthread_create(thr, NULL, impl_thrd_routine, pack) != 0) {
|
|
||||||
+ if (pthread_create(thr, attrp, impl_thrd_routine, pack) != 0) {
|
|
||||||
+#ifndef __GLIBC__
|
|
||||||
+ pthread_attr_destroy(&attr);
|
|
||||||
+#endif
|
|
||||||
free(pack);
|
|
||||||
return thrd_error;
|
|
||||||
}
|
|
||||||
+#ifndef __GLIBC__
|
|
||||||
+ pthread_attr_destroy(&attr);
|
|
||||||
+#endif
|
|
||||||
return thrd_success;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'libGL'
|
# Template file for 'libGL'
|
||||||
pkgname=libGL
|
pkgname=libGL
|
||||||
version=18.3.2
|
version=18.3.2
|
||||||
revision=1
|
revision=2
|
||||||
wrksrc="mesa-${version}"
|
wrksrc="mesa-${version}"
|
||||||
build_style=meson
|
build_style=meson
|
||||||
configure_args="-Dshared-glapi=true -Dgbm=true -Degl=true
|
configure_args="-Dshared-glapi=true -Dgbm=true -Degl=true
|
||||||
|
@ -22,6 +22,7 @@ homepage="https://www.mesa3d.org/"
|
||||||
changelog="https://www.mesa3d.org/relnotes/${version}.html"
|
changelog="https://www.mesa3d.org/relnotes/${version}.html"
|
||||||
distfiles="https://mesa.freedesktop.org/archive/mesa-${version}.tar.xz"
|
distfiles="https://mesa.freedesktop.org/archive/mesa-${version}.tar.xz"
|
||||||
checksum=f7ce7181c07b6d8e0132da879af1729523a6c8aa87f79a9d59dfd064024cfb35
|
checksum=f7ce7181c07b6d8e0132da879af1729523a6c8aa87f79a9d59dfd064024cfb35
|
||||||
|
LDFLAGS+=" -Wl,-z,stack-size=2097152"
|
||||||
|
|
||||||
# Set subpackages manually to set proper rdeps in 32bit pkgs.
|
# Set subpackages manually to set proper rdeps in 32bit pkgs.
|
||||||
subpackages="libglapi libgbm libEGL libGLES libOSMesa"
|
subpackages="libglapi libgbm libEGL libGLES libOSMesa"
|
||||||
|
|
Loading…
Add table
Reference in a new issue