aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2019-03-29 17:06:58 +0300
committerEfraim Flashner <efraim@flashner.co.il>2019-03-29 17:08:05 +0300
commit8339ccac5fc294fb3d0a0f62fe91c9dfaf0ba28f (patch)
treea6a9f0b480e793b586c2d003f802b50a3b1662de
parent3776dc094cdcf3836501ac8c783092461e7f1e66 (diff)
downloadpatches-8339ccac5fc294fb3d0a0f62fe91c9dfaf0ba28f.tar
patches-8339ccac5fc294fb3d0a0f62fe91c9dfaf0ba28f.tar.gz
gnu: python-faiss: Fix building on non-Intel architectures.
* gnu/packages/graph.scm (python-faiss)[arguments]: Adjust custom 'build-swig phase to change build flags for different archictures.
-rw-r--r--gnu/packages/graph.scm19
1 files changed, 9 insertions, 10 deletions
diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm
index 216b48195d..9dca2be98e 100644
--- a/gnu/packages/graph.scm
+++ b/gnu/packages/graph.scm
@@ -358,16 +358,15 @@ CPUFLAGS = ~{~a ~}~%"
(assoc-ref inputs "python*") python-version
(assoc-ref inputs "python-numpy") python-version
python-version
- (cons "-mpopcnt"
- (list ,@(let ((system (or (%current-target-system)
- (%current-system))))
- (cond
- ((string-prefix? "x86_64" system)
- '("-mavx" "-msse2"))
- ((string-prefix? "i686" system)
- '("-msse2"))
- (else
- '())))))))))
+ (list ,@(let ((system (or (%current-target-system)
+ (%current-system))))
+ (cond
+ ((string-prefix? "x86_64" system)
+ '("-mavx" "-msse2" "-mpopcnt"))
+ ((string-prefix? "i686" system)
+ '("-msse2" "-mpopcnt"))
+ (else
+ '()))))))))
(substitute* "Makefile"
(("../libfaiss.a") ""))
(invoke "make" "cpu"))))))