mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Hongliang Wang <wanghongliang@loongson.cn>
To: musl@lists.openwall.com
Subject: [musl] LoongArch:add LARCH related macro definitions.
Date: Mon, 26 Feb 2024 15:47:01 +0800	[thread overview]
Message-ID: <cb2b4777-5f99-a0c8-ae77-cb4b13735887@loongson.cn> (raw)

[-- 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


                 reply	other threads:[~2024-02-26  7:47 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb2b4777-5f99-a0c8-ae77-cb4b13735887@loongson.cn \
    --to=wanghongliang@loongson.cn \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).