Commit 96336c62 authored by Yann E. MORIN's avatar Yann E. MORIN Committed by Thomas Petazzoni
Browse files

package/fftw: add option for fast maths



Use FFTW_CFLAGS as intermediate variable, since we're going to need it
in a later patch (about NEON optimisations).

Signed-off-by: default avatar"Yann E. MORIN" <yann.morin.1998@free.fr>
[based on a patch by Guillaume]
Cc: guillaume william brs <guillaume.bressaix@gmail.com>
Cc: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Tested-by: default avatarGwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Reviewed-by: default avatarGwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent a990ed29
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -49,4 +49,17 @@ config BR2_PACKAGE_FFTW_PRECISION_QUAD

endchoice

config BR2_PACKAGE_FFTW_FAST
	bool "optimise for speed over accuracy"
	help
	  Optimise for fast math functions, at the expense of accuracy.

	  Say 'y' if you need speed and can live with inaccuracies in
	  the results. Say 'n' (the default) if accuracy is of utmost
	  importance.

	  This basically uses gcc's -Ofast optimisation level, which in
	  turn is basically using gcc's -ffast-math. See the gcc manual
	  for what this means.

endif
+7 −0
Original line number Diff line number Diff line
@@ -14,4 +14,11 @@ FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_PRECISION_SINGLE),--enable,--disable)-
FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE),--enable,--disable)-long-double
FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_PRECISION_QUAD),--enable,--disable)-quad-precision

FFTW_CFLAGS = $(TARGET_CFLAGS)
ifeq ($(BR2_PACKAGE_FFTW_FAST),y)
FFTW_CFLAGS += -Ofast
endif

FFTW_CONF_OPTS += CFLAGS="$(FFTW_CFLAGS)"

$(eval $(autotools-package))