aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2018-05-08 18:28:38 -0400
committerMark H Weaver <mhw@netris.org>2018-05-08 18:40:13 -0400
commit69d5909e032e2fba57814ea9db52389d384d9341 (patch)
tree192b4f5d487546ad657336150cd38efc900c8f8b
parentd6ac4d42ba6c7253388cf1c43615e70a7c236c12 (diff)
downloadguix-69d5909e032e2fba57814ea9db52389d384d9341.tar.gz
guix-69d5909e032e2fba57814ea9db52389d384d9341.zip
gnu: fftw: Fix configure flags for armhf, aarch64, and mips.
This is a followup to commit 65bb22796f854cbc3eae053a80b1d64365dad376. * gnu/packages/algebra.scm (fftw)[arguments]: In the configure-flags, avoid two-layer quasiquotation by changing the inner quasiquote to a normal quote. Remove "--enable-armv7a-cntvct" on 32-bit ARM, and "--enable-armv8-cntvct-el0" on 64-bit ARM, since these generate instructions that are not normally available from user mode. Remove "--enable-mips-zbus-timer" on MIPS, since the needed hardware support may not be available. Add a default case to the conditional to support unrecognized targets. (fftwf)[arguments]: Restore the "--enable-single" flag, which was present prior to commit 65bb22796.
-rw-r--r--gnu/packages/algebra.scm48
1 files changed, 26 insertions, 22 deletions
diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 7cf086cec8..a794c4c6a8 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2013, 2015, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016, 2017, 2018 Nicolas Goaziou <mail@nicolasgoaziou.fr>
-;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2014, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -532,22 +532,22 @@ a C program.")
(build-system gnu-build-system)
(arguments
`(#:configure-flags
- `("--enable-shared" "--enable-openmp" "--enable-threads"
- ,,@(let ((system (or (%current-target-system) (%current-system))))
- ;; Enable SIMD extensions for codelets. See details at:
- ;; <http://fftw.org/fftw3_doc/Installation-on-Unix.html>.
- (cond
- ((string-prefix? "x86_64" system)
- '("--enable-sse2" "--enable-avx" "--enable-avx2"
- "--enable-avx512" "--enable-avx-128-fma"))
- ((string-prefix? "i686" system)
- '("--enable-sse2"))
- ((string-prefix? "aarch64" system)
- '("--enable-neon" "--enable-armv8-cntvct-el0"))
- ((string-prefix? "arm" system) ;neon only for single-precision
- '("--enable-armv7a-cntvct")) ;on 32-bit arm
- ((string-prefix? "mips" system)
- '("--enable-mips-zbus-timer"))))
+ '("--enable-shared" "--enable-openmp" "--enable-threads"
+ ,@(let ((system (or (%current-target-system) (%current-system))))
+ ;; Enable SIMD extensions for codelets. See details at:
+ ;; <http://fftw.org/fftw3_doc/Installation-on-Unix.html>.
+ (cond
+ ((string-prefix? "x86_64" system)
+ '("--enable-sse2" "--enable-avx" "--enable-avx2"
+ "--enable-avx512" "--enable-avx-128-fma"))
+ ((string-prefix? "i686" system)
+ '("--enable-sse2"))
+ ((string-prefix? "aarch64" system)
+ ;; Note that fftw supports NEON on 32-bit ARM only when
+ ;; compiled for single-precision.
+ '("--enable-neon"))
+ (else
+ '())))
;; By default '-mtune=native' is used. However, that may cause the
;; use of ISA extensions (e.g. AVX) that are not necessarily
;; available on the user's machine when that package is built on a
@@ -568,11 +568,15 @@ cosine/ sine transforms or DCT/DST).")
(name "fftwf")
(arguments
(substitute-keyword-arguments (package-arguments fftw)
- ((#:configure-flags cf)
- (if (string-prefix? "arm" (or (%current-target-system)
- (%current-system)))
- `(cons "--enable-neon" ,cf)
- cf))))
+ ((#:configure-flags fftw-configure-flags)
+ `(cons* "--enable-single"
+ ,@(if (string-prefix? "arm" (or (%current-target-system)
+ (%current-system)))
+ ;; fftw supports NEON on 32-bit ARM only when compiled
+ ;; for single-precision, so add it here.
+ '("--enable-neon")
+ '())
+ ,fftw-configure-flags))))
(description
(string-append (package-description fftw)
" Single-precision version."))))