summary refs log tree commit diff
path: root/gnu/packages/elf.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-03-20 14:13:05 +0100
committerMarius Bakke <mbakke@fastmail.com>2018-03-20 14:13:05 +0100
commitdc7e07c9b9780883a462c5973cd2ecad06fdb4ae (patch)
tree14d185abfdd092a470e72ea27a3dad879145fb76 /gnu/packages/elf.scm
parent616446ffbf9af9e8e5df0ef40c4e33dba9e25152 (diff)
parentdbc75dadb54dd0e6b3a125949c26aadfa3bff4ca (diff)
downloadguix-dc7e07c9b9780883a462c5973cd2ecad06fdb4ae.tar.gz
Merge branch 'staging'
Diffstat (limited to 'gnu/packages/elf.scm')
-rw-r--r--gnu/packages/elf.scm19
1 files changed, 9 insertions, 10 deletions
diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm
index 576f649c2d..08d92532fa 100644
--- a/gnu/packages/elf.scm
+++ b/gnu/packages/elf.scm
@@ -22,6 +22,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages elf)
+  #:use-module (guix utils)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
@@ -121,20 +122,18 @@ Executable and Linkable Format (@dfn{ELF}).  This includes @command{ld},
     ;;      patch makes significant changes to the algorithm, possibly
     ;;      introducing bugs.  So, we apply the patch only on ARM systems.
     (inputs
-     (if (string-prefix? "arm" (or (%current-target-system) (%current-system)))
+     (if (target-arm32?)
          `(("patch/rework-for-arm" ,(search-patch
                                      "patchelf-rework-for-arm.patch")))
          '()))
     (arguments
-     (if (string-prefix? "arm" (or (%current-target-system) (%current-system)))
-         `(#:phases (alist-cons-after
-                     'unpack 'patch/rework-for-arm
-                     (lambda* (#:key inputs #:allow-other-keys)
-                       (let ((patch-file
-                              (assoc-ref inputs "patch/rework-for-arm")))
-                         (zero? (system* "patch" "--force" "-p1"
-                                         "--input" patch-file))))
-                     %standard-phases))
+     (if (target-arm32?)
+         `(#:phases
+           (modify-phases %standard-phases
+             (add-after 'unpack 'patch/rework-for-arm
+               (lambda* (#:key inputs #:allow-other-keys)
+                 (let ((patch-file (assoc-ref inputs "patch/rework-for-arm")))
+                   (invoke "patch" "--force" "-p1" "--input" patch-file))))))
          '()))
 
     (home-page "https://nixos.org/patchelf.html")