Sat Jun 12 07:30:23 2021 UTC ()
fftw: Disable "generic" GCC simd intrinsics

These produce poor code and it's always better to use the CPU-specific
intrinsics instead, which we already do on platforms where the test
suite doesn't fail.


(nia)
diff -r1.11 -r1.12 pkgsrc/math/fftw/options.mk

cvs diff -r1.11 -r1.12 pkgsrc/math/fftw/options.mk (expand / switch to unified diff)

--- pkgsrc/math/fftw/options.mk 2021/05/16 10:16:26 1.11
+++ pkgsrc/math/fftw/options.mk 2021/06/12 07:30:23 1.12
@@ -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
3PKG_OPTIONS_VAR= PKG_OPTIONS.fftw 3PKG_OPTIONS_VAR= PKG_OPTIONS.fftw
4PKG_SUPPORTED_OPTIONS= fftw-fortran openmp mpi 4PKG_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*)
9PKG_SUPPORTED_OPTIONS+= simd 
10. if ${MACHINE_ARCH} == "x86_64" 9. if ${MACHINE_ARCH} == "x86_64"
11PKG_SUPPORTED_OPTIONS+= avx 10PKG_SUPPORTED_OPTIONS+= avx
12. endif 11. endif
13PKG_SUGGESTED_OPTIONS+= simd 12PKG_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)
19GCC_REQD+= 4.9 18GCC_REQD+= 4.9
20. for opt in avx avx2 avx512 avx-128-fma 19. for opt in avx avx2 avx512 avx-128-fma
21FFTW_FLOAT_OPTS+= --enable-${opt} 20FFTW_FLOAT_OPTS+= --enable-${opt}
22FFTW_DOUBLE_OPTS+= --enable-${opt} 21FFTW_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). 
28FFTW_FLOAT_OPTS+= --enable-generic-simd128 --enable-generic-simd256 
29FFTW_DOUBLE_OPTS+= --enable-generic-simd128 --enable-generic-simd256 
30. if !empty(MACHINE_ARCH:Mpowerpc*) 26. if !empty(MACHINE_ARCH:Mpowerpc*)
31FFTW_FLOAT_OPTS+= --enable-altivec 27FFTW_FLOAT_OPTS+= --enable-altivec
32. endif 28. endif
33. if ${MACHINE_ARCH} == "x86_64" 29. if ${MACHINE_ARCH} == "x86_64"
34FFTW_FLOAT_OPTS+= --enable-sse2 30FFTW_FLOAT_OPTS+= --enable-sse2
35FFTW_DOUBLE_OPTS+= --enable-sse2 31FFTW_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)
40USE_LANGUAGES+= fortran77 36USE_LANGUAGES+= fortran77
41.else 37.else
42CONFIGURE_ARGS+= --disable-fortran 38CONFIGURE_ARGS+= --disable-fortran