mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] LoongArch:add LARCH related macro definitions.
@ 2024-02-26  7:47 Hongliang Wang
  0 siblings, 0 replies; only message in thread
From: Hongliang Wang @ 2024-02-26  7:47 UTC (permalink / raw)
  To: musl

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

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

[-- Attachment #2: 0001-LoongArch-add-LARCH-related-macro-definitions.patch --]
[-- Type: text/x-patch, Size: 1140 bytes --]

From bc9e863c3dc47cf18671c9b3cceec723b743673d Mon Sep 17 00:00:00 2001
From: wanghongliang <wanghongliang@loongson.cn>
Date: Mon, 26 Feb 2024 02:37:08 +0800
Subject: [PATCH] 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. add these macros in musl loongarch.

Signed-off-by: wanghongliang <wanghongliang@loongson.cn>
---
 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-26  7:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-26  7:47 [musl] LoongArch:add LARCH related macro definitions Hongliang Wang

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