package/fftw: enable threads when the toolchain has them
authorYann E. MORIN <yann.morin.1998@free.fr>
Mon, 16 Mar 2015 16:31:25 +0000 (17:31 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 16 Mar 2015 18:44:02 +0000 (19:44 +0100)
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>
package/fftw/fftw.mk

index 3acde57ca3068e5d35c4b96987b13e5ba2e23dc9..aea391098126103af78bec2210e82b38d9303dc3 100644 (file)
@@ -29,6 +29,13 @@ FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_SSE2),--enable,--disable)-sse2
 FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_NEON),--enable,--disable)-neon
 FFTW_CFLAGS += $(if $(BR2_PACKAGE_FFTW_USE_NEON),-mfpu=neon)
 
+# Generic optimisations
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
+FFTW_CONF_OPTS += --enable-threads --with-combined-threads
+else
+FFTW_CONF_OPTS += --disable-threads
+endif
+
 FFTW_CONF_OPTS += CFLAGS="$(FFTW_CFLAGS)"
 
 $(eval $(autotools-package))