Re: [gofrontend-dev] Re: [PATCH] libgo: include asm/ptrace.h for pt_regs definition on PowerPC

2022-03-06 Thread Rich Felker
On Sun, Mar 06, 2022 at 10:22:56AM -0500, Rich Felker wrote: > On Mon, Feb 21, 2022 at 09:25:43AM -0800, Ian Lance Taylor via Gcc-patches > wrote: > > Note for gofrontend-dev: on gcc-patches only Andreas Schwab suggested > > using uc_regs instead of regs, which does look correct to me. > > Yes, t

Re: [gofrontend-dev] Re: [PATCH] libgo: include asm/ptrace.h for pt_regs definition on PowerPC

2022-03-06 Thread Rich Felker
On Mon, Feb 21, 2022 at 09:25:43AM -0800, Ian Lance Taylor via Gcc-patches wrote: > Note for gofrontend-dev: on gcc-patches only Andreas Schwab suggested > using uc_regs instead of regs, which does look correct to me. Yes, this is absolutely the correct fix. Having pt_regs appear at all in code n

Re: [gofrontend-dev] Re: [PATCH] libgo: include asm/ptrace.h for pt_regs definition on PowerPC

2022-03-06 Thread Sören Tempel via Gcc-patches
What would be the benefit of using .uc_regs instead of .regs? The current code works entirely fine as it, it just needs an include of the Linux Kernel header defining the pt_regs type (which my proposed patch adds). Furthermore, it seems to me that .uc_regs is only available on powerpc but not on

Re: [gofrontend-dev] Re: [PATCH] libgo: include asm/ptrace.h for pt_regs definition on PowerPC

2022-02-21 Thread Ian Lance Taylor via Gcc-patches
Note for gofrontend-dev: on gcc-patches only Andreas Schwab suggested using uc_regs instead of regs, which does look correct to me. Ian On Mon, Feb 21, 2022 at 8:47 AM Sören Tempel wrote: > > Ping. > > Summary: Fix build of libgo on PPC with musl libc and libucontext by > explicitly including th

Re: [PATCH] libgo: include asm/ptrace.h for pt_regs definition on PowerPC

2022-02-20 Thread Andreas Schwab
On Jan 02 2022, soeren--- via Gcc-patches wrote: > libgo/runtime/go-signal.c: In function 'getSiginfo': > libgo/runtime/go-signal.c:227:63: error: invalid use of undefined type > 'struct pt_regs' > 227 | ret.sigpc = > ((ucontext_t*)(context))->uc_mcontext.regs->nip;

Re: [PATCH] libgo: include asm/ptrace.h for pt_regs definition on PowerPC

2022-02-20 Thread Sören Tempel via Gcc-patches
Ping. Summary: Fix build of libgo on PPC with musl libc and libucontext by explicitly including the Linux header defining `struct pt_regs` instead of relying on other libc headers to include it implicitly. See: https://gcc.gnu.org/pipermail/gcc-patches/2022-January/587520.html If the patch needs

[PATCH] libgo: include asm/ptrace.h for pt_regs definition on PowerPC

2022-01-02 Thread soeren--- via Gcc-patches
From: Sören Tempel Both glibc and musl libc declare pt_regs as an incomplete type. This type has to be completed by inclusion of another header. On Linux, the asm/ptrace.h header file provides this type definition. Without including this header file, it is not possible to access the regs member o