summaryrefslogtreecommitdiff
path: root/guix/build
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2020-06-24 23:46:57 +0200
committerRicardo Wurmus <rekado@elephly.net>2020-08-12 14:45:48 +0200
commit9e5496e0ae0ee8f638ca93949ecca314fdb9251e (patch)
tree1dc9c71efb9fb261997bf4fed1f443e4f8793933 /guix/build
parent0347888a7ec3a11c050c4269533c8d69197a4c6e (diff)
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.
Diffstat (limited to 'guix/build')
-rw-r--r--guix/build/haskell-build-system.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/guix/build/haskell-build-system.scm b/guix/build/haskell-build-system.scm
index a8cd62d03c..f57981511a 100644
--- a/guix/build/haskell-build-system.scm
+++ b/guix/build/haskell-build-system.scm
@@ -100,6 +100,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.