summaryrefslogtreecommitdiff
path: root/gnu/packages/libffi.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-11-29 14:19:55 +0000
committerChristopher Baines <mail@cbaines.net>2020-11-29 17:34:18 +0000
commitff01206345e2306cc633db48e0b29eab9077091a (patch)
tree25c7ee17005dadc9bf4fae3f0873e03a4704f782 /gnu/packages/libffi.scm
parented2545f0fa0e2ad99d5a0c45f532c539b299b9fb (diff)
parent7c2e67400ffaef8eb6f30ef7126c976ee3d7e36c (diff)
downloadguix-patches-ff01206345e2306cc633db48e0b29eab9077091a.tar
guix-patches-ff01206345e2306cc633db48e0b29eab9077091a.tar.gz
Merge remote-tracking branch 'origin/master' into core-updates
Diffstat (limited to 'gnu/packages/libffi.scm')
-rw-r--r--gnu/packages/libffi.scm22
1 files changed, 20 insertions, 2 deletions
diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm
index 0db8fa3e82..27bd79665a 100644
--- a/gnu/packages/libffi.scm
+++ b/gnu/packages/libffi.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2015, 2019 Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
;;; Copyright © 2016, 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
@@ -57,7 +57,25 @@
(arguments
`(;; Prevent the build system from passing -march and -mtune to the
;; compiler. See "ax_cc_maxopt.m4" and "ax_gcc_archflag.m4".
- #:configure-flags '("--enable-portable-binary" "--without-gcc-arch")))
+ #:configure-flags '("--enable-portable-binary" "--without-gcc-arch")
+
+ ;; TODO: Inline patch on next rebuild cycle.
+ ,@(if (string-prefix? "powerpc-" (or (%current-target-system)
+ (%current-system)))
+ '(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'apply-patch
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((patch (assoc-ref inputs
+ "powerpc-patch")))
+ (invoke "patch" "--batch" "-p1"
+ "-i" patch))))))
+ '())))
+ (inputs
+ (if (string-prefix? "powerpc-" (or (%current-target-system)
+ (%current-system)))
+ `(("powerpc-patch" ,@(search-patches
+ "libffi-3.3-powerpc-fixes.patch")))
+ '()))
(outputs '("out" "debug"))
(synopsis "Foreign function call interface library")
(description