summary refs log tree commit diff
path: root/gnu/packages/libffi.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-08-11 19:02:53 +0200
committerMarius Bakke <marius@gnu.org>2022-08-11 22:39:13 +0200
commit462008057808ab02821d05979cb8d2f4d0769f66 (patch)
tree00fc4abcfa96af0ea639dee3892e3ed0733a3d4c /gnu/packages/libffi.scm
parent121f6e0b0c45dba24301fbd405d07123e82c2de6 (diff)
downloadguix-462008057808ab02821d05979cb8d2f4d0769f66.tar.gz
gnu: ghc: Use a LibFFI variant without static trampolines.
* gnu/packages/haskell.scm (ghc-7, ghc-8.0, ghc-8.4)[inputs]: Change from
LIBFFI to LIBFFI-SANS-STATIC-TRAMPOLINES.
* gnu/packages/libffi.scm (libffi-sans-static-trampolines): New variable.
Diffstat (limited to 'gnu/packages/libffi.scm')
-rw-r--r--gnu/packages/libffi.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm
index 0c59509a91..923019c2ca 100644
--- a/gnu/packages/libffi.scm
+++ b/gnu/packages/libffi.scm
@@ -28,8 +28,10 @@
   #:use-module (gnu packages)
   #:use-module (guix licenses)
   #:use-module (guix packages)
+  #:use-module (guix gexp)
   #:use-module (guix download)
   #:use-module (guix git-download)
+  #:use-module (guix utils)
   #:use-module (gnu packages check)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
@@ -78,6 +80,17 @@ conversions for values passed between the two languages.")
     ;; See <https://github.com/atgreen/libffi/blob/master/LICENSE>.
     (license expat)))
 
+;; Provide a variant without static trampolines as some packages
+;; (particularly GHC < 9) cannot handle them.  See
+;; <https://github.com/libffi/libffi/pull/647> for a discussion.
+(define-public libffi-sans-static-trampolines
+  (hidden-package
+   (package/inherit libffi
+     (arguments
+      (substitute-keyword-arguments (package-arguments libffi)
+        ((#:configure-flags flags #~'())
+         #~(append #$flags '("--disable-exec-static-tramp"))))))))
+
 (define-public python-cffi
   (package
     (name "python-cffi")