guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: fftw: Fix configure flags for armhf, aarch64, and mips.


From: Mark H. Weaver
Subject: 01/01: gnu: fftw: Fix configure flags for armhf, aarch64, and mips.
Date: Tue, 8 May 2018 18:42:55 -0400 (EDT)

mhw pushed a commit to branch core-updates
in repository guix.

commit 69d5909e032e2fba57814ea9db52389d384d9341
Author: Mark H Weaver <address@hidden>
Date:   Tue May 8 18:28:38 2018 -0400

    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.
---
 gnu/packages/algebra.scm | 48 ++++++++++++++++++++++++++----------------------
 1 file changed, 26 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/algebra.scm b/gnu/packages/algebra.scm
index 7cf086c..a794c4c 100644
--- a/gnu/packages/algebra.scm
+++ b/gnu/packages/algebra.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Andreas Enge 
<address@hidden>
 ;;; Copyright © 2013, 2015, 2017, 2018 Ludovic Courtès <address@hidden>
 ;;; Copyright © 2016, 2017, 2018 Nicolas Goaziou <address@hidden>
-;;; Copyright © 2014 Mark H Weaver <address@hidden>
+;;; Copyright © 2014, 2018 Mark H Weaver <address@hidden>
 ;;; Copyright © 2016, 2018 Ricardo Wurmus <address@hidden>
 ;;; Copyright © 2017 Efraim Flashner <address@hidden>
 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <address@hidden>
@@ -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."))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]