From 69ab773f59dc7d5a46c80182480813f2dfd51900 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 30 May 2014 18:25:07 +0900 Subject: [PATCH] condition use of execstack since no prelink on ppc64le or arm64 --- ghc-rpm-macros.spec | 11 ++++++++--- macros.ghc | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 1ce08d3..c8d8feb 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -6,8 +6,8 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.2.10 -Release: 2%{?dist} +Version: 1.2.11 +Release: 1%{?dist} Summary: RPM macros for building packages for GHC License: GPLv3+ @@ -33,8 +33,10 @@ Requires: redhat-rpm-config > 20-1.fc21 Requires: hscolour %endif %endif -# for execstack +# for execstack (hack not needed for ghc-7.8) +%ifnarch ppc64le aarch64 Requires: prelink +%endif %description A set of macros for building GHC packages following the Haskell Guidelines @@ -108,6 +110,9 @@ EOF %changelog +* Fri May 30 2014 Jens Petersen - 1.2.9-1 +- condition use of execstack since no prelink on ppc64le or arm64 + * Wed May 21 2014 Dennis Gilmore - 1.2.10-2 - add %%ghc_arches back to macros.ghc-srpm to maintain compatability with - existing specs diff --git a/macros.ghc b/macros.ghc index ec199a9..d963cc8 100644 --- a/macros.ghc +++ b/macros.ghc @@ -107,8 +107,8 @@ find %{buildroot} -type f -exec sh -c "file {} | grep -q 'dynamically linked'" \ # ghc_clear_execstack %ghc_clear_execstack\ -if [ -d "%{buildroot}%{_bindir}" ]; then\ -find %{buildroot}%{_bindir} -type f -exec sh -c "file {} | grep -q ' ELF '" \\; -exec execstack -c "{}" \\;\ +if [ -d "%{buildroot}%{_bindir}" -a -x "%{_bindir}/execstack" ]; then\ +find %{buildroot}%{_bindir} -type f -exec sh -c "file {} | grep -q ' ELF '" \\; -exec %{_bindir}/execstack -c "{}" \\;\ fi # install bin package