From 549469ed2ffcde3ad06915a02a85947bb461a2e4 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 9 Aug 2019 10:38:35 +0100 Subject: [PATCH] Work around nodynlink issue on armv7. https://github.com/ocaml/dune/issues/2527 --- ...4b09a8c06871635d5fd98c3a37089bbde6d9.patch | 28 +++++++++++++++++++ ocaml-dune.spec | 17 +++++++++-- 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 15c04b09a8c06871635d5fd98c3a37089bbde6d9.patch diff --git a/15c04b09a8c06871635d5fd98c3a37089bbde6d9.patch b/15c04b09a8c06871635d5fd98c3a37089bbde6d9.patch new file mode 100644 index 0000000..0c2ba1f --- /dev/null +++ b/15c04b09a8c06871635d5fd98c3a37089bbde6d9.patch @@ -0,0 +1,28 @@ +From 15c04b09a8c06871635d5fd98c3a37089bbde6d9 Mon Sep 17 00:00:00 2001 +From: Jeremie Dimino +Date: Thu, 8 Aug 2019 23:31:27 +0100 +Subject: [PATCH] remove nodynlink optimisation + +Signed-off-by: Jeremie Dimino +--- + src/exe_rules.ml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/exe_rules.ml b/src/exe_rules.ml +index 834afab21..eda12ee4d 100644 +--- a/src/exe_rules.ml ++++ b/src/exe_rules.ml +@@ -104,11 +104,11 @@ let executables_rules ~sctx ~dir ~dir_kind ~expander + else + Some js_of_ocaml + in +- let dynlink = ++ let dynlink = true (* + Dune_file.Executables.Link_mode.Set.exists exes.modes ~f:(fun mode -> + match mode.kind with + | Shared_object -> true +- | _ -> false) ++ | _ -> false)*) + in + Compilation_context.create () + ~super_context:sctx diff --git a/ocaml-dune.spec b/ocaml-dune.spec index a34798a..1ec6008 100644 --- a/ocaml-dune.spec +++ b/ocaml-dune.spec @@ -1,6 +1,6 @@ Name: ocaml-dune Version: 1.11.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A composable build system for OCaml %global libname %(echo %{name} | sed -e 's/^ocaml-//') @@ -11,6 +11,9 @@ License: MIT and LGPLv2 with exceptions and ISC URL: https://dune.build Source0: https://github.com/ocaml/%{libname}/archive/%{version}/%{libname}-%{version}.tar.gz +# See: https://github.com/ocaml/dune/issues/2527 +Patch1: 15c04b09a8c06871635d5fd98c3a37089bbde6d9.patch + BuildRequires: ocaml >= 4.02.3 BuildRequires: ocaml-findlib-devel @@ -66,7 +69,13 @@ BuildArch: noarch HTML documentation for dune, a composable build system for OCaml. %prep -%autosetup -n %{libname}-%{version} -p1 +# Restore autosetup once we have fixed this upstream issue: +# https://github.com/ocaml/dune/issues/2527 +#autosetup -n %{libname}-%{version} -p1 +%setup -n %{libname}-%{version} +%ifarch %{arm} +%patch1 -p1 +%endif %build # The dune build script figures out if the native code compiler is available @@ -148,6 +157,10 @@ cp -ar README.md CHANGES.md doc/_build/* %{buildroot}%{_pkgdocdir}/ %doc %{_pkgdocdir}/* %changelog +* Fri Aug 09 2019 Richard W.M. Jones - 1.11.0-2 +- Work around nodynlink issue on armv7. + https://github.com/ocaml/dune/issues/2527 + * Thu Aug 08 2019 Richard W.M. Jones - 1.11.0-1 - New version 1.11.0 (also required for camomile 1.0.2).