* [Buildroot] [PATCH v3 1/1] fftw: add compile precision option
@ 2015-03-14 15:29 Gwenhael Goavec-Merou
2015-03-14 16:05 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Gwenhael Goavec-Merou @ 2015-03-14 15:29 UTC (permalink / raw)
To: buildroot
From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
fftw has options to select compile precision between single, long-double and
quad. These options are exclusives. This patch adds choice to select precision
option.
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
Changes v2 -> v3:
* add depends instruction for quad-precision. This option needs to have a
toolchain with libquadmath enabled (only x86, x86_64 and Itanium).
Changes v1 -> v2:
* FFTW_CONFIGURE_OPTS -> FFTW_CONF_OPTS
---
package/fftw/Config.in | 34 ++++++++++++++++++++++++++++++++++
package/fftw/fftw.mk | 9 +++++++++
2 files changed, 43 insertions(+)
diff --git a/package/fftw/Config.in b/package/fftw/Config.in
index 36f849f..03acb56 100644
--- a/package/fftw/Config.in
+++ b/package/fftw/Config.in
@@ -9,3 +9,37 @@ config BR2_PACKAGE_FFTW
double precision.
http://www.fftw.org
+
+if BR2_PACKAGE_FFTW
+
+choice
+ prompt "fftw precision"
+ default BR2_PACKAGE_FFTW_PRECISION_NONE
+ help
+ Selects fftw precision
+
+config BR2_PACKAGE_FFTW_PRECISION_NONE
+ bool "none"
+ help
+ no compile precision selected
+
+config BR2_PACKAGE_FFTW_PRECISION_SINGLE
+ bool "single precision"
+ help
+ compile fftw in single precision
+
+config BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE
+ bool "long double precision"
+ help
+ compile fftw in long-double precision
+
+config BR2_PACKAGE_FFTW_PRECISION_QUAD
+ bool "quad precision"
+ # quad-precision needs to have a gcc with libquadmath
+ depends on (BR2_i386 || BR2_x86_64) && BR2_USE_WCHAR
+ help
+ compile fftw in quadruple precision if available
+
+endchoice
+
+endif
diff --git a/package/fftw/fftw.mk b/package/fftw/fftw.mk
index 3b302df..80cc0dc 100644
--- a/package/fftw/fftw.mk
+++ b/package/fftw/fftw.mk
@@ -10,4 +10,13 @@ FFTW_INSTALL_STAGING = YES
FFTW_LICENSE = GPLv2+
FFTW_LICENSE_FILES = COPYING
+ifeq ($(BR2_PACKAGE_FFTW_PRECISION_SINGLE),y)
+FFTW_CONF_OPTS = --enable-single
+endif
+ifeq ($(BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE),y)
+FFTW_CONF_OPTS = --enable-long-double
+endif
+ifeq ($(BR2_PACKAGE_FFTW_PRECISION_QUAD),y)
+FFTW_CONF_OPTS = --enable-quad-precision
+endif
$(eval $(autotools-package))
--
2.0.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH v3 1/1] fftw: add compile precision option
2015-03-14 15:29 [Buildroot] [PATCH v3 1/1] fftw: add compile precision option Gwenhael Goavec-Merou
@ 2015-03-14 16:05 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2015-03-14 16:05 UTC (permalink / raw)
To: buildroot
Dear Gwenhael Goavec-Merou,
On Sat, 14 Mar 2015 16:29:52 +0100, Gwenhael Goavec-Merou wrote:
> Changes v2 -> v3:
> * add depends instruction for quad-precision. This option needs to have a
> toolchain with libquadmath enabled (only x86, x86_64 and Itanium).
What did you do to fix long double precision? It also wasn't building,
see my review of your PATCH v2.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-14 16:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-14 15:29 [Buildroot] [PATCH v3 1/1] fftw: add compile precision option Gwenhael Goavec-Merou
2015-03-14 16:05 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox