commit: e0cea5be7aaa1e47011de12743ca500f3bda4b8a
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 22 22:57:09 2016 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Thu Dec 22 23:01:11 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0cea5be
haskell-cabal.eclass: respect AR option
That allows us to build not-so-broken static libraries
for LTO users. Tuhs usually have environment like:
CFLAGS=-flto
AR=${CHOST}-gcc-ar
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
eclass/haskell-cabal.eclass | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/eclass/haskell-cabal.eclass b/eclass/haskell-cabal.eclass
index f5d5b85..0f43464 100644
--- a/eclass/haskell-cabal.eclass
+++ b/eclass/haskell-cabal.eclass
@@ -31,7 +31,7 @@
# not pull upper versions
# test-suite -- add support for cabal test-suites (introduced in Cabal-1.8)
-inherit eutils ghc-package multilib
+inherit eutils ghc-package multilib toolchain-funcs
# @ECLASS-VARIABLE: CABAL_EXTRA_CONFIGURE_FLAGS
# @DESCRIPTION:
@@ -330,6 +330,9 @@ cabal-configure() {
cabalconf+=(--ghc-option="$option")
done
+ # toolchain
+ cabalconf+=(--with-ar="$(tc-getAR)")
+
# Building GHCi libs on ppc64 causes "TOC overflow".
if use ppc64; then
cabalconf+=(--disable-library-for-ghci)