main/musl: Add lsx and lasx regset definition for loongarch64

Patch backported from:
https://www.openwall.com/lists/musl/2024/08/02/1
This commit is contained in:
Jingyun Hua 2024-08-05 07:09:22 +00:00 committed by Celeste
parent 91efce0a6c
commit ed8fd489f4
2 changed files with 37 additions and 1 deletions

View file

@ -3,7 +3,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=musl
pkgver=1.2.5
pkgrel=1
pkgrel=2
pkgdesc="the musl c library (libc) implementation"
url="https://musl.libc.org/"
arch="all"
@ -22,6 +22,7 @@ esac
source="https://musl.libc.org/releases/musl-$pkgver.tar.gz
handle-aux-at_base.patch
ldso-fix-non-functional-fix-to-early-dynamic-PAGE_SI.patch
loongarch64-Add-lsx-and-lasx-vector-structure-defini.patch
ldconfig
__stack_chk_fail_local.c
@ -163,6 +164,7 @@ sha512sums="
7bb7f7833923cd69c7a1a9b8a5f1784bfd5289663eb6061dcd43d583e45987df8a68a1be05d75cc1c88a3f5b610653d1a70f4a9cff4d8f7fd41ae73ee058c17c musl-1.2.5.tar.gz
a76f79b801497ad994746cf82bb6eaf86f9e1ae646e6819fbae8532a7f4eee53a96ac1d4e789ec8f66aea2a68027b0597f7a579b3369e01258da8accfce41370 handle-aux-at_base.patch
1b85079c706b017106ecbf4afbc65b4a2171297a673035645e4c3ddb7e2aae0549b04932df83778323b7329ae8d32160a89e0c1b2534c278708c61b1f40a1ed8 ldso-fix-non-functional-fix-to-early-dynamic-PAGE_SI.patch
b4d95231944fd236827a62343bbce74b20a56739e2b8937bda69bfc7b53f2ce5bd709459ee61615bd10d2839f43311eced9344ee8185701fd38ec0de0d43c6ae loongarch64-Add-lsx-and-lasx-vector-structure-defini.patch
8d3a2d5315fc56fee7da9abb8b89bb38c6046c33d154c10d168fb35bfde6b0cf9f13042a3bceee34daf091bc409d699223735dcf19f382eeee1f6be34154f26f ldconfig
062bb49fa54839010acd4af113e20f7263dde1c8a2ca359b5fb2661ef9ed9d84a0f7c3bc10c25dcfa10bb3c5a4874588dff636ac43d5dbb3d748d75400756d0b __stack_chk_fail_local.c
0d80f37b34a35e3d14b012257c50862dfeb9d2c81139ea2dfa101d981d093b009b9fa450ba27a708ac59377a48626971dfc58e20a3799084a65777a0c32cbc7d getconf.c

View file

@ -0,0 +1,34 @@
From b7dc707babb647d3a4dd5ee3201ae9dd578a071c Mon Sep 17 00:00:00 2001
From: Xing Li <lixing@loongson.cn>
Date: Thu, 1 Aug 2024 08:55:54 +0800
Subject: [PATCH] loongarch64: Add lsx and lasx vector structure definition
The lack of lsx and lasx strucuture define lead to
the upstream binutils-gdb build error.
---
arch/loongarch64/bits/user.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/loongarch64/bits/user.h b/arch/loongarch64/bits/user.h
index fd9b7b22..10e1be45 100644
--- a/arch/loongarch64/bits/user.h
+++ b/arch/loongarch64/bits/user.h
@@ -22,3 +22,15 @@ typedef union {
float f;
} elf_fpreg_t;
typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
+
+typedef union
+{
+ double d[2];
+ float f[4];
+} elf_lsxregset_t[32] __attribute__((__aligned__(16)));
+
+typedef union
+{
+ double d[4];
+ float f[8];
+} elf_lasxregset_t[32] __attribute__((__aligned__(32)));
--
2.27.0