X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/02c73adcdf0f29dbecd9a1bb3c9be3626cd5dea9..539bf8f2c071b53834829259bb3fabf0390c5dc6:/gnu/packages/elf.scm diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm index 35b644906b..eaa9ab5f51 100644 --- a/gnu/packages/elf.scm +++ b/gnu/packages/elf.scm @@ -2,6 +2,9 @@ ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès ;;; Copyright © 2014, 2015 Mark H Weaver ;;; Copyright © 2015 Andreas Enge +;;; Copyright © 2017, 2018 Efraim Flashner +;;; Copyright © 2017 Leo Famulari +;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,6 +22,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages elf) + #:use-module (guix utils) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) @@ -30,15 +34,14 @@ (define-public elfutils (package (name "elfutils") - (version "0.167") + (version "0.170") (source (origin (method url-fetch) - (uri (string-append - "https://fedorahosted.org/releases/e/l/elfutils/" - version "/elfutils-" version ".tar.bz2")) + (uri (string-append "https://sourceware.org/elfutils/ftp/" + version "/elfutils-" version ".tar.bz2")) (sha256 (base32 - "0lv5fz2h7j9362l5apbg9jff7309ni385d3325ckavrbqj3h0c1z")) + "0rp0r54z44is49c594qy7hr211nhb00aa5y7z74vsybbaxslg10z")) (patches (search-patches "elfutils-tests-ptrace.patch")))) (build-system gnu-build-system) @@ -52,16 +55,24 @@ ;; know where to find each other. `(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") - "/lib")))) + "/lib")) + #:phases + (modify-phases %standard-phases + ;; No reason has been found for this test to reliably fail on aarch64-linux. + (add-after 'unpack 'disable-failing-aarch64-tests + (lambda _ + (substitute* "tests/Makefile.in" + (("run-backtrace-native.sh") "")) + #t))))) (native-inputs `(("m4" ,m4))) (inputs `(("zlib" ,zlib))) - (home-page "https://fedorahosted.org/elfutils/") + (home-page "https://sourceware.org/elfutils/") (synopsis "Linker and ELF manipulation tools") (description "This package provides command-line tools to manipulate binaries in the -Executable and Linkable Format (ELF). This includes ld, ar, objdump, -addr2line, and more.") +Executable and Linkable Format (@dfn{ELF}). This includes @command{ld}, +@command{ar}, @command{objdump}, @command{addr2line}, and more.") ;; Libraries are dual-licensed LGPLv3.0+ | GPLv2, and programs are GPLv3+. (license lgpl3+))) @@ -78,17 +89,21 @@ addr2line, and more.") (base32 "0vf7s9dwk2xkmhb79aigqm0x0yfbw1j0b9ksm51207qwr179n6jr")))) (build-system gnu-build-system) - (arguments '(#:phases (alist-replace - 'configure - (lambda* (#:key outputs #:allow-other-keys) - ;; This old `configure' script doesn't support - ;; variables passed as arguments. - (let ((out (assoc-ref outputs "out"))) - (setenv "CONFIG_SHELL" (which "bash")) - (zero? - (system* "./configure" - (string-append "--prefix=" out))))) - %standard-phases))) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + ;; This old `configure' script doesn't support + ;; variables passed as arguments. + (let ((out (assoc-ref outputs "out"))) + (setenv "CONFIG_SHELL" (which "bash")) + (invoke "./configure" + (string-append "--prefix=" out) + ,@(if (string=? "aarch64-linux" + (%current-system)) + '("--host=aarch64-unknown-linux-gnu") + '())))))))) (home-page "http://www.mr511.de/software/english.html") (synopsis "ELF object file access library") (description "Libelf is a C library to access ELF object files.") @@ -101,7 +116,7 @@ addr2line, and more.") (source (origin (method url-fetch) (uri (string-append - "http://nixos.org/releases/patchelf/patchelf-" + "https://nixos.org/releases/patchelf/patchelf-" version "/patchelf-" version ".tar.bz2")) (sha256 @@ -114,23 +129,21 @@ addr2line, and more.") ;; 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 "http://nixos.org/patchelf.html") + (home-page "https://nixos.org/patchelf.html") (synopsis "Modify the dynamic linker and RPATH of ELF executables") (description "PatchELF allows the ELF \"interpreter\" and RPATH of an ELF binary to be