guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/43: build-system/haskell: Configure to link with shared libraries.


From: guix-commits
Subject: 04/43: build-system/haskell: Configure to link with shared libraries.
Date: Sat, 8 Aug 2020 22:41:05 -0400 (EDT)

samplet pushed a commit to branch wip-haskell-updates-2
in repository guix.

commit abf1bba3fd923a4bd1cd7c6c94b2ba2a0b58219c
Author: Ricardo Wurmus <rekado@elephly.net>
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 a8cd62d..f579815 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]