summaryrefslogtreecommitdiff
path: root/gnu/packages/elf.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2015-01-06 21:41:55 +0000
committerMark H Weaver <mhw@netris.org>2015-01-07 12:38:11 -0500
commitf7d2b496b9a3f613aff50fef1e56d9f3aab99c7b (patch)
tree07c54ab9f6a6d43a142616cd2497eba4c82d32b0 /gnu/packages/elf.scm
parent24aaf2f257e6b611d3759ffc53c29828efce1917 (diff)
downloadpatches-f7d2b496b9a3f613aff50fef1e56d9f3aab99c7b.tar
patches-f7d2b496b9a3f613aff50fef1e56d9f3aab99c7b.tar.gz
gnu: patchelf: On ARM, apply experimental patch to get it working.
* gnu/packages/patches/patchelf-rework-for-arm.patch: New file. * gnu-system.am: Add it. * gnu/packages/elf.scm: Apply patch when the target is ARM.
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