[libbsd] add loongarch support
This commit is contained in:
parent
ec64322c45
commit
767bbe8207
25
0001-add-loongarch-support.patch
Normal file
25
0001-add-loongarch-support.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From b8be0013703604f1370eefb1f40fcaacc0e285a4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Lee Qian <liqian@kylinos.cn>
|
||||||
|
Date: Mon, 13 May 2024 16:10:39 +0800
|
||||||
|
Subject: [PATCH] add loonagrch support
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/local-elf.h b/src/local-elf.h
|
||||||
|
index f784b12..acf0820 100644
|
||||||
|
--- a/src/local-elf.h
|
||||||
|
+++ b/src/local-elf.h
|
||||||
|
@@ -197,7 +197,10 @@
|
||||||
|
#error Unsupported ELF class
|
||||||
|
#endif
|
||||||
|
#define ELF_TARG_DATA ELFDATA2LSB
|
||||||
|
-
|
||||||
|
+#elif defined(__loongarch64)
|
||||||
|
+#define ELF_TARG_MACH EM_LOONGARCH
|
||||||
|
+#define ELF_TARG_CLASS ELFCLASS64
|
||||||
|
+#define ELF_TARG_DATA ELFDATA2LSB
|
||||||
|
#elif defined(__sparc__)
|
||||||
|
|
||||||
|
#if defined(__arch64__)
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: libbsd
|
Name: libbsd
|
||||||
Version: 0.10.0
|
Version: 0.10.0
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Library providing BSD-compatible functions for portability
|
Summary: Library providing BSD-compatible functions for portability
|
||||||
URL: http://libbsd.freedesktop.org/
|
URL: http://libbsd.freedesktop.org/
|
||||||
License: BSD and ISC and Copyright only and Public Domain
|
License: BSD and ISC and Copyright only and Public Domain
|
||||||
@ -8,6 +8,7 @@ License: BSD and ISC and Copyright only and Public Domain
|
|||||||
Source0: http://libbsd.freedesktop.org/releases/libbsd-%{version}.tar.xz
|
Source0: http://libbsd.freedesktop.org/releases/libbsd-%{version}.tar.xz
|
||||||
# Use symver attribute for symbol versioning
|
# Use symver attribute for symbol versioning
|
||||||
Patch1: %{name}-symver.patch
|
Patch1: %{name}-symver.patch
|
||||||
|
Patch2: 0001-add-loongarch-support.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: autoconf automake libtool
|
BuildRequires: autoconf automake libtool
|
||||||
@ -40,6 +41,10 @@ configured using "pkg-config --libs libbsd-ctor".
|
|||||||
|
|
||||||
%patch1 -p1 -b .symver
|
%patch1 -p1 -b .symver
|
||||||
|
|
||||||
|
%ifarch loongarch64
|
||||||
|
%patch2 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -fiv
|
autoreconf -fiv
|
||||||
%configure
|
%configure
|
||||||
@ -77,5 +82,7 @@ rm %{buildroot}%{_mandir}/man3/explicit_bzero.3bsd
|
|||||||
%{_libdir}/pkgconfig/%{name}-ctor.pc
|
%{_libdir}/pkgconfig/%{name}-ctor.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon May 13 2024 Lee Qian <liqian@kylinos.cn> - 0.10.0-2
|
||||||
|
- add loongarch support
|
||||||
* Fri Jul 15 2022 misaka00251 <misaka00251@misakanet.cn> - 0.10.0-1
|
* Fri Jul 15 2022 misaka00251 <misaka00251@misakanet.cn> - 0.10.0-1
|
||||||
- Init package (Thanks to fedora team)
|
- Init package (Thanks to fedora team)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user