!13 add sw_64 support

From: @hailianguniontech 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
This commit is contained in:
openeuler-ci-bot 2025-05-13 08:44:31 +00:00 committed by Gitee
commit 7a10de8968
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,28 @@
From ff75bcb2259bee9a731f518a525b986ac3e6dfad Mon Sep 17 00:00:00 2001
From: Hailiang <mahailiang@uniontech.com>
Date: Tue, 13 May 2025 15:01:56 +0800
Subject: [PATCH] add sw_64 support
---
src/local-elf.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/local-elf.h b/src/local-elf.h
index c568727..79cb47f 100644
--- a/src/local-elf.h
+++ b/src/local-elf.h
@@ -242,6 +242,11 @@
#endif
#define ELF_TARG_DATA ELFDATA2MSB
+#elif defined(__sw_64__)
+#define ELF_TARG_MACH EM_SW_64
+#define ELF_TARG_DATA ELFDATA2LSB
+#define ELF_TARG_CLASS ELFCLASS64
+
#elif defined(__tilegx__)
#define ELF_TARG_MACH EM_TILEGX
--
2.20.1

View File

@ -1,6 +1,6 @@
Name: libbsd
Version: 0.10.0
Release: 2
Release: 3
Summary: Library providing BSD-compatible functions for portability
URL: http://libbsd.freedesktop.org/
License: BSD and ISC and Copyright only and Public Domain
@ -9,6 +9,7 @@ Source0: http://libbsd.freedesktop.org/releases/libbsd-%{version}.tar.xz
# Use symver attribute for symbol versioning
Patch1: %{name}-symver.patch
Patch2: 0001-add-loongarch64-support-for-libbsd.patch
Patch3: 0002-add-sw_64-support.patch
BuildRequires: gcc
BuildRequires: autoconf automake libtool
@ -41,6 +42,7 @@ configured using "pkg-config --libs libbsd-ctor".
%patch1 -p1 -b .symver
%patch2 -p1
%patch3 -p1
%build
autoreconf -fiv
@ -79,6 +81,9 @@ rm %{buildroot}%{_mandir}/man3/explicit_bzero.3bsd
%{_libdir}/pkgconfig/%{name}-ctor.pc
%changelog
* Tue May 13 2025 mahailiang <mahailiang@uniontech.com> - 0.10.0-3
- add sw_64 support
* Thu Oct 31 2024 Wenlong Zhang <zhangwenlong@loongson.cn> - 0.10.0-2
- add loongarch64 support for libbsd