exclude -Wall from CFLAGS to prevent Cabal configure warning with ghc-7.6

see #1175667:

In function 'foo':
warning: control reaches end of non-void function [-Wreturn-type]
This commit is contained in:
Jens Petersen 2015-01-19 14:14:29 +09:00
parent afcae244ac
commit 3df2d9cc3c
2 changed files with 6 additions and 2 deletions

View File

@ -6,7 +6,7 @@
#%%global without_hscolour 1
Name: ghc-rpm-macros
Version: 1.2.17
Version: 1.2.18
Release: 1%{?dist}
Summary: RPM macros for building packages for GHC
@ -102,6 +102,10 @@ EOF
%changelog
* Mon Jan 19 2015 Jens Petersen <petersen@redhat.com> - 1.2.18-1
- exclude -Wall from CFLAGS to prevent Cabal configure warning with ghc-7.6
(#1175667)
* Fri Nov 14 2014 Jens Petersen <petersen@redhat.com> - 1.2.17-1
- split ghc.attr into ghc_lib.attr and ghc_bin.attr for finer grained handling
- require ghc-compiler for ghc_version

View File

@ -23,7 +23,7 @@ fi
%ghc_check_bootstrap\
CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\
LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS\
%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options
%cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} --libsubdir='$compiler/$pkgid' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --ghc-options="$(echo ' '$CFLAGS | sed -e 's/-Wall -Werror=format-security //' -e 's/ / -optc/g') $(echo ' '$LDFLAGS | sed -e 's/ / -optl/g')" %{?cabal_configure_options} $cabal_configure_extra_options
# install
%cabal_install %cabal copy --destdir=%{buildroot} -v