New comment by q66 on void-packages repository https://github.com/void-linux/void-packages/issues/28076#issuecomment-764635359 Comment: i figured it out because we override `CFLAGS` for the "internal" static build of `libucontext`, it never has `-DEXPORT_UNPREFIXED`, which means only the `libucontext_` prefixed symbols are contained in the library what i'm going to do is thís: ``` From 6d6c80991683656d69e715efc8cab6c9c77160cd Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Thu, 21 Jan 2021 14:13:32 +0100 Subject: [PATCH] gcc: patch gccgo on musl to allow usage of freestanding libucontext --- srcpkgs/gcc/files/gccgo-musl.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/srcpkgs/gcc/files/gccgo-musl.patch b/srcpkgs/gcc/files/gccgo-musl.patch index 9b3f3af9b7..1b1045b31d 100644 --- a/srcpkgs/gcc/files/gccgo-musl.patch +++ b/srcpkgs/gcc/files/gccgo-musl.patch @@ -186,6 +186,25 @@ URL: https://code.foxkit.us/adelie/packages/tree/master/system/gcc { mcontext_t *m = &((ucontext_t*)(context))->uc_mcontext; int i; +--- libgo/runtime/runtime.h ++++ libgo/runtime/runtime.h +@@ -500,10 +500,13 @@ int __go_setcontext(__go_context_t*); + void __go_makecontext(__go_context_t*, void (*)(), void*, size_t); + #else + #define __go_context_t ucontext_t +-#define __go_getcontext(c) getcontext(c) +-#define __go_setcontext(c) setcontext(c) ++int libucontext_getcontext(__go_context_t *); ++void libucontext_makecontext(__go_context_t *, void (*)(), int, ...); ++int libucontext_setcontext(const __go_context_t *); ++#define __go_getcontext(c) libucontext_getcontext(c) ++#define __go_setcontext(c) libucontext_setcontext(c) + #define __go_makecontext(c, fn, sp, size) \ +- ((c)->uc_stack.ss_sp = sp, (c)->uc_stack.ss_size = size, makecontext(c, fn, 0)) ++ ((c)->uc_stack.ss_sp = sp, (c)->uc_stack.ss_size = size, libucontext_makecontext(c, fn, 0)) + #endif + + // Symbols defined by the linker. --- libgo/sysinfo.c +++ libgo/sysinfo.c @@ -73,9 +73,6 @@ -- 2.30.0 ``` and then bump the respective crosstoolchains and that should fix the problem