From 272d2b048a8fb10f06cea9b6d8d090a340a50b5a Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 10 Nov 2017 11:49:21 +0900 Subject: [PATCH] do not set -Wall on aarch64 and s390x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Wunused-label is extremely noisy [1 of 2] Compiling Text.Html.BlockTable ( Text/Html/BlockTable.hs, dist/build/Text/Html/BlockTable.o ) /tmp/ghcbd98_0/ghc_2.hc: In function ‘htmlzm1zi0zi1zi2zm8wVtehjIxUEBYXzzRus7033_TextziHtmlziBlockTable_getMatrix_entry’: /tmp/ghcbd98_0/ghc_2.hc:63:1: error: warning: label ‘_c2qm’ defined but not used [-Wunused-label] _c2qm: --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 11 +++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) 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