backport upstream patch to support riscv64
Signed-off-by: zzzum <ovezjin@outlook.com>
This commit is contained in:
parent
5f4832e5bb
commit
8ac3198143
114
Add-types.conf-for-riscv64-linux.patch
Normal file
114
Add-types.conf-for-riscv64-linux.patch
Normal file
@ -0,0 +1,114 @@
|
||||
Source: commit/3a280f70a36b56239d149d6205d20933151a2af3
|
||||
Author: Andreas Schwab <schwab@suse.de>
|
||||
Date: Thu Feb 25 12:17:32 2021 +0100
|
||||
|
||||
Add types.conf for riscv64-linux
|
||||
|
||||
diff -Nur a/lib/ffi/platform/riscv64-linux/types.conf b/lib/ffi/platform/riscv64-linux/types.conf
|
||||
--- a/lib/ffi/platform/riscv64-linux/types.conf 1970-01-01 08:00:00.000000000 +0800
|
||||
+++ b/lib/ffi/platform/riscv64-linux/types.conf 2022-02-28 12:10:35.462892020 +0800
|
||||
@@ -0,0 +1,104 @@
|
||||
+rbx.platform.typedef.*__caddr_t = char
|
||||
+rbx.platform.typedef.*__qaddr_t = long
|
||||
+rbx.platform.typedef.__blkcnt64_t = long
|
||||
+rbx.platform.typedef.__blkcnt_t = long
|
||||
+rbx.platform.typedef.__blksize_t = int
|
||||
+rbx.platform.typedef.__clock_t = long
|
||||
+rbx.platform.typedef.__clockid_t = int
|
||||
+rbx.platform.typedef.__daddr_t = int
|
||||
+rbx.platform.typedef.__dev_t = ulong
|
||||
+rbx.platform.typedef.__fd_mask = long
|
||||
+rbx.platform.typedef.__fsblkcnt64_t = ulong
|
||||
+rbx.platform.typedef.__fsblkcnt_t = ulong
|
||||
+rbx.platform.typedef.__fsfilcnt64_t = ulong
|
||||
+rbx.platform.typedef.__fsfilcnt_t = ulong
|
||||
+rbx.platform.typedef.__fsword_t = long
|
||||
+rbx.platform.typedef.__gid_t = uint
|
||||
+rbx.platform.typedef.__id_t = uint
|
||||
+rbx.platform.typedef.__ino64_t = ulong
|
||||
+rbx.platform.typedef.__ino_t = ulong
|
||||
+rbx.platform.typedef.__int16_t = short
|
||||
+rbx.platform.typedef.__int32_t = int
|
||||
+rbx.platform.typedef.__int64_t = long
|
||||
+rbx.platform.typedef.__int8_t = char
|
||||
+rbx.platform.typedef.__intptr_t = long
|
||||
+rbx.platform.typedef.__key_t = int
|
||||
+rbx.platform.typedef.__loff_t = long
|
||||
+rbx.platform.typedef.__mode_t = uint
|
||||
+rbx.platform.typedef.__nlink_t = uint
|
||||
+rbx.platform.typedef.__off64_t = long
|
||||
+rbx.platform.typedef.__off_t = long
|
||||
+rbx.platform.typedef.__pid_t = int
|
||||
+rbx.platform.typedef.__priority_which_t = int
|
||||
+rbx.platform.typedef.__quad_t = long
|
||||
+rbx.platform.typedef.__rlim64_t = ulong
|
||||
+rbx.platform.typedef.__rlim_t = ulong
|
||||
+rbx.platform.typedef.__rlimit_resource_t = int
|
||||
+rbx.platform.typedef.__rusage_who_t = int
|
||||
+rbx.platform.typedef.__sig_atomic_t = int
|
||||
+rbx.platform.typedef.__socklen_t = uint
|
||||
+rbx.platform.typedef.__ssize_t = long
|
||||
+rbx.platform.typedef.__suseconds_t = long
|
||||
+rbx.platform.typedef.__syscall_slong_t = long
|
||||
+rbx.platform.typedef.__syscall_ulong_t = ulong
|
||||
+rbx.platform.typedef.__time_t = long
|
||||
+rbx.platform.typedef.__timer_t = pointer
|
||||
+rbx.platform.typedef.__u_char = uchar
|
||||
+rbx.platform.typedef.__u_int = uint
|
||||
+rbx.platform.typedef.__u_long = ulong
|
||||
+rbx.platform.typedef.__u_quad_t = ulong
|
||||
+rbx.platform.typedef.__u_short = ushort
|
||||
+rbx.platform.typedef.__uid_t = uint
|
||||
+rbx.platform.typedef.__uint16_t = ushort
|
||||
+rbx.platform.typedef.__uint32_t = uint
|
||||
+rbx.platform.typedef.__uint64_t = ulong
|
||||
+rbx.platform.typedef.__uint8_t = uchar
|
||||
+rbx.platform.typedef.__useconds_t = uint
|
||||
+rbx.platform.typedef.blkcnt_t = long
|
||||
+rbx.platform.typedef.blksize_t = int
|
||||
+rbx.platform.typedef.clock_t = long
|
||||
+rbx.platform.typedef.clockid_t = int
|
||||
+rbx.platform.typedef.daddr_t = int
|
||||
+rbx.platform.typedef.dev_t = ulong
|
||||
+rbx.platform.typedef.fd_mask = long
|
||||
+rbx.platform.typedef.fsblkcnt_t = ulong
|
||||
+rbx.platform.typedef.fsfilcnt_t = ulong
|
||||
+rbx.platform.typedef.gid_t = uint
|
||||
+rbx.platform.typedef.id_t = uint
|
||||
+rbx.platform.typedef.ino_t = ulong
|
||||
+rbx.platform.typedef.int16_t = short
|
||||
+rbx.platform.typedef.int32_t = int
|
||||
+rbx.platform.typedef.int64_t = long
|
||||
+rbx.platform.typedef.int8_t = char
|
||||
+rbx.platform.typedef.key_t = int
|
||||
+rbx.platform.typedef.loff_t = long
|
||||
+rbx.platform.typedef.mode_t = uint
|
||||
+rbx.platform.typedef.nlink_t = uint
|
||||
+rbx.platform.typedef.off_t = long
|
||||
+rbx.platform.typedef.pid_t = int
|
||||
+rbx.platform.typedef.pthread_key_t = uint
|
||||
+rbx.platform.typedef.pthread_once_t = int
|
||||
+rbx.platform.typedef.pthread_t = ulong
|
||||
+rbx.platform.typedef.quad_t = long
|
||||
+rbx.platform.typedef.register_t = long
|
||||
+rbx.platform.typedef.rlim_t = ulong
|
||||
+rbx.platform.typedef.sa_family_t = ushort
|
||||
+rbx.platform.typedef.size_t = ulong
|
||||
+rbx.platform.typedef.socklen_t = uint
|
||||
+rbx.platform.typedef.ssize_t = long
|
||||
+rbx.platform.typedef.suseconds_t = long
|
||||
+rbx.platform.typedef.time_t = long
|
||||
+rbx.platform.typedef.timer_t = pointer
|
||||
+rbx.platform.typedef.u_char = uchar
|
||||
+rbx.platform.typedef.u_int = uint
|
||||
+rbx.platform.typedef.u_int16_t = ushort
|
||||
+rbx.platform.typedef.u_int32_t = uint
|
||||
+rbx.platform.typedef.u_int64_t = ulong
|
||||
+rbx.platform.typedef.u_int8_t = uchar
|
||||
+rbx.platform.typedef.u_long = ulong
|
||||
+rbx.platform.typedef.u_quad_t = ulong
|
||||
+rbx.platform.typedef.u_short = ushort
|
||||
+rbx.platform.typedef.uid_t = uint
|
||||
+rbx.platform.typedef.uint = uint
|
||||
+rbx.platform.typedef.ulong = ulong
|
||||
+rbx.platform.typedef.ushort = ushort
|
||||
@ -1,13 +1,14 @@
|
||||
%global gem_name ffi
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 1.10.0
|
||||
Release: 2
|
||||
Release: 3
|
||||
Summary: FFI Extensions for Ruby
|
||||
License: BSD
|
||||
URL: https://www.github.com/ffi/ffi
|
||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||
Source1: https://www.github.com/ffi/%{gem_name}/archive/%{version}.tar.gz
|
||||
Patch0: Remove-taint-support.patch
|
||||
Patch1: Add-types.conf-for-riscv64-linux.patch
|
||||
BuildRequires: ruby(release) rubygems-devel ruby-devel gcc libffi-devel rubygem(rspec)
|
||||
%description
|
||||
Ruby-FFI is a ruby extension for programmatically loading dynamic
|
||||
@ -28,6 +29,7 @@ Documentation for %{name}.
|
||||
ln -s %{gem_name}-%{version}/test test
|
||||
ln -s %{gem_name}-%{version}/spec spec
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
gem build ../%{gem_name}-%{version}.gemspec
|
||||
@ -35,6 +37,9 @@ gem build ../%{gem_name}-%{version}.gemspec
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{gem_dir}
|
||||
%ifarch riscv64
|
||||
cp -r lib/ffi/platform/riscv64-linux/ .%{gem_instdir}/lib/ffi/platform/
|
||||
%endif
|
||||
cp -a .%{gem_dir}/* \
|
||||
%{buildroot}%{gem_dir}/
|
||||
mkdir -p %{buildroot}%{gem_extdir_mri}
|
||||
@ -72,6 +77,9 @@ popd
|
||||
%{gem_instdir}/ffi.gemspec
|
||||
|
||||
%changelog
|
||||
* Mon Jul 10 2023 laokz <zhangkai@iscas.ac.cn> - 1.10.0-3
|
||||
- backport upstream patch to support riscv64
|
||||
|
||||
* Wed Jan 26 2022 liyanan <liyanan32@huawei.com> - 1.10.0-2
|
||||
- Remove taint support
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user