aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc/0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch
blob: a2c0c036617c33f4e8a2876591cab1c3be3903c9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From f634ef3142f759c8220830b77487fe9686ee0f61 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Sun, 30 Aug 2020 19:27:51 +0200
Subject: [PATCH] gcc-go: undef SETCONTEXT_CLOBBERS_TLS in proc.c

---
 libgo/runtime/proc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c
index 6f7d2e27996..5afd7902497 100644
--- a/libgo/runtime/proc.c
+++ b/libgo/runtime/proc.c
@@ -66,6 +66,10 @@ static void gscanstack(G*);
 
 __thread G *g __asm__(GOSYM_PREFIX "runtime.g");
 
+/* libucontext does not seem to support tlsbase, undef the macro
+ * here to make sure we define initcontext and fixcontext as dummies. */
+#undef SETCONTEXT_CLOBBERS_TLS
+
 #ifndef SETCONTEXT_CLOBBERS_TLS
 
 static inline void
-- 
2.31.0