mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] REG_SP Definition for RISC-V
@ 2020-02-03 11:42 Mark Corbin
  2020-02-03 13:32 ` Rich Felker
  0 siblings, 1 reply; 10+ messages in thread
From: Mark Corbin @ 2020-02-03 11:42 UTC (permalink / raw)
  To: musl

Hello

I'm trying to fix a build issue with libsigsegv [1] for RISC-V when compiling 
against musl 1.1.24 (under Buildroot).

The build fails because the array index 'REG_SP' (for indexing into 
uc_mcontext.__gregs[]) is not defined in arch/riscv64/bits/signal.h. This 
constant is defined by glibc in sysdeps/unix/sysv/linux/riscv/sys/ucontext.h

I was wondering whether the appropriate fix is just to add '#define REG_SP 2' to 
the top of arch/riscv64/bits/signal.h ? (Note that there is a REG_SP definition 
in arch/riscv64/bits/reg.h which isn't being included).

Alternatively I could submit a patch to libsigsegv to modify the index into 
the '__gregs' array to be '2' rather than 'REG_SP', however there could be 
other glibc compatible RISC-V packages that make use of the 'REG_SP' 
definition.

I'm happy to generate and submit any patches as appropriate.

Thanks

Mark Corbin

[1] http://savannah.gnu.org/projects/libsigsegv/





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-02-19  3:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-03 11:42 [musl] REG_SP Definition for RISC-V Mark Corbin
2020-02-03 13:32 ` Rich Felker
2020-02-03 15:17   ` Mark Corbin
2020-02-03 15:24     ` Rich Felker
2020-02-04 10:03       ` Mark Corbin
2020-02-04 14:26         ` Rich Felker
2020-02-04 14:31           ` [musl] [PATCH] move riscv64 register index constants to signal.h Rich Felker
2020-02-11 14:19             ` Mark Corbin
2020-02-18 19:17           ` [musl] REG_SP Definition for RISC-V Palmer Dabbelt
2020-02-19  3:17             ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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).