Github messages for voidlinux
 help / color / mirror / Atom feed
From: q66 <q66@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: gcc fails to build with gccgo enabled for cross targets since gcc10
Date: Thu, 21 Jan 2021 14:15:40 +0100	[thread overview]
Message-ID: <20210121131540.KOObuMd8Dj0PZfQ0NmS_ouXFRgGyO3ZJMy78IhlL8r8@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-28076@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 2179 bytes --]

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 <daniel@octaforge.org>
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

  parent reply	other threads:[~2021-01-21 13:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-21 11:24 [ISSUE] " q66
2021-01-21 11:27 ` q66
2021-01-21 11:30 ` q66
2021-01-21 12:43 ` pullmoll
2021-01-21 13:05 ` pullmoll
2021-01-21 13:15 ` q66 [this message]
2021-01-21 13:19 ` q66
2021-01-21 13:19 ` pullmoll
2021-01-21 13:20 ` [ISSUE] [CLOSED] " q66
2021-01-21 13:20 ` q66
2021-01-21 13:20 ` pullmoll
2021-01-21 13:33 ` q66

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210121131540.KOObuMd8Dj0PZfQ0NmS_ouXFRgGyO3ZJMy78IhlL8r8@z \
    --to=q66@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).