aboutsummaryrefslogtreecommitdiffstats
path: root/main/gc/0001-Fix-gctest-with-musl-libc-on-s390x.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-02-06 18:49:10 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-02-06 21:32:22 +0000
commitdf3cdb93ee43ef25e89e015173bb3e2cc09e8523 (patch)
tree59c831990c5b1600f681375d323946e7fcc45245 /main/gc/0001-Fix-gctest-with-musl-libc-on-s390x.patch
parentddb66736d5dd65ea36bf50e5d291f9f945ce4382 (diff)
downloadaports-df3cdb93ee43ef25e89e015173bb3e2cc09e8523.tar.bz2
aports-df3cdb93ee43ef25e89e015173bb3e2cc09e8523.tar.xz
main/gc: fix test on s390x
Diffstat (limited to 'main/gc/0001-Fix-gctest-with-musl-libc-on-s390x.patch')
-rw-r--r--main/gc/0001-Fix-gctest-with-musl-libc-on-s390x.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/main/gc/0001-Fix-gctest-with-musl-libc-on-s390x.patch b/main/gc/0001-Fix-gctest-with-musl-libc-on-s390x.patch
new file mode 100644
index 0000000000..832df2bfd8
--- /dev/null
+++ b/main/gc/0001-Fix-gctest-with-musl-libc-on-s390x.patch
@@ -0,0 +1,31 @@
+From 63ea237b7c367c56b6e14dd4d634b622e3fc0aa7 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Tue, 6 Feb 2018 21:21:23 +0100
+Subject: [PATCH] Fix gctest with musl libc on s390x
+
+Issue #202 (bdwgc).
+
+DEFAULT_STACK_MAYBE_SMALL is only set if PARALLEL_MARK is set, but stack
+is too small on musl libc even if PARALLEL_MARK is unset. We solve this
+by detecting musl via NO_GETCONTEXT.
+---
+ tests/test.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/tests/test.c b/tests/test.c
+index 7a45884f..70548806 100644
+--- a/tests/test.c
++++ b/tests/test.c
+@@ -2239,7 +2239,8 @@ int main(void)
+ }
+ # if defined(GC_IRIX_THREADS) || defined(GC_FREEBSD_THREADS) \
+ || defined(GC_DARWIN_THREADS) || defined(GC_AIX_THREADS) \
+- || defined(GC_OPENBSD_THREADS) || defined(DEFAULT_STACK_MAYBE_SMALL)
++ || defined(GC_OPENBSD_THREADS) || defined(DEFAULT_STACK_MAYBE_SMALL) \
++ || defined(NO_GETCONTEXT) /* musl libc */
+ if ((code = pthread_attr_setstacksize(&attr, 1000 * 1024)) != 0) {
+ GC_printf("pthread_attr_setstacksize failed, error=%d\n", code);
+ FAIL;
+--
+2.16.1
+