summaryrefslogtreecommitdiff
path: root/gnu/packages/libffi.scm
diff options
context:
space:
mode:
authorJohn Doe <dftxbs3e@free.fr>2020-12-15 10:24:11 +0100
committerChris Marusich <cmmarusich@gmail.com>2020-12-20 16:53:34 -0800
commit7eaa2f24ea77cddbb4bbc2d6a6905673a36f8f99 (patch)
tree760fcba1ac119689bcd23eef6fe7d1688d6bfb6e /gnu/packages/libffi.scm
parente8e9a7898e9d8eb85ad54afaec6a1e619bf8b74f (diff)
downloadguix-patches-7eaa2f24ea77cddbb4bbc2d6a6905673a36f8f99.tar
guix-patches-7eaa2f24ea77cddbb4bbc2d6a6905673a36f8f99.tar.gz
gnu: libffi: Add unreleased patch to fix float128 on powerpc64le.
Fixes <https://bugs.gnu.org/45252>. * gnu/packages/patches/libffi-float128-powerpc64le.patch: Import patch file from <https://github.com/libffi/libffi/pull/561.patch>. * gnu/packages/libffi.scm (libffi)[arguments]: Apply patch conditionally for powerpc64le-* systems in a phase. [inputs]: Add patch as input conditionally for powerpc64le-* systems. * gnu/local.mk (dist_patch_DATA): Add patch file to build system. Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
Diffstat (limited to 'gnu/packages/libffi.scm')
-rw-r--r--gnu/packages/libffi.scm26
1 files changed, 21 insertions, 5 deletions
diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm
index d324892330..66239e0363 100644
--- a/gnu/packages/libffi.scm
+++ b/gnu/packages/libffi.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2017, 2019, 2020 Marius Bakke <marius@gnu.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020 John Doe <dftxbs3e@free.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -57,7 +58,7 @@
;; compiler. See "ax_cc_maxopt.m4" and "ax_gcc_archflag.m4".
#:configure-flags '("--enable-portable-binary" "--without-gcc-arch")
- ;; TODO: Inline patch on next rebuild cycle.
+ ;; TODO: Inline patches on next rebuild cycle.
,@(if (string-prefix? "powerpc-" (or (%current-target-system)
(%current-system)))
'(#:phases (modify-phases %standard-phases
@@ -67,13 +68,28 @@
"powerpc-patch")))
(invoke "patch" "--batch" "-p1"
"-i" patch))))))
+ '())
+ ,@(if (string-prefix? "powerpc64le-" (or (%current-target-system)
+ (%current-system)))
+ '(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'apply-patch2
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((patch (assoc-ref inputs
+ "powerpc64le-patch")))
+ (invoke "patch" "--batch" "-p1"
+ "-i" patch))))))
'())))
(inputs
- (if (string-prefix? "powerpc-" (or (%current-target-system)
+ (cond
+ ((string-prefix? "powerpc-" (or (%current-target-system)
(%current-system)))
- `(("powerpc-patch" ,@(search-patches
- "libffi-3.3-powerpc-fixes.patch")))
- '()))
+ `(("powerpc-patch" ,@(search-patches
+ "libffi-3.3-powerpc-fixes.patch"))))
+ ((string-prefix? "powerpc64le-" (or (%current-target-system)
+ (%current-system)))
+ `(("powerpc64le-patch" ,@(search-patches
+ "libffi-float128-powerpc64le.patch"))))
+ (else '())))
(outputs '("out" "debug"))
(synopsis "Foreign function call interface library")
(description