pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/math/fftw fftw: also move generic simd support to opti...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7bafa0df3aae
branches:  trunk
changeset: 452768:7bafa0df3aae
user:      nia <nia%pkgsrc.org@localhost>
date:      Sat May 15 11:18:58 2021 +0000

description:
fftw: also move generic simd support to options.mk (on by default)

diffstat:

 math/fftw/Makefile   |  13 +------------
 math/fftw/options.mk |  17 ++++++++++++++++-
 2 files changed, 17 insertions(+), 13 deletions(-)

diffs (65 lines):

diff -r b91bff9a4aa7 -r 7bafa0df3aae math/fftw/Makefile
--- a/math/fftw/Makefile        Sat May 15 11:18:12 2021 +0000
+++ b/math/fftw/Makefile        Sat May 15 11:18:58 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.71 2021/05/15 11:05:29 nia Exp $
+# $NetBSD: Makefile,v 1.72 2021/05/15 11:18:58 nia Exp $
 
 DISTNAME=      fftw-3.3.9
 PKGREVISION=   5
@@ -49,17 +49,6 @@
 MAKE_DIRS+=            build/${p}
 .endfor
 
-# Generic compiler vector abstractions.
-.if !empty(PKGSRC_COMPILER:M*gcc*) || !empty(PKGSRC_COMPILER:M*clang*)
-FFTW_FLOAT_OPTS+=      --enable-generic-simd128 --enable-generic-simd256
-FFTW_DOUBLE_OPTS+=     --enable-generic-simd128 --enable-generic-simd256
-.endif
-
-.if ${MACHINE_ARCH} == "x86_64"
-FFTW_FLOAT_OPTS+=      --enable-sse --enable-sse2
-FFTW_DOUBLE_OPTS+=     --enable-sse2
-.endif
-
 pre-configure:
 .for d in ${CONFIGURE_DIRS}
        mkdir -p ${WRKSRC:Q}/${d}
diff -r b91bff9a4aa7 -r 7bafa0df3aae math/fftw/options.mk
--- a/math/fftw/options.mk      Sat May 15 11:18:12 2021 +0000
+++ b/math/fftw/options.mk      Sat May 15 11:18:58 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.6 2021/05/15 11:05:29 nia Exp $
+# $NetBSD: options.mk,v 1.7 2021/05/15 11:18:58 nia Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.fftw
 # fftw (double) and fftwf (single) are always built, you can add
@@ -7,6 +7,11 @@
 
 .include "../../mk/bsd.prefs.mk"
 
+.if !empty(PKGSRC_COMPILER:M*gcc*) || !empty(PKGSRC_COMPILER:M*clang*)
+PKG_SUPPORTED_OPTIONS+=        simd
+PKG_SUGGESTED_OPTIONS+=        simd
+.endif
+
 .if ${MACHINE_ARCH} == "x86_64"
 PKG_SUPPORTED_OPTIONS+=        avx
 .endif
@@ -21,6 +26,16 @@
 .  endfor
 .endif
 
+.if !empty(PKG_OPTIONS:Msimd)
+# Generic compiler vector abstractions (GCC extension).
+FFTW_FLOAT_OPTS+=      --enable-generic-simd128 --enable-generic-simd256
+FFTW_DOUBLE_OPTS+=     --enable-generic-simd128 --enable-generic-simd256
+.  if ${MACHINE_ARCH} == "x86_64"
+FFTW_FLOAT_OPTS+=      --enable-sse2
+FFTW_DOUBLE_OPTS+=     --enable-sse2
+.  endif
+.endif
+
 .if !empty(PKG_OPTIONS:Mfftw-fortran)
 USE_LANGUAGES+=                fortran77
 .else



Home | Main Index | Thread Index | Old Index