Compare commits

...

1 Commits

Author SHA1 Message Date
1821fda7a2 Add support for riscv64
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
2018-05-10 16:44:19 +02:00
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,26 @@
diff --git a/ext/posh.h b/ext/posh.h
index 9c0e012..b122d58 100755
--- a/ext/posh.h
+++ b/ext/posh.h
@@ -524,6 +524,21 @@ Metrowerks:
# define POSH_CPU_STRING "S/390"
#endif
+#if defined __riscv && defined __riscv_xlen
+# if __riscv_xlen == 32
+# define POSH_CPU_RISCV32 1
+# define POSH_CPU_STRING "RISCV32"
+# elif __riscv_xlen == 64
+# define POSH_CPU_RISCV64 1
+# define POSH_CPU_STRING "RISCV64"
+# elif __riscv_xlen == 128
+# define POSH_CPU_RISCV128 1
+# define POSH_CPU_STRING "RISCV128"
+# else
+# error "Unknown XLEN size!"
+# endif
+#endif
+
#if !defined POSH_CPU_STRING
# error POSH cannot determine target CPU
# define POSH_CPU_STRING "Unknown" /* this is here for Doxygen's benefit */

View File

@ -3,7 +3,7 @@
Summary: Full-featured text search engine library
Name: rubygem-%{gem_name}
Version: 0.11.8.4
Release: 21%{?dist}
Release: 21.0.riscv64%{?dist}
Group: Development/Languages
# License from
# - MIT-LICENSE: MIT
@ -25,6 +25,8 @@ Patch4: rubygem-ferret-posh.h-aarch64.patch
# s390x build
# from http://pkg-ruby-extras-maintainers.alioth.debian.narkive.com/fQZGgAAD/dre-maint-rc-bug-474724
Patch5: rubygem-ferret-posh.h-s390x.patch
# support for riscv64
Patch6: ferret-0.11.8.4-add-riscv64.patch
BuildRequires: rubygems-devel
BuildRequires: ruby-devel
BuildRequires: rubygem(minitest) < 5
@ -54,6 +56,7 @@ gem unpack %{SOURCE0}
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
@ -120,6 +123,9 @@ popd
%{gem_instdir}/test/
%changelog
* Thu May 10 2018 David Abdurachmanov <david.abdurachmanov@gmail.com> - 0.11.8.4-21.0.riscv64
- Add support for riscv64
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.11.8.4-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild