| @@ -1,42 +1,38 @@ | | | @@ -1,42 +1,38 @@ |
1 | # $NetBSD: options.mk,v 1.11 2021/05/16 10:16:26 nia Exp $ | | 1 | # $NetBSD: options.mk,v 1.12 2021/06/12 07:30:23 nia Exp $ |
2 | | | 2 | |
3 | PKG_OPTIONS_VAR= PKG_OPTIONS.fftw | | 3 | PKG_OPTIONS_VAR= PKG_OPTIONS.fftw |
4 | PKG_SUPPORTED_OPTIONS= fftw-fortran openmp mpi | | 4 | PKG_SUPPORTED_OPTIONS= fftw-fortran openmp mpi simd |
5 | | | 5 | |
6 | .include "../../mk/bsd.prefs.mk" | | 6 | .include "../../mk/bsd.prefs.mk" |
7 | | | 7 | |
8 | .if !empty(PKGSRC_COMPILER:M*gcc*) || !empty(PKGSRC_COMPILER:M*clang*) | | 8 | .if !empty(PKGSRC_COMPILER:M*gcc*) || !empty(PKGSRC_COMPILER:M*clang*) |
9 | PKG_SUPPORTED_OPTIONS+= simd | | | |
10 | . if ${MACHINE_ARCH} == "x86_64" | | 9 | . if ${MACHINE_ARCH} == "x86_64" |
11 | PKG_SUPPORTED_OPTIONS+= avx | | 10 | PKG_SUPPORTED_OPTIONS+= avx |
12 | . endif | | 11 | . endif |
13 | PKG_SUGGESTED_OPTIONS+= simd | | 12 | PKG_SUGGESTED_OPTIONS+= simd |
14 | .endif | | 13 | .endif |
15 | | | 14 | |
16 | .include "../../mk/bsd.options.mk" | | 15 | .include "../../mk/bsd.options.mk" |
17 | | | 16 | |
18 | .if !empty(PKG_OPTIONS:Mavx) | | 17 | .if !empty(PKG_OPTIONS:Mavx) |
19 | GCC_REQD+= 4.9 | | 18 | GCC_REQD+= 4.9 |
20 | . for opt in avx avx2 avx512 avx-128-fma | | 19 | . for opt in avx avx2 avx512 avx-128-fma |
21 | FFTW_FLOAT_OPTS+= --enable-${opt} | | 20 | FFTW_FLOAT_OPTS+= --enable-${opt} |
22 | FFTW_DOUBLE_OPTS+= --enable-${opt} | | 21 | FFTW_DOUBLE_OPTS+= --enable-${opt} |
23 | . endfor | | 22 | . endfor |
24 | .endif | | 23 | .endif |
25 | | | 24 | |
26 | .if !empty(PKG_OPTIONS:Msimd) | | 25 | .if !empty(PKG_OPTIONS:Msimd) |
27 | # Generic compiler vector abstractions (GCC extension). | | | |
28 | FFTW_FLOAT_OPTS+= --enable-generic-simd128 --enable-generic-simd256 | | | |
29 | FFTW_DOUBLE_OPTS+= --enable-generic-simd128 --enable-generic-simd256 | | | |
30 | . if !empty(MACHINE_ARCH:Mpowerpc*) | | 26 | . if !empty(MACHINE_ARCH:Mpowerpc*) |
31 | FFTW_FLOAT_OPTS+= --enable-altivec | | 27 | FFTW_FLOAT_OPTS+= --enable-altivec |
32 | . endif | | 28 | . endif |
33 | . if ${MACHINE_ARCH} == "x86_64" | | 29 | . if ${MACHINE_ARCH} == "x86_64" |
34 | FFTW_FLOAT_OPTS+= --enable-sse2 | | 30 | FFTW_FLOAT_OPTS+= --enable-sse2 |
35 | FFTW_DOUBLE_OPTS+= --enable-sse2 | | 31 | FFTW_DOUBLE_OPTS+= --enable-sse2 |
36 | . endif | | 32 | . endif |
37 | .endif | | 33 | .endif |
38 | | | 34 | |
39 | .if !empty(PKG_OPTIONS:Mfftw-fortran) | | 35 | .if !empty(PKG_OPTIONS:Mfftw-fortran) |
40 | USE_LANGUAGES+= fortran77 | | 36 | USE_LANGUAGES+= fortran77 |
41 | .else | | 37 | .else |
42 | CONFIGURE_ARGS+= --disable-fortran | | 38 | CONFIGURE_ARGS+= --disable-fortran |