From patchwork Sun Mar 15 16:15:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwenhael Goavec-Merou X-Patchwork-Id: 450317 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 9B31E1400B7 for ; Mon, 16 Mar 2015 03:13:37 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B89E09116B; Sun, 15 Mar 2015 16:13:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PRIwkHtu4K5h; Sun, 15 Mar 2015 16:13:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 8B8BD91494; Sun, 15 Mar 2015 16:13:35 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 656A41C2933 for ; Sun, 15 Mar 2015 16:13:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5FF839116B for ; Sun, 15 Mar 2015 16:13:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tr9BZVRP7HCj for ; Sun, 15 Mar 2015 16:13:32 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from smtp2-g21.free.fr (smtp2-g21.free.fr [212.27.42.2]) by whitealder.osuosl.org (Postfix) with ESMTPS id 541E5914BC for ; Sun, 15 Mar 2015 16:13:32 +0000 (UTC) Received: from x230.trabucayre.com (unknown [81.56.132.22]) by smtp2-g21.free.fr (Postfix) with ESMTP id 9E34D4B025B; Sun, 15 Mar 2015 17:12:21 +0100 (CET) From: Gwenhael Goavec-Merou To: buildroot@busybox.net Date: Sun, 15 Mar 2015 17:15:26 +0100 Message-Id: <1426436126-23486-1-git-send-email-gwenj@trabucayre.com> X-Mailer: git-send-email 2.0.5 Cc: Thomas Petazzoni , Gwenhael Goavec-Merou Subject: [Buildroot] [PATCH v4 1/1] fftw: add compile precision option X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Gwenhael Goavec-Merou 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 --- Changes v3 -> v4: * add depends instruction for long-double procession. This option needs to have a toolchain with long-double trigonometric routines. 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 | 38 ++++++++++++++++++++++++++++++++++++++ package/fftw/fftw.mk | 9 +++++++++ 2 files changed, 47 insertions(+) diff --git a/package/fftw/Config.in b/package/fftw/Config.in index 36f849f..7fa2c4c 100644 --- a/package/fftw/Config.in +++ b/package/fftw/Config.in @@ -9,3 +9,41 @@ 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" + # long-double precision require long-double trigonometric routines + depends on !(BR2_TOOLCHAIN_BUILDROOT_UCLIBC && \ + (BR2_arm || BR2_mips || BR2_mipsel)) + + 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))