rekado pushed a commit to branch wip-haskell-updates
in repository guix.
commit 9d9749d0ecd922d571910b15c72ecd1e8c3080db
Author: Ricardo Wurmus <[email protected]>
AuthorDate: Wed Jun 24 23:46:57 2020 +0200
build-system/haskell: Configure to link with shared libraries.
* guix/build/haskell-build-system.scm (configure): Add configure flags to
build shared libraries by default, to generate position independent code,
and
to set the RUNPATH.
---
guix/build/haskell-build-system.scm | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/guix/build/haskell-build-system.scm
b/guix/build/haskell-build-system.scm
index e745c49..15ecab2 100644
--- a/guix/build/haskell-build-system.scm
+++ b/guix/build/haskell-build-system.scm
@@ -91,6 +91,12 @@ and parameters ~s~%"
,@(if tests?
'("--enable-tests")
'())
+ ;; Build and link with shared libraries
+ "--enable-shared"
+ "--enable-executable-dynamic"
+ "--ghc-option=-fPIC"
+ ,(string-append "--ghc-option=-optl=-Wl,-rpath=" (or lib
out)
+ "/lib/$compiler/$pkg-$version")
,@configure-flags)))
;; Cabal errors if GHC_PACKAGE_PATH is set during 'configure', so unset
;; and restore it.