Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Date: Mon, 26 Feb 2024 15:47:01 +0800
From: Hongliang Wang <>
Subject: LoongArch:add LARCH related macro definitions.


ruby 3.3.0 references several LARCH related macros, which are defined
in glibc, but not in musl. So there is a compile error when compile ruby 
3.3.0 in musl. I add these macros in musl loongarch.

  arch/loongarch64/bits/signal.h | 11 +++++++++++
  1 file changed, 11 insertions(+)

diff --git a/arch/loongarch64/bits/signal.h b/arch/loongarch64/bits/signal.h
index 8e0e605c..5a9ed8c9 100644
--- a/arch/loongarch64/bits/signal.h
+++ b/arch/loongarch64/bits/signal.h
@@ -6,6 +6,17 @@
  #define SIGSTKSZ 16384

+#if defined(_GNU_SOURCE)
+#define LARCH_NGREG 32
+#define LARCH_REG_RA 1
+#define LARCH_REG_SP 3
+#define LARCH_REG_S0 23
+#define LARCH_REG_S1 24
+#define LARCH_REG_A0 4
+#define LARCH_REG_S2 25
+#define LARCH_REG_NARGS 8
  #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  typedef unsigned long greg_t, gregset_t[32];


View attachment "0001-LoongArch-add-LARCH-related-macro-definitions.patch" of type "text/x-patch" (1142 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.