summaryrefslogtreecommitdiff
path: root/gnu/packages/elf.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/elf.scm')
-rw-r--r--gnu/packages/elf.scm21
1 files changed, 21 insertions, 0 deletions
diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm
index 7fc689cb11..46c59c3a3b 100644
--- a/gnu/packages/elf.scm
+++ b/gnu/packages/elf.scm
@@ -100,6 +100,27 @@ addr2line, and more.")
"1rqpg84wrd3fa16wa9vqdvasnc05yz49w207cz1l0wrl4k8q97y9"))
(patches (list (search-patch "patchelf-page-size.patch")))))
(build-system gnu-build-system)
+
+ ;; XXX: The upstream 'patchelf' doesn't support ARM. The only available
+ ;; 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)))
+ `(("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))
+ '()))
+
(home-page "http://nixos.org/patchelf.html")
(synopsis "Modify the dynamic linker and RPATH of ELF executables")
(description