diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2019-03-29 17:06:58 +0300 |
|---|---|---|
| committer | Efraim Flashner <efraim@flashner.co.il> | 2019-03-29 17:08:05 +0300 |
| commit | 8339ccac5fc294fb3d0a0f62fe91c9dfaf0ba28f (patch) | |
| tree | a6a9f0b480e793b586c2d003f802b50a3b1662de | |
| parent | 3776dc094cdcf3836501ac8c783092461e7f1e66 (diff) | |
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.scm | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm index 216b48195d4..9dca2be98ed 100644 --- a/gnu/packages/graph.scm +++ b/gnu/packages/graph.scm | |||
| @@ -358,16 +358,15 @@ CPUFLAGS = ~{~a ~}~%" | |||
| 358 | (assoc-ref inputs "python*") python-version | 358 | (assoc-ref inputs "python*") python-version |
| 359 | (assoc-ref inputs "python-numpy") python-version | 359 | (assoc-ref inputs "python-numpy") python-version |
| 360 | python-version | 360 | python-version |
| 361 | (cons "-mpopcnt" | 361 | (list ,@(let ((system (or (%current-target-system) |
| 362 | (list ,@(let ((system (or (%current-target-system) | 362 | (%current-system)))) |
| 363 | (%current-system)))) | 363 | (cond |
| 364 | (cond | 364 | ((string-prefix? "x86_64" system) |
| 365 | ((string-prefix? "x86_64" system) | 365 | '("-mavx" "-msse2" "-mpopcnt")) |
| 366 | '("-mavx" "-msse2")) | 366 | ((string-prefix? "i686" system) |
| 367 | ((string-prefix? "i686" system) | 367 | '("-msse2" "-mpopcnt")) |
| 368 | '("-msse2")) | 368 | (else |
| 369 | (else | 369 | '())))))))) |
| 370 | '()))))))))) | ||
| 371 | (substitute* "Makefile" | 370 | (substitute* "Makefile" |
| 372 | (("../libfaiss.a") "")) | 371 | (("../libfaiss.a") "")) |
| 373 | (invoke "make" "cpu")))))) | 372 | (invoke "make" "cpu")))))) |
