mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: xxhash: Detect vector instructions at run time.
* gnu/packages/digest.scm (xxhash)[arguments]: Set DISPATCH=1 make flag on x86.
This commit is contained in:
parent
8db9300454
commit
1d25cfbaf4
1 changed files with 7 additions and 1 deletions
|
@ -21,7 +21,8 @@
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
#:use-module (guix build-system gnu)
|
#:use-module (guix build-system gnu)
|
||||||
#:use-module (guix utils))
|
#:use-module (guix utils)
|
||||||
|
#:use-module (ice-9 match))
|
||||||
|
|
||||||
(define-public xxhash
|
(define-public xxhash
|
||||||
(package
|
(package
|
||||||
|
@ -40,6 +41,11 @@
|
||||||
(arguments
|
(arguments
|
||||||
`(#:make-flags
|
`(#:make-flags
|
||||||
(list ,(string-append "CC=" (cc-for-target))
|
(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
|
"XXH_FORCE_MEMORY_ACCESS=1" ; improved performance with GCC
|
||||||
(string-append "prefix=" (assoc-ref %outputs "out")))
|
(string-append "prefix=" (assoc-ref %outputs "out")))
|
||||||
#:phases
|
#:phases
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue