From 8f288a07f3f14d0415138c013f46e082c83cfcdf Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 17 Aug 2018 19:21:52 +0100 Subject: [PATCH] Disable bootstrapping by default. Use the previously built (in Fedora) OCaml compiler to build the new compiler. Provide --with bootstrap if people want to build OCaml using the embedded binary compiler shipped with upstream sources. --- ocaml.spec | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/ocaml.spec b/ocaml.spec index c15626b..cb5af47 100644 --- a/ocaml.spec +++ b/ocaml.spec @@ -25,9 +25,15 @@ # Architectures where parallel builds fail. #%global no_parallel_build_arches aarch64 +# If you want to bootstrap OCaml on a brand new architecture, or if +# you want to build OCaml without requiring an existing OCaml package, +# or if you want to build OCaml exactly as it is built upstream (using +# a binary ocamlc from the previous build), then use ‘--with bootstrap’. +%bcond_with bootstrap + Name: ocaml Version: 4.07.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: OCaml compiler and programming environment @@ -69,6 +75,10 @@ Patch0007: 0007-Adapt-to-4.07.patch # Sent upstream 2018-06-05. Patch0008: 0008-riscv-Emit-debug-info.patch +%if ! %{with bootstrap} +BuildRequires: ocaml +%endif + BuildRequires: gcc BuildRequires: binutils-devel BuildRequires: ncurses-devel @@ -194,7 +204,10 @@ may not be portable between versions. %prep %setup -q -T -b 0 -n %{name}-%{version} %autopatch -p1 - +%if ! %{with bootstrap} +cp %{_bindir}/ocamlc.byte boot/ocamlc +cp %{_bindir}/ocamllex.byte boot/ocamllex +%endif %build %ifnarch %{no_parallel_build_arches} @@ -425,6 +438,9 @@ find $RPM_BUILD_ROOT \( -name '*.cmt' -o -name '*.cmti' \) -a -delete %changelog +* Fri Aug 17 2018 Richard W.M. Jones - 4.07.0-3 +- Bootstrap from previously build Fedora compiler by default. + * Fri Jul 13 2018 Fedora Release Engineering - 4.07.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild