add loongarch support
This commit is contained in:
parent
1474c2d50b
commit
940a9f7f9f
40
ocaml.spec
40
ocaml.spec
@ -1,6 +1,19 @@
|
|||||||
|
%ifnarch loongarch64
|
||||||
|
%global native_compiler 1
|
||||||
|
%else
|
||||||
|
%global native_compiler 0
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%ifnarch loongarch64
|
||||||
|
%global natdynlink 1
|
||||||
|
%else
|
||||||
|
%global natdynlink 0
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
Name: ocaml
|
Name: ocaml
|
||||||
Version: 4.13.1
|
Version: 4.13.1
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: OCaml compiler and programming environment
|
Summary: OCaml compiler and programming environment
|
||||||
License: LGPL-2.1-only
|
License: LGPL-2.1-only
|
||||||
URL: http://www.ocaml.org
|
URL: http://www.ocaml.org
|
||||||
@ -61,6 +74,12 @@ Help files for %{name}
|
|||||||
%autosetup -n %{name}-%{version} -p1
|
%autosetup -n %{name}-%{version} -p1
|
||||||
autoconf --force
|
autoconf --force
|
||||||
|
|
||||||
|
# add for loongarch64
|
||||||
|
%ifarch loongarch64
|
||||||
|
%_update_config_guess
|
||||||
|
%_update_config_sub
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
%configure \
|
%configure \
|
||||||
@ -69,8 +88,10 @@ autoconf --force
|
|||||||
--libdir=%{_libdir}/ocaml \
|
--libdir=%{_libdir}/ocaml \
|
||||||
--host=`./build-aux/config.guess`
|
--host=`./build-aux/config.guess`
|
||||||
%make_build world
|
%make_build world
|
||||||
|
%if %{native_compiler}
|
||||||
%make_build opt
|
%make_build opt
|
||||||
%make_build opt.opt
|
%make_build opt.opt
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
cd testsuite
|
cd testsuite
|
||||||
@ -119,6 +140,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
|
|||||||
%{_bindir}/ocamloptp.byte
|
%{_bindir}/ocamloptp.byte
|
||||||
%{_bindir}/ocamlprof.byte
|
%{_bindir}/ocamlprof.byte
|
||||||
|
|
||||||
|
%if %{native_compiler}
|
||||||
# native code versions
|
# native code versions
|
||||||
%{_bindir}/ocamlc.opt
|
%{_bindir}/ocamlc.opt
|
||||||
%{_bindir}/ocamlcp.opt
|
%{_bindir}/ocamlcp.opt
|
||||||
@ -133,6 +155,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
|
|||||||
%{_bindir}/ocamlopt
|
%{_bindir}/ocamlopt
|
||||||
%{_bindir}/ocamlopt.byte
|
%{_bindir}/ocamlopt.byte
|
||||||
%{_bindir}/ocamlopt.opt
|
%{_bindir}/ocamlopt.opt
|
||||||
|
%endif
|
||||||
|
|
||||||
%{_libdir}/ocaml/camlheader
|
%{_libdir}/ocaml/camlheader
|
||||||
%{_libdir}/ocaml/camlheader_ur
|
%{_libdir}/ocaml/camlheader_ur
|
||||||
@ -141,17 +164,26 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
|
|||||||
%{_libdir}/ocaml/ld.conf
|
%{_libdir}/ocaml/ld.conf
|
||||||
%{_libdir}/ocaml/Makefile.config
|
%{_libdir}/ocaml/Makefile.config
|
||||||
%{_libdir}/ocaml/*.a
|
%{_libdir}/ocaml/*.a
|
||||||
|
%if %{natdynlink}
|
||||||
%{_libdir}/ocaml/*.cmxs
|
%{_libdir}/ocaml/*.cmxs
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{native_compiler}
|
||||||
%{_libdir}/ocaml/*.cmxa
|
%{_libdir}/ocaml/*.cmxa
|
||||||
%{_libdir}/ocaml/*.cmx
|
%{_libdir}/ocaml/*.cmx
|
||||||
%{_libdir}/ocaml/*.o
|
%{_libdir}/ocaml/*.o
|
||||||
%{_libdir}/ocaml/libasmrun_shared.so
|
%{_libdir}/ocaml/libasmrun_shared.so
|
||||||
|
%endif
|
||||||
|
|
||||||
%{_libdir}/ocaml/*.mli
|
%{_libdir}/ocaml/*.mli
|
||||||
%{_libdir}/ocaml/libcamlrun_shared.so
|
%{_libdir}/ocaml/libcamlrun_shared.so
|
||||||
%{_libdir}/ocaml/threads/*.mli
|
%{_libdir}/ocaml/threads/*.mli
|
||||||
|
|
||||||
|
%if %{native_compiler}
|
||||||
%{_libdir}/ocaml/threads/*.a
|
%{_libdir}/ocaml/threads/*.a
|
||||||
%{_libdir}/ocaml/threads/*.cmxa
|
%{_libdir}/ocaml/threads/*.cmxa
|
||||||
%{_libdir}/ocaml/threads/*.cmx
|
%{_libdir}/ocaml/threads/*.cmx
|
||||||
|
%endif
|
||||||
%{_libdir}/ocaml/caml
|
%{_libdir}/ocaml/caml
|
||||||
|
|
||||||
#runtime
|
#runtime
|
||||||
@ -188,10 +220,13 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
|
|||||||
%{_libdir}/ocaml/compiler-libs/*.cmi
|
%{_libdir}/ocaml/compiler-libs/*.cmi
|
||||||
%{_libdir}/ocaml/compiler-libs/*.cmo
|
%{_libdir}/ocaml/compiler-libs/*.cmo
|
||||||
%{_libdir}/ocaml/compiler-libs/*.cma
|
%{_libdir}/ocaml/compiler-libs/*.cma
|
||||||
|
|
||||||
|
%if %{native_compiler}
|
||||||
%{_libdir}/ocaml/compiler-libs/*.a
|
%{_libdir}/ocaml/compiler-libs/*.a
|
||||||
%{_libdir}/ocaml/compiler-libs/*.cmxa
|
%{_libdir}/ocaml/compiler-libs/*.cmxa
|
||||||
%{_libdir}/ocaml/compiler-libs/*.cmx
|
%{_libdir}/ocaml/compiler-libs/*.cmx
|
||||||
%{_libdir}/ocaml/compiler-libs/*.o
|
%{_libdir}/ocaml/compiler-libs/*.o
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%files help
|
%files help
|
||||||
@ -199,6 +234,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/ocaml/eventlog_metadata
|
|||||||
%{_mandir}/man3/*
|
%{_mandir}/man3/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 14 2022 zhaozhen <zhaozhen@loongson.cn> - 4.13.1-2
|
||||||
|
- loongarch64 does not support native_compiler
|
||||||
|
|
||||||
* Tue Jan 18 2022 yangping <yangping69@huawei.com> - 4.13.1-1
|
* Tue Jan 18 2022 yangping <yangping69@huawei.com> - 4.13.1-1
|
||||||
- Update software to 4.13.1
|
- Update software to 4.13.1
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user