summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2017-04-30 11:03:49 +0300
committerEfraim Flashner <efraim@flashner.co.il>2017-04-30 11:04:38 +0300
commit06be316111b70fb46aa4ee77f2fbf9e6308a2fb6 (patch)
tree9dfd698d4a5a70b49357ef2f1e489290527cf5f7 /gnu/packages
parentb9ce9eca23ff326b3a98c6e9e49a60e1a4b81d8b (diff)
downloadguix-06be316111b70fb46aa4ee77f2fbf9e6308a2fb6.tar.gz
gnu: jemalloc: Disable transparent huge pages on non-Intel systems.
* gnu/packages/jemalloc.scm (jemalloc)[arguments]: On non-Intel systems
add '--disable-thp' to #:configure-flags. Adjust #:phases to remove
offending test which incorrectly tests transparent huge pages.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/jemalloc.scm19
1 files changed, 19 insertions, 0 deletions
diff --git a/gnu/packages/jemalloc.scm b/gnu/packages/jemalloc.scm
index fcc9cc8082..27fb46e59d 100644
--- a/gnu/packages/jemalloc.scm
+++ b/gnu/packages/jemalloc.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
+;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -17,6 +18,8 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages jemalloc)
+  #:use-module (srfi srfi-1)
+  #:use-module (srfi srfi-26)
   #:use-module ((guix licenses) #:select (bsd-2))
   #:use-module (guix packages)
   #:use-module (guix download)
@@ -37,6 +40,22 @@
                (base32
                 "10373xhpc10pgmai9fkc1z0rs029qlcb3c0qfnvkbwdlcibdh2cl"))))
     (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'delete-thp-test
+           ;; This test does not check if transparent huge pages are supported
+           ;; on the system before running the test.
+           (lambda _
+             (substitute* "Makefile.in"
+               (("\\$\\(srcroot\\)test/unit/pages.c \\\\") "\\"))
+             #t)))
+       ,@(if (any (cute string-prefix? <> (or (%current-target-system)
+                                              (%current-system)))
+                 '("x64_64" "i686"))
+           ;; Transparent huge pages are only enabled by default on Intel processors
+           '()
+           '(#:configure-flags (list "--disable-thp")))))
     (home-page "http://jemalloc.net/")
     (synopsis "General-purpose scalable concurrent malloc implementation")
     (description