| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 |
|
| 24 | (define-module (gnu packages libunwind)
|
| 25 | #:use-module (guix gexp)
|
| 26 | #:use-module (guix download)
|
| 27 | #:use-module (guix packages)
|
| 28 | #:use-module (guix utils)
|
| 29 | #:use-module (gnu packages)
|
| 30 | #:use-module (guix build-system gnu)
|
| 31 | #:use-module (guix build-system trivial)
|
| 32 | #:use-module (guix licenses))
|
| 33 |
|
| 34 | (define-public libunwind
|
| 35 | (package
|
| 36 | (name "libunwind")
|
| 37 | (version "1.6.2")
|
| 38 | (source (origin
|
| 39 | (method url-fetch)
|
| 40 | (uri (string-append "mirror://savannah/libunwind/libunwind-"
|
| 41 | version ".tar.gz"))
|
| 42 | (sha256
|
| 43 | (base32
|
| 44 | "0xj9g6a9q7v7zz6lymf3f6011synibgawi4wi384bywid5kfqsja"))))
|
| 45 | (build-system gnu-build-system)
|
| 46 | (arguments
|
| 47 | (list
|
| 48 | #:configure-flags
|
| 49 | #~(list #$(string-append
|
| 50 | "CFLAGS=-g -O2"
|
| 51 | " -Wno-error=implicit-function-declaration"
|
| 52 | " -Wno-error=incompatible-pointer-types"))
|
| 53 | |
| 54 | |
| 55 | #:make-flags
|
| 56 | #~(list "XFAIL_TESTS=run-coredump-unwind run-coredump-unwind-mdi")
|
| 57 | |
| 58 | #:tests? (and (not (%current-target-system))
|
| 59 | (target-x86-64?))))
|
| 60 | (home-page "https://www.nongnu.org/libunwind")
|
| 61 | (synopsis "Determining the call chain of a program")
|
| 62 | (description
|
| 63 | "The primary goal of this project is to define a portable and efficient C
|
| 64 | programming interface (API) to determine the call-chain of a program. The API
|
| 65 | additionally provides the means to manipulate the preserved (callee-saved)
|
| 66 | state of each call-frame and to resume execution at any point in the
|
| 67 | call-chain (non-local goto). The API supports both local (same-process) and
|
| 68 | remote (across-process) operation. As such, the API is useful in a number of
|
| 69 | applications.")
|
| 70 | |
| 71 | |
| 72 | (license expat)))
|
| 73 |
|
| 74 | (define-public libunwind-static
|
| 75 | (package
|
| 76 | (inherit libunwind)
|
| 77 | (name (string-append (package-name libunwind) "-static"))
|
| 78 | (build-system trivial-build-system)
|
| 79 | (arguments
|
| 80 | (list
|
| 81 | #:modules '((guix build utils))
|
| 82 | #:builder
|
| 83 | #~(begin
|
| 84 | (use-modules (guix build utils))
|
| 85 | (let ((target (string-append #$output "/lib/libunwind.a")))
|
| 86 | (install-file (search-input-file %build-inputs "/lib/libunwind.a")
|
| 87 | (dirname target))
|
| 88 | (remove-store-references target)))))
|
| 89 | (inputs (list libunwind))))
|