Enable AVX2 for FFTW Windows build to suppress SSE2-only warning
FFTW emits '#warning Only SSE and SSE2 are available' when cross-compiling with a generic x86_64 target: the configure test for AVX intrinsics fails without an explicit -mavx flag, so FFTW silently falls back to SSE2. Fix: pass CFLAGS="-march=haswell" to configure, which enables SSE2/AVX/AVX2/FMA. Add --enable-avx2 alongside existing --enable-avx. FFTW_MARCH is overridable for older CPU targets: make -f Makefile.windows FFTW_MARCH=-march=sandybridge # AVX only, 2011+ make -f Makefile.windows FFTW_MARCH=-march=core2 # SSSE3, 2007+ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a3385bd1f9
commit
edd8991a3c
@ -38,15 +38,23 @@ FFTW_INST := $(CURDIR)/third_party/fftw-win64
|
|||||||
FFTW_BUILD_D := $(FFTW_INST)/build-double
|
FFTW_BUILD_D := $(FFTW_INST)/build-double
|
||||||
FFTW_BUILD_F := $(FFTW_INST)/build-float
|
FFTW_BUILD_F := $(FFTW_INST)/build-float
|
||||||
|
|
||||||
|
# FFTW_MARCH задаёт минимальный набор инструкций для Windows-бинарника.
|
||||||
|
# haswell (2013+) гарантирует AVX2+FMA — оптимальный выбор для SDR на современном ПК.
|
||||||
|
# Для совместимости со старыми машинами замените на -march=sandybridge (AVX, 2011+)
|
||||||
|
# или -march=core2 (SSSE3, 2007+).
|
||||||
|
FFTW_MARCH ?= -march=haswell
|
||||||
|
|
||||||
FFTW_CONF_COMMON = \
|
FFTW_CONF_COMMON = \
|
||||||
--host=$(MINGW_PREFIX) \
|
--host=$(MINGW_PREFIX) \
|
||||||
CC=$(CC) \
|
CC=$(CC) \
|
||||||
|
CFLAGS="$(FFTW_MARCH)" \
|
||||||
--prefix=$(FFTW_INST) \
|
--prefix=$(FFTW_INST) \
|
||||||
--enable-shared \
|
--enable-shared \
|
||||||
--disable-static \
|
--disable-static \
|
||||||
--with-our-malloc \
|
--with-our-malloc \
|
||||||
--enable-sse2 \
|
--enable-sse2 \
|
||||||
--enable-avx \
|
--enable-avx \
|
||||||
|
--enable-avx2 \
|
||||||
--disable-fortran \
|
--disable-fortran \
|
||||||
--quiet
|
--quiet
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user