[ghc] override "make %{?_smp_mflags}" in mock/koji if not -j16
Jens Petersen
petersen at fedoraproject.org
Sun Feb 15 13:10:26 UTC 2015
commit b42ca29adcb7b0906bf2f417cf5dc39ddd315b54
Author: Jens Petersen <petersen at redhat.com>
Date: Sun Feb 15 21:59:29 2015 +0900
override "make %{?_smp_mflags}" in mock/koji if not -j16
- in koji HOSTNAME is ""
- from testing in koji: -j8 was too small and -j12 seemed big enough
ghc.spec | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/ghc.spec b/ghc.spec
index 2188814..c02f355 100644
--- a/ghc.spec
+++ b/ghc.spec
@@ -343,11 +343,20 @@ export LDFLAGS="${LDFLAGS:-%__global_ldflags}"
# avoid "ghc: hGetContents: invalid argument (invalid byte sequence)"
export LANG=en_US.utf8
-echo _smp_mflags is '%{?_smp_mflags}'
+
+echo _smp_mflags is \'%{?_smp_mflags}\'
+# NB for future ghc versions we should probably hardcode max -j4 instead for all builds to avoid this
+MAKE_JOBS=%{?_smp_mflags}
%ifarch %{ix86} x86_64
-%global _smp_mflags -j16
+# hack to perserve the high "make -j" ghc ABI hashes for 7.8.4 koji/mock builds
+# (-j12 seems to be sufficient but not -j8)
+if [ -z "$HOSTNAME" -a "%{?_smp_mflags}" != "-j16" ]; then
+ echo "Overriding for koji/mock Intel builds to preserve the ghc ABI hashes:"
+ MAKE_JOBS=-j16
+fi
%endif
-make %{?_smp_mflags}
+
+make $MAKE_JOBS
%install
More information about the scm-commits
mailing list