diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 112ba13..8fd6e06 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -11,7 +11,7 @@ Name: ghc-rpm-macros Version: 1.6.50 -Release: 3%{?dist} +Release: 4%{?dist} Summary: RPM macros for building Haskell packages for GHC License: GPLv3+ @@ -161,6 +161,9 @@ EOF %changelog +* Fri Nov 10 2017 Jens Petersen - 1.6.50-4 +- do not set -Wall on aarch64 and s390x since -Wunused-label is extremely noisy + * Fri Nov 10 2017 Jens Petersen - 1.6.50-3 - temporarily set Wall for all archs to see which are noisy diff --git a/macros.ghc b/macros.ghc index b6b4848..c87883e 100644 --- a/macros.ghc +++ b/macros.ghc @@ -26,10 +26,13 @@ fi %cabal_configure\ %ghc_check_bootstrap\ %global _hardened_ldflags %{nil}\ -# -Wunused-label is extremely noisy: remove for ghc-8.0\ -#%%ifnarch aarch64 ppc64 ppc64le s390x\ -CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\ -#%%endif\ +# -Wunused-label is extremely noisy\ +%ifarch aarch64 s390x\ +CFLAGS="${CFLAGS:-$(echo %optflags | sed -e s/-Wall//)}"\ +%else\ +CFLAGS="${CFLAGS:-%optflags}"\ +%endif\ +export CFLAGS\ LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ %cabal --version\ %cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} %{?ghc_subpackaging:--user}%{!?ghc_subpackaging:--global} --ghc-options="${CFLAGS:+$(echo ' '$CFLAGS | sed -e 's/ / -optc/g')} ${LDFLAGS:+$(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')}" %{?cabal_configure_options} $cabal_configure_extra_options