From ba39d46794128ad5b83d94f354fae4d95086b233 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 25 Jan 2018 07:02:40 +0100 Subject: [PATCH] remove "-z defs" from LDFLAGS since it breaks linking dist/build/Language/Haskell/HsColour.dyn_o:hscolourzm1zi24zi2zmBwYhdEbf2m3fdRy45AMG_LanguageziHaskellziHsColour_zdfShowLit6_info: error: undefined reference to 'newCAF' : dist/build/Language/Haskell/HsColour.dyn_o:sQ3F_info: error: undefined reference to 'stg_upd_frame_info' --- ghc-rpm-macros.spec | 5 ++++- macros.ghc | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc-rpm-macros.spec b/ghc-rpm-macros.spec index 239ec3c..e8e8e0d 100644 --- a/ghc-rpm-macros.spec +++ b/ghc-rpm-macros.spec @@ -10,7 +10,7 @@ #%%global without_hscolour 1 Name: ghc-rpm-macros -Version: 1.8.1 +Version: 1.8.2 Release: 1%{?dist} Summary: RPM macros for building Haskell packages for GHC @@ -162,6 +162,9 @@ EOF %changelog +* Thu Jan 25 2018 Jens Petersen - 1.8.2-1 +- remove "-z defs" from LDFLAGS since it breaks linking with ghc + * Tue Jan 23 2018 Jens Petersen - 1.8.1-1 - ghc_fix_rpath: remove leading or trailing ':' diff --git a/macros.ghc b/macros.ghc index 625277e..9eee7f0 100644 --- a/macros.ghc +++ b/macros.ghc @@ -37,7 +37,7 @@ export CFLAGS\ %ghc_check_bootstrap\ %ghc_set_cflags\ %global _hardened_ldflags %{nil}\ -LDFLAGS="${LDFLAGS:-%{?__global_ldflags}}"; export LDFLAGS\ +LDFLAGS="${LDFLAGS:-$(echo %{?__global_ldflags} | sed -e 's/-Wl,-z,defs //')}"; export LDFLAGS\ %cabal --version\ %cabal configure --prefix=%{_prefix} --libdir=%{_libdir} --docdir=%{_ghcdocdir} --libsubdir='$compiler/$pkgkey' --datasubdir='$pkgid' --ghc --dynlibdir=%{_ghcdynlibdir} %{!?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