From c190bbd7bf361a6cec1b839c69180238a61d0401 Mon Sep 17 00:00:00 2001 From: s Date: Wed, 19 Jul 2023 17:11:33 +0800 Subject: [PATCH] add riscv support --- ocaml.spec | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/ocaml.spec b/ocaml.spec index abea4ba..c914748 100644 --- a/ocaml.spec +++ b/ocaml.spec @@ -13,7 +13,7 @@ Name: ocaml Version: 4.13.1 -Release: 4 +Release: 5 Summary: OCaml compiler and programming environment License: LGPL-2.1-only URL: http://www.ocaml.org @@ -75,8 +75,8 @@ Help files for %{name} %autosetup -n %{name}-%{version} -p1 autoconf --force -# add for loongarch64 -%ifarch loongarch64 +# add for loongarch64 riscv64 +%ifarch loongarch64 riscv64 %_update_config_guess %_update_config_sub %endif @@ -91,8 +91,10 @@ autoconf --force %make_build world %if %{native_compiler} %make_build opt +%ifnarch riscv64 %make_build opt.opt %endif +%endif %check cd testsuite @@ -143,6 +145,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata %if %{native_compiler} # native code versions +%ifnarch riscv64 %{_bindir}/ocamlc.opt %{_bindir}/ocamlcp.opt %{_bindir}/ocamldep.opt @@ -152,10 +155,11 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata %{_bindir}/ocamlobjinfo.opt %{_bindir}/ocamloptp.opt %{_bindir}/ocamlprof.opt +%{_bindir}/ocamlopt.opt +%endif %{_bindir}/ocamlopt %{_bindir}/ocamlopt.byte -%{_bindir}/ocamlopt.opt %endif %{_libdir}/ocaml/camlheader @@ -223,11 +227,13 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata %{_libdir}/ocaml/compiler-libs/*.cma %if %{native_compiler} +%ifnarch riscv64 %{_libdir}/ocaml/compiler-libs/*.a %{_libdir}/ocaml/compiler-libs/*.cmxa %{_libdir}/ocaml/compiler-libs/*.cmx %{_libdir}/ocaml/compiler-libs/*.o %endif +%endif %files help @@ -235,6 +241,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata %{_mandir}/man3/* %changelog +* Wed Jul 19 2023 yoo - 4.13.1-5 +- add riscv support + * Thu Jan 19 2023 xingxing - 4.13.1-4 - Update dependencies -- Gitee