aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/digest.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/gnu/packages/digest.scm b/gnu/packages/digest.scm
index 7adc12e8db..78eeb7e286 100644
--- a/gnu/packages/digest.scm
+++ b/gnu/packages/digest.scm
@@ -21,7 +21,8 @@
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
- #:use-module (guix utils))
+ #:use-module (guix utils)
+ #:use-module (ice-9 match))
(define-public xxhash
(package
@@ -40,6 +41,11 @@
(arguments
`(#:make-flags
(list ,(string-append "CC=" (cc-for-target))
+ ,(match (or (%current-target-system)
+ (%current-system))
+ ;; Detect vector instruction set at run time.
+ ((or "i686-linux" "x86_64-linux") "DISPATCH=1")
+ (_ "DISPATCH=0"))
"XXH_FORCE_MEMORY_ACCESS=1" ; improved performance with GCC
(string-append "prefix=" (assoc-ref %outputs "out")))
#:phases