[Buildroot] [PATCH v2 1/1] fftw: add compile precision option

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Fri Mar 13 22:25:21 UTC 2015


Dear Gwenhael Goavec-Merou,

On Fri, 13 Mar 2015 11:25:02 +0100, Gwenhael Goavec-Merou wrote:
> From: Gwenhael Goavec-Merou <gwenhael.goavec-merou at 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.

Unfortunately, the quad precision support doesn't build, because not
all toolchains have libquadmath in gcc:

checking for sinq in -lquadmath... no
configure: error: quad precision requires libquadmath for quad-precision trigonometric routines

And the long double precision support also doesn't build:

checking for cosl... (cached) no
configure: error: long-double precision requires long-double trigonometric routines

This was generated by the following defconfig:

BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-2014.11.tar.bz2"
BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_17=y
BR2_TOOLCHAIN_EXTERNAL_LARGEFILE=y
BR2_TOOLCHAIN_EXTERNAL_INET_IPV6=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_INIT_NONE=y
BR2_SYSTEM_BIN_SH_NONE=y
# BR2_PACKAGE_BUSYBOX is not set
BR2_PACKAGE_FFTW=y
BR2_PACKAGE_FFTW_PRECISION_SINGLE=y
# BR2_TARGET_ROOTFS_TAR is not set

Also, I see that FFTW has some NEON, Altivec, MMX and SSE/SSE2
optimizations. Maybe it would make sense to enable them when the CPU
supports them. However, beware that many of those optimizations only
work in "single precision" mode.

Note: if your only need is "single precision" mode, then I wouldn't
mind receiving a patch that allows enabling only this mode. People
interested in long double and quad precision can enable such options
later.

Best regards,

Thomas Petazzoni
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com



More information about the buildroot mailing list