only pass CFLAGS and LDFLAGS to ghc if set
This commit is contained in:
parent
46a6bfd423
commit
28274f8b3a
@ -11,7 +11,7 @@
|
||||
|
||||
Name: ghc-rpm-macros
|
||||
Version: 1.6.9
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
Summary: RPM macros for building Haskell packages for GHC
|
||||
|
||||
License: GPLv3+
|
||||
@ -137,6 +137,9 @@ EOF
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Oct 17 2016 Jens Petersen <petersen@redhat.com> - 1.6.9-6
|
||||
- only pass CFLAGS and LDFLAGS to ghc if set
|
||||
|
||||
* Mon Oct 17 2016 Jens Petersen <petersen@redhat.com> - 1.6.9-5
|
||||
- for aarch64 do not set CFLAGS and LDFLAGS
|
||||
|
||||
|
@ -27,7 +27,7 @@ fi
|
||||
CFLAGS="${CFLAGS:-%optflags}"; export CFLAGS\
|
||||
LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\
|
||||
%endif\
|
||||
%cabal configure %{?cabal_verbose} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_defaultlicensedir}/%{name} --libsubdir='$compiler/$pkgkey' --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 %{?cabal_verbose} --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_defaultlicensedir}/%{name} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc %{!?ghc_without_dynamic:--enable-executable-dynamic} %{?with_tests:--enable-tests} --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
|
||||
|
||||
# install
|
||||
%cabal_install %cabal copy %{?cabal_verbose} %{!?cabal_verbose:-v} --destdir=%{buildroot}
|
||||
|
Loading…
Reference in New Issue
Block a user