| 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 jemalloc)
|
| 25 | #:use-module (srfi srfi-1)
|
| 26 | #:use-module (srfi srfi-26)
|
| 27 | #:use-module (ice-9 match)
|
| 28 | #:use-module ((guix licenses) #:select (bsd-2))
|
| 29 | #:use-module (guix packages)
|
| 30 | #:use-module (guix gexp)
|
| 31 | #:use-module (guix download)
|
| 32 | #:use-module (guix utils)
|
| 33 | #:use-module (gnu packages)
|
| 34 | #:use-module (gnu packages perl)
|
| 35 | #:use-module (guix build-system gnu))
|
| 36 |
|
| 37 | (define-public jemalloc
|
| 38 | (package
|
| 39 | (name "jemalloc")
|
| 40 | (version "5.4.0")
|
| 41 | (source (origin
|
| 42 | (method url-fetch)
|
| 43 | (uri (string-append
|
| 44 | "https://github.com/jemalloc/jemalloc/releases/download/"
|
| 45 | version "/jemalloc-" version ".tar.bz2"))
|
| 46 | (sha256
|
| 47 | (base32
|
| 48 | "07agxykbz1ia7xiji4wdayzd5v2p4vbddv915xy3w2biqbx7c1r0"))))
|
| 49 | (build-system gnu-build-system)
|
| 50 | (arguments
|
| 51 | (list
|
| 52 | #:tests? (and (not (%current-target-system))
|
| 53 | (not (target-arm32?)))
|
| 54 | #:phases
|
| 55 | #~(modify-phases %standard-phases
|
| 56 | (add-after 'unpack 'delete-thp-test
|
| 57 | |
| 58 | |
| 59 | (lambda _
|
| 60 | (substitute* "Makefile.in"
|
| 61 | (("\\$\\(srcroot\\)test/unit/pages.c \\\\") "\\")))))
|
| 62 | #:configure-flags
|
| 63 | |
| 64 | |
| 65 | |
| 66 | #~'("--disable-initial-exec-tls"
|
| 67 | #$@(match (%current-system)
|
| 68 | ("aarch64-linux"
|
| 69 | (list "--with-lg-page=14"))
|
| 70 | ("powerpc-linux"
|
| 71 | (list "CPPFLAGS=-maltivec"))
|
| 72 | (_
|
| 73 | '())))))
|
| 74 | (inputs (list perl))
|
| 75 | |
| 76 | |
| 77 | (outputs '("out" "bin"))
|
| 78 | (home-page "https://jemalloc.net/")
|
| 79 | (synopsis "General-purpose scalable concurrent malloc implementation")
|
| 80 | (description
|
| 81 | "This library providing a malloc(3) implementation that emphasizes
|
| 82 | fragmentation avoidance and scalable concurrency support.")
|
| 83 | (license bsd-2)))
|