Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <cb2b4777-5f99-a0c8-ae77-cb4b13735887@loongson.cn>
Date: Mon, 26 Feb 2024 15:47:01 +0800
From: Hongliang Wang <wanghongliang@...ngson.cn>
To: musl@...ts.openwall.com
Subject: LoongArch:add LARCH related macro definitions.

Hi,

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
  #endif

+#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
+#endif
+
  #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  typedef unsigned long greg_t, gregset_t[32];

-- 
2.37.1

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.