aboutsummaryrefslogtreecommitdiff
path: root/package/fftw
diff options
context:
space:
mode:
authorGravatar Yann E. MORIN <yann.morin.1998@free.fr>2015-03-16 17:31:21 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-03-16 19:44:02 +0100
commit96336c624855e08b6c0ec9200e9784c2b9be1afb (patch)
tree53957192ef6c84b5adb104a779393acd520a6acc /package/fftw
parenta990ed296de3c021891373fa14f8789f4d7fa422 (diff)
downloadbuildroot-96336c624855e08b6c0ec9200e9784c2b9be1afb.tar.gz
buildroot-96336c624855e08b6c0ec9200e9784c2b9be1afb.tar.bz2
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: "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: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com> Reviewed-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/fftw')
-rw-r--r--package/fftw/Config.in13
-rw-r--r--package/fftw/fftw.mk7
2 files changed, 20 insertions, 0 deletions
diff --git a/package/fftw/Config.in b/package/fftw/Config.in
index 4cefa28edf..4a0706a6be 100644
--- a/package/fftw/Config.in
+++ b/package/fftw/Config.in
@@ -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
diff --git a/package/fftw/fftw.mk b/package/fftw/fftw.mk
index 78d36e97d7..c05012a8e4 100644
--- a/package/fftw/fftw.mk
+++ b/package/fftw/fftw.mk
@@ -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))