Update previous commit to deal with conditional patches.

This commit is contained in:
Richard W.M. Jones 2014-07-15 14:52:13 +01:00
parent c852c24e5a
commit e08cafe6a8
1 changed files with 18 additions and 5 deletions

View File

@ -20,7 +20,7 @@
Name: ocaml
Version: 4.02.0
Release: 0.3.git%{shortcommit}%{?dist}
Release: 0.4.git%{shortcommit}%{?dist}
Summary: OCaml compiler and programming environment
@ -62,9 +62,7 @@ Patch0010: 0010-arg-Allow-flags-such-as-flag-arg-as-well-as-flag-arg.patch
# On ARM 32 bit and aarch64, the CSE optimization is broken. See:
# http://caml.inria.fr/mantis/view.php?id=6484 (armv7hl)
# http://caml.inria.fr/mantis/view.php?id=6486 (aarch64)
%ifarch %{arm} aarch64
Patch9999: 0001-Disable-CSE.patch
%endif
# Add BFD support so that ocamlobjinfo supports *.cmxs format (RHBZ#1113735).
BuildRequires: binutils-devel
@ -203,7 +201,22 @@ git config user.name "no one"
git add .
git add -f configure ;# required because .gitignore lists this file
git commit -a -q -m "%{version} baseline"
git am %{patches} </dev/null
# Once we remove conditional patch 9999:
#git am %{patches} </dev/null
# but until then:
%ifnarch %{arm} aarch64
patches=""
for p in %{patches}; do
if ! echo "$p" | grep -sq 0001-Disable-CSE; then
patches="$patches $p"
fi
done
%else
patches="%{patches}"
%endif
git am $patches </dev/null
%build
@ -422,7 +435,7 @@ fi
%changelog
* Tue Jul 15 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02.0-0.3
* Tue Jul 15 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02.0-0.4
- Disable CSE optimization which is broken on armv7hl and aarch64.
* Sat Jul 12 2014 Richard W.M. Jones <rjones@redhat.com> - 4.02.0-0.1