Skip to contentSkip to conversation

package/fftw: prepare for splitting into multiple packages

PATCH New Gwenhael Goavec-Merou 4 participants 33 messages Jan 21, 2019 – Feb 6, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/17 package/fftw: prepare for splitting into multiple packages

From: Thomas Petazzoni <[email protected]>

From: Thomas Petazzoni <[email protected]>

In preparation for splitting into multiple packages, this commit changes the fftw.mk package to use FFTW_COMMON_CONF_OPTS, FFTW_COMMON_CONF_ENV and FFTW_COMMON_CFLAGS, which will be re-used by the soon-to-be-introduced per-precision packages.

---
 package/fftw/fftw.mk | 40 +++++++++++++++++++++-------------------
 1 file changed, 21 insertions(+), 19 deletions(-)
package/fftw/fftw.mk +21 -19
index b167a2f6f7..8b76b7c190 100644
@@ -12,38 +12,40 @@ FFTW_LICENSE_FILES = COPYING
 
 # fortran support only enables generation and installation of fortran sources
 ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y)
-FFTW_CONF_OPTS += --enable-fortran
-FFTW_CONF_ENV += FLIBS="-lgfortran -lm"
+FFTW_COMMON_CONF_OPTS += --enable-fortran
+FFTW_COMMON_CONF_ENV += FLIBS="-lgfortran -lm"
 else
-FFTW_CONF_OPTS += --disable-fortran
+FFTW_COMMON_CONF_OPTS += --disable-fortran
 endif
 
-FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_PRECISION_SINGLE),--enable,--disable)-single
-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)
+FFTW_COMMON_CFLAGS = $(TARGET_CFLAGS)
 ifeq ($(BR2_PACKAGE_FFTW_FAST),y)
-FFTW_CFLAGS += -O3 -ffast-math
+FFTW_COMMON_CFLAGS += -O3 -ffast-math
 endif
 
 # x86 optimisations
-FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_SSE),--enable,--disable)-sse
-FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_SSE2),--enable,--disable)-sse2
+FFTW_COMMON_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_SSE),--enable,--disable)-sse
+FFTW_COMMON_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_SSE2),--enable,--disable)-sse2
 
 # ARM optimisations
-FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_NEON),--enable,--disable)-neon
-FFTW_CFLAGS += $(if $(BR2_PACKAGE_FFTW_USE_NEON),-mfpu=neon)
+FFTW_COMMON_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_NEON),--enable,--disable)-neon
+FFTW_COMMON_CFLAGS += $(if $(BR2_PACKAGE_FFTW_USE_NEON),-mfpu=neon)
 
 # Generic optimisations
 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
-FFTW_CONF_OPTS += --enable-threads
-FFTW_CONF_OPTS += $(if $(BR2_GCC_ENABLE_OPENMP),--without,--with)-combined-threads
+FFTW_COMMON_CONF_OPTS += --enable-threads
+FFTW_COMMON_CONF_OPTS += $(if $(BR2_GCC_ENABLE_OPENMP),--without,--with)-combined-threads
 else
-FFTW_CONF_OPTS += --disable-threads
+FFTW_COMMON_CONF_OPTS += --disable-threads
 endif
-FFTW_CONF_OPTS += $(if $(BR2_GCC_ENABLE_OPENMP),--enable,--disable)-openmp
-
-FFTW_CONF_OPTS += CFLAGS="$(FFTW_CFLAGS)"
+FFTW_COMMON_CONF_OPTS += $(if $(BR2_GCC_ENABLE_OPENMP),--enable,--disable)-openmp
+
+FFTW_CONF_ENV = $(FFTW_COMMON_CONF_ENV)
+FFTW_CONF_OPTS += \
+	$(FFTW_COMMON_CONF_OPTS) \
+	$(if $(BR2_PACKAGE_FFTW_PRECISION_SINGLE),--enable,--disable)-single \
+	$(if $(BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE),--enable,--disable)-long-double \
+	$(if $(BR2_PACKAGE_FFTW_PRECISION_QUAD),--enable,--disable)-quad-precision \
+	CFLAGS="$(FFTW_COMMON_CFLAGS)"
 
 $(eval $(autotools-package))
Signature · 1 line
2.19.2
#1 lore raw

PATCH v4 2/17 package/fftw: break fftw-single into a dedicated package

From: Gwenhael Goavec-Merou <[email protected]>

fftw's library name depends on the precision option. Consequently, it's possible to install multiple flavor on the same target.

This patch breaks fftw single precision into a new package and:

- makes BR2_PACKAGE_FFTW_PRECISION_SINGLE select BR2_PACKAGE_FFTW_SINGLE to keep compatibility with packages that use BR2_PACKAGE_FFTW_PRECISION_SINGLE. This option will be removed in a follow-up commit;

- removes the BR2_PACKAGE_FFTW_USE_SSE and BR2_PACKAGE_FFTW_USE_NEON otpions since they are only used for single precision. The corresponding CPU-capability options are directly handled in the fftw-single package;

- makes fftw depend on fftw-single when this package is enabled.

[Yann/Thomas:
- Force --disable-single in FFTW_CONF_OPTS, just for the sake of clarity (fftw is no longer going to build the single variant)
- Use FFTW_SINGLE_DL_SUBDIR to avoid downloading fftw multiple times
- Minor reformatting tweaks in fftw-single.mk
- Do not deprecate BR2_PACKAGE_FFTW_PRECISION_SINGLE and instead make it select BR2_PACKAGE_FFTW_SINGLE, so that packages using BR2_PACKAGE_FFTW_PRECISION_SINGLE continue to work.]

---
 package/fftw/Config.in                    | 12 ++------
 package/fftw/fftw-single/Config.in        |  5 +++
 package/fftw/fftw-single/fftw-single.hash |  1 +
 package/fftw/fftw-single/fftw-single.mk   | 37 +++++++++++++++++++++++
 package/fftw/fftw.mk                      | 14 +++++----
 5 files changed, 54 insertions(+), 15 deletions(-)
package/fftw/Config.in +3 -9
index d51f8f3c51..f61784de50 100644
@@ -12,15 +12,9 @@ config BR2_PACKAGE_FFTW
 
 if BR2_PACKAGE_FFTW
 
-config BR2_PACKAGE_FFTW_USE_SSE
-	bool
-
 config BR2_PACKAGE_FFTW_USE_SSE2
 	bool
 
-config BR2_PACKAGE_FFTW_USE_NEON
-	bool
-
 choice
 	prompt "fftw precision"
 	default BR2_PACKAGE_FFTW_PRECISION_DOUBLE
@@ -29,9 +23,7 @@ choice
 
 config BR2_PACKAGE_FFTW_PRECISION_SINGLE
 	bool "single"
-	select BR2_PACKAGE_FFTW_USE_SSE if BR2_X86_CPU_HAS_SSE
-	select BR2_PACKAGE_FFTW_USE_SSE2 if BR2_X86_CPU_HAS_SSE2
-	select BR2_PACKAGE_FFTW_USE_NEON if BR2_ARM_CPU_HAS_NEON && !BR2_ARM_SOFT_FLOAT
+	select BR2_PACKAGE_FFTW_SINGLE
 	help
 	  Compile fftw in single precision, i.e. use 'float' for
 	  floating point type.
@@ -62,6 +54,8 @@ config BR2_PACKAGE_FFTW_PRECISION_QUAD
 
 endchoice
 
+source "package/fftw/fftw-single/Config.in"
+
 config BR2_PACKAGE_FFTW_FAST
 	bool "optimise for speed over accuracy"
 	help
package/fftw/fftw-single/Config.in new file +5 -0
new file mode 100644
index 0000000000..ff1486871d
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_FFTW_SINGLE
+	bool "fftw-single"
+	help
+	  Compile fftw in single precision, i.e. use 'float'
+	  for floating point type.
package/fftw/fftw-single/fftw-single.hash new file +1 -0
new file mode 120000
index 0000000000..3ee7ecb3ba
@@ -0,0 +1 @@
+../fftw.hash
\ No newline at end of file
package/fftw/fftw-single/fftw-single.mk new file +37 -0
new file mode 100644
index 0000000000..1e26ff7a38
@@ -0,0 +1,37 @@
+################################################################################
+#
+# fftw-single
+#
+################################################################################
+
+FFTW_SINGLE_VERSION = $(FFTW_VERSION)
+FFTW_SINGLE_SOURCE = fftw-$(FFTW_VERSION).tar.gz
+FFTW_SINGLE_SITE = $(FFTW_SITE)
+FFTW_SINGLE_DL_SUBDIR = fftw
+FFTW_SINGLE_INSTALL_STAGING = $(FFTW_INSTALL_STAGING)
+FFTW_SINGLE_LICENSE = $(FFTW_LICENSE)
+FFTW_SINGLE_LICENSE_FILES = $(FFTW_LICENSE_FILES)
+
+FFTW_SINGLE_CONF_ENV = $(FFTW_COMMON_CONF_ENV)
+
+FFTW_SINGLE_CONF_OPTS = \
+	$(FFTW_COMMON_CONF_OPTS) \
+	CFLAGS="$(FFTW_SINGLE_CFLAGS)" \
+	--enable-single
+
+FFTW_SINGLE_CFLAGS = $(FFTW_COMMON_CFLAGS)
+
+# x86 optimisations
+FFTW_SINGLE_CONF_OPTS += \
+	$(if $(BR2_X86_CPU_HAS_SSE),--enable,--disable)-sse \
+	$(if $(BR2_X86_CPU_HAS_SSE2),--enable,--disable)-sse2
+
+# ARM optimisations
+ifeq ($(BR2_ARM_CPU_HAS_NEON):$(BR2_ARM_SOFT_FLOAT),y:)
+FFTW_SINGLE_CONF_OPTS += --enable-neon
+FFTW_SINGLE_CFLAGS += -mfpu=neon
+else
+FFTW_SINGLE_CONF_OPTS += --disable-neon
+endif
+
+$(eval $(autotools-package))
package/fftw/fftw.mk +8 -6
index 8b76b7c190..b738928032 100644
@@ -10,6 +10,10 @@ FFTW_INSTALL_STAGING = YES
 FFTW_LICENSE = GPL-2.0+
 FFTW_LICENSE_FILES = COPYING
 
+ifeq ($(BR2_PACKAGE_FFTW_SINGLE),y)
+FFTW_DEPENDENCIES += fftw-single
+endif
+
 # fortran support only enables generation and installation of fortran sources
 ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y)
 FFTW_COMMON_CONF_OPTS += --enable-fortran
@@ -19,18 +23,14 @@ FFTW_COMMON_CONF_OPTS += --disable-fortran
 endif
 
 FFTW_COMMON_CFLAGS = $(TARGET_CFLAGS)
+
 ifeq ($(BR2_PACKAGE_FFTW_FAST),y)
 FFTW_COMMON_CFLAGS += -O3 -ffast-math
 endif
 
 # x86 optimisations
-FFTW_COMMON_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_SSE),--enable,--disable)-sse
 FFTW_COMMON_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_SSE2),--enable,--disable)-sse2
 
-# ARM optimisations
-FFTW_COMMON_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_NEON),--enable,--disable)-neon
-FFTW_COMMON_CFLAGS += $(if $(BR2_PACKAGE_FFTW_USE_NEON),-mfpu=neon)
-
 # Generic optimisations
 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
 FFTW_COMMON_CONF_OPTS += --enable-threads
@@ -43,9 +43,11 @@ FFTW_COMMON_CONF_OPTS += $(if $(BR2_GCC_ENABLE_OPENMP),--enable,--disable)-openm
 FFTW_CONF_ENV = $(FFTW_COMMON_CONF_ENV)
 FFTW_CONF_OPTS += \
 	$(FFTW_COMMON_CONF_OPTS) \
-	$(if $(BR2_PACKAGE_FFTW_PRECISION_SINGLE),--enable,--disable)-single \
+	--disable-single \
 	$(if $(BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE),--enable,--disable)-long-double \
 	$(if $(BR2_PACKAGE_FFTW_PRECISION_QUAD),--enable,--disable)-quad-precision \
 	CFLAGS="$(FFTW_COMMON_CFLAGS)"
 
 $(eval $(autotools-package))
+
+include $(sort $(wildcard package/fftw/*/*.mk))
Signature · 1 line
2.19.2
#2 lore raw

PATCH v4 3/17 package/fftw: break fftw-long-double into a dedicated package

From: Gwenhael Goavec-Merou <[email protected]>

fftw's library name depends on the precision option. Consequently, it's possible to install multiple flavor on the same target.

This patch breaks fftw long double precision into a new package and:

- makes BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE select BR2_PACKAGE_FFTW_LONG_DOUBLE to keep compatibility with packages that use BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE. This option will be removed in a follow-up commit;

- makes fftw depend on fftw-long-double when this package is enabled.

[Yann/Thomas:
- Force --disable-long-double in FFTW_CONF_OPTS, just for the sake of clarity (fftw is no longer going to build the long double variant)
- Use FFTW_LONG_DOUBLE_DL_SUBDIR to avoid downloading fftw multiple times
- Minor reformatting tweaks in fftw-long-double.mk
- Do not deprecate BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE and instead make it select BR2_PACKAGE_FFTW_LONG_DOUBLE, so that packages using BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE continue to work.]

---
 package/fftw/Config.in                        |  2 ++
 package/fftw/fftw-long-double/Config.in       |  8 +++++++
 .../fftw-long-double/fftw-long-double.hash    |  1 +
 .../fftw/fftw-long-double/fftw-long-double.mk | 22 +++++++++++++++++++
 package/fftw/fftw.mk                          |  6 ++++-
 5 files changed, 38 insertions(+), 1 deletion(-)
package/fftw/Config.in +2 -0
index f61784de50..4f37b43a60 100644
@@ -40,6 +40,7 @@ config BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE
 	# long-double precision require long-double trigonometric routines
 	depends on !(BR2_TOOLCHAIN_BUILDROOT_UCLIBC && \
 		(BR2_arm || BR2_mips || BR2_mipsel))
+	select BR2_PACKAGE_FFTW_LONG_DOUBLE
 	help
 	  Compile fftw in long double precision, i.e. use 'long double'
 	  for floating point type.
@@ -55,6 +56,7 @@ config BR2_PACKAGE_FFTW_PRECISION_QUAD
 endchoice
 
 source "package/fftw/fftw-single/Config.in"
+source "package/fftw/fftw-long-double/Config.in"
 
 config BR2_PACKAGE_FFTW_FAST
 	bool "optimise for speed over accuracy"
package/fftw/fftw-long-double/Config.in new file +8 -0
new file mode 100644
index 0000000000..3ee1762850
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_FFTW_LONG_DOUBLE
+	bool "fftw-long-double"
+	# long-double precision require long-double trigonometric routines
+	depends on !(BR2_TOOLCHAIN_USES_UCLIBC && \
+		(BR2_arm || BR2_mips || BR2_mipsel))
+	help
+	  Compile fftw in long double precision, i.e. use 'long double'
+	  for floating point type.
package/fftw/fftw-long-double/fftw-long-double.hash new file +1 -0
new file mode 120000
index 0000000000..3ee7ecb3ba
@@ -0,0 +1 @@
+../fftw.hash
\ No newline at end of file
package/fftw/fftw-long-double/fftw-long-double.mk new file +22 -0
new file mode 100644
index 0000000000..173050446c
@@ -0,0 +1,22 @@
+################################################################################
+#
+# fftw-long-double
+#
+################################################################################
+
+FFTW_LONG_DOUBLE_VERSION = $(FFTW_VERSION)
+FFTW_LONG_DOUBLE_SOURCE = fftw-$(FFTW_VERSION).tar.gz
+FFTW_LONG_DOUBLE_SITE = $(FFTW_SITE)
+FFTW_LONG_DOUBLE_DL_SUBDIR = fftw
+FFTW_LONG_DOUBLE_INSTALL_STAGING = $(FFTW_INSTALL_STAGING)
+FFTW_LONG_DOUBLE_LICENSE = $(FFTW_LICENSE)
+FFTW_LONG_DOUBLE_LICENSE_FILES = $(FFTW_LICENSE_FILES)
+
+FFTW_LONG_DOUBLE_CONF_ENV = $(FFTW_COMMON_CONF_ENV)
+
+FFTW_LONG_DOUBLE_CONF_OPTS = \
+	$(FFTW_COMMON_CONF_OPTS) \
+	CFLAGS="$(FFTW_COMMON_CFLAGS)" \
+	--enable-long-double
+
+$(eval $(autotools-package))
package/fftw/fftw.mk +5 -1
index b738928032..26137b9f7c 100644
@@ -10,6 +10,10 @@ FFTW_INSTALL_STAGING = YES
 FFTW_LICENSE = GPL-2.0+
 FFTW_LICENSE_FILES = COPYING
 
+ifeq ($(BR2_PACKAGE_FFTW_LONG_DOUBLE),y)
+FFTW_DEPENDENCIES += fftw-long-double
+endif
+
 ifeq ($(BR2_PACKAGE_FFTW_SINGLE),y)
 FFTW_DEPENDENCIES += fftw-single
 endif
@@ -44,7 +48,7 @@ FFTW_CONF_ENV = $(FFTW_COMMON_CONF_ENV)
 FFTW_CONF_OPTS += \
 	$(FFTW_COMMON_CONF_OPTS) \
 	--disable-single \
-	$(if $(BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE),--enable,--disable)-long-double \
+	--disable-long-double \
 	$(if $(BR2_PACKAGE_FFTW_PRECISION_QUAD),--enable,--disable)-quad-precision \
 	CFLAGS="$(FFTW_COMMON_CFLAGS)"
 
Signature · 1 line
2.19.2
#3 lore raw

PATCH v4 4/17 package/fftw: break fftw-quad into a dedicated package

From: Gwenhael Goavec-Merou <[email protected]>

fftw's library name depends on the precision option. Consequently, it's possible to install multiple flavor on the same target.

This patch breaks fftw quad precision into a new package and:

- makes BR2_PACKAGE_FFTW_PRECISION_QUAD select BR2_PACKAGE_FFTW_QUAD to keep compatibility with packages that use BR2_PACKAGE_FFTW_PRECISION_QUAD. This option will be removed in a follow-up commit;

- makes fftw depend on fftw-quad when this package is enabled.

[Yann/Thomas:
- Force --disable-quad in FFTW_CONF_OPTS, just for the sake of clarity (fftw is no longer going to build the quad variant)
- Use FFTW_QUAD_DL_SUBDIR to avoid downloading fftw multiple times
- Minor reformatting tweaks in fftw-quad.mk
- Do not deprecate BR2_PACKAGE_FFTW_PRECISION_QUAD and instead make it select BR2_PACKAGE_FFTW_QUAD, so that packages using BR2_PACKAGE_FFTW_PRECISION_QUAD continue to work.]

[Gwenhael/Yann]:
- (BR2_i386 || BR2_x86_64) -> BR2_TOOLCHAIN_HAS_LIBQUADMATH

---
 package/fftw/Config.in                |  2 ++
 package/fftw/fftw-quad/Config.in      |  7 +++++++
 package/fftw/fftw-quad/fftw-quad.hash |  1 +
 package/fftw/fftw-quad/fftw-quad.mk   | 22 ++++++++++++++++++++++
 package/fftw/fftw.mk                  |  6 +++++-
 5 files changed, 37 insertions(+), 1 deletion(-)
package/fftw/Config.in +2 -0
index 4f37b43a60..8699d9c350 100644
@@ -49,6 +49,7 @@ config BR2_PACKAGE_FFTW_PRECISION_QUAD
 	bool "quad"
 	# quad-precision needs to have a gcc with libquadmath
 	depends on (BR2_i386 || BR2_x86_64) && BR2_USE_WCHAR
+	select BR2_PACKAGE_FFTW_QUAD
 	help
 	  Compile fftw in quadruple precision, i.e. use '__float128' for
 	  floating point type.
@@ -57,6 +58,7 @@ endchoice
 
 source "package/fftw/fftw-single/Config.in"
 source "package/fftw/fftw-long-double/Config.in"
+source "package/fftw/fftw-quad/Config.in"
 
 config BR2_PACKAGE_FFTW_FAST
 	bool "optimise for speed over accuracy"
package/fftw/fftw-quad/Config.in new file +7 -0
new file mode 100644
index 0000000000..10d296df91
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_FFTW_QUAD
+	bool "fftw-quad"
+	# quad-precision needs to have a gcc with libquadmath
+	depends on BR2_TOOLCHAIN_HAS_LIBQUADMATH && BR2_USE_WCHAR
+	help
+	  Compile fftw in quadruple precision, i.e. use '__float128' for
+	  floating point type.
package/fftw/fftw-quad/fftw-quad.hash new file +1 -0
new file mode 120000
index 0000000000..3ee7ecb3ba
@@ -0,0 +1 @@
+../fftw.hash
\ No newline at end of file
package/fftw/fftw-quad/fftw-quad.mk new file +22 -0
new file mode 100644
index 0000000000..5ff79b1d46
@@ -0,0 +1,22 @@
+################################################################################
+#
+# fftw-quad
+#
+################################################################################
+
+FFTW_QUAD_VERSION = $(FFTW_VERSION)
+FFTW_QUAD_SOURCE = fftw-$(FFTW_VERSION).tar.gz
+FFTW_QUAD_SITE = $(FFTW_SITE)
+FFTW_QUAD_DL_SUBDIR = fftw
+FFTW_QUAD_INSTALL_STAGING = $(FFTW_INSTALL_STAGING)
+FFTW_QUAD_LICENSE = $(FFTW_LICENSE)
+FFTW_QUAD_LICENSE_FILES = $(FFTW_LICENSE_FILES)
+
+FFTW_QUAD_CONF_ENV = $(FFTW_COMMON_CONF_ENV)
+
+FFTW_QUAD_CONF_OPTS = \
+	$(FFTW_COMMON_CONF_OPTS) \
+	CFLAGS="$(FFTW_COMMON_CFLAGS)" \
+	--enable-quad-precision
+
+$(eval $(autotools-package))
package/fftw/fftw.mk +5 -1
index 26137b9f7c..ccec0e0f2d 100644
@@ -14,6 +14,10 @@ ifeq ($(BR2_PACKAGE_FFTW_LONG_DOUBLE),y)
 FFTW_DEPENDENCIES += fftw-long-double
 endif
 
+ifeq ($(BR2_PACKAGE_FFTW_QUAD),y)
+FFTW_DEPENDENCIES += fftw-quad
+endif
+
 ifeq ($(BR2_PACKAGE_FFTW_SINGLE),y)
 FFTW_DEPENDENCIES += fftw-single
 endif
@@ -49,7 +53,7 @@ FFTW_CONF_OPTS += \
 	$(FFTW_COMMON_CONF_OPTS) \
 	--disable-single \
 	--disable-long-double \
-	$(if $(BR2_PACKAGE_FFTW_PRECISION_QUAD),--enable,--disable)-quad-precision \
+	--disable-quad-precision \
 	CFLAGS="$(FFTW_COMMON_CFLAGS)"
 
 $(eval $(autotools-package))
Signature · 1 line
2.19.2
#4 lore raw

PATCH v4 5/17 package/fftw: break fftw-double into a dedicated package

From: Gwenhael Goavec-Merou <[email protected]>

fftw's library name depends on the precision option. Consequently, it's possible to install multiple flavor on the same target.

This patch breaks fftw double precision into a new package and:

- makes BR2_PACKAGE_FFTW_PRECISION_DOUBLE select BR2_PACKAGE_FFTW_DOUBLE to keep compatibility with packages that use BR2_PACKAGE_FFTW_PRECISION_DOUBLE. This option will be removed in a follow-up commit;
- removes BR2_PACKAGE_FFTW_USE_SSE2 since it is only used for single and double precision. The corresponding options are directly handled in fftw-double package;
- makes fftw depend on fftw-double when this package is enabled;
- turns fftw itself into a generic-package instead of an
autotools-package: it no longer builds anything and only allows to trigger the build of the appropriate fftw-* sub-packages, as a temporary compatibility mechanism.

[Yann/Thomas:
- Use FFTW_DOUBLE_DL_SUBDIR to avoid downloading fftw multiple times
- Minor reformatting tweaks in fftw-double.mk
- Drop from fftw.mk FFTW_CONF_ENV/FFTW_CONF_OPTS which are no longer used
- Make fftw a generic package so that its dependencies are built
- Do not deprecate BR2_PACKAGE_FFTW_PRECISION_DOUBLE and instead make it select BR2_PACKAGE_FFTW_DOUBLE, so that packages using BR2_PACKAGE_FFTW_PRECISION_QUAD continue to work.]

---
 package/fftw/Config.in                    |  6 ++----
 package/fftw/fftw-double/Config.in        |  5 +++++
 package/fftw/fftw-double/fftw-double.hash |  1 +
 package/fftw/fftw-double/fftw-double.mk   | 22 ++++++++++++++++++++++
 package/fftw/fftw.mk                      | 17 +++++------------
 5 files changed, 35 insertions(+), 16 deletions(-)
package/fftw/Config.in +2 -4
index 8699d9c350..ed87de1a70 100644
@@ -12,9 +12,6 @@ config BR2_PACKAGE_FFTW
 
 if BR2_PACKAGE_FFTW
 
-config BR2_PACKAGE_FFTW_USE_SSE2
-	bool
-
 choice
 	prompt "fftw precision"
 	default BR2_PACKAGE_FFTW_PRECISION_DOUBLE
@@ -30,7 +27,7 @@ config BR2_PACKAGE_FFTW_PRECISION_SINGLE
 
 config BR2_PACKAGE_FFTW_PRECISION_DOUBLE
 	bool "double"
-	select BR2_PACKAGE_FFTW_USE_SSE2 if BR2_X86_CPU_HAS_SSE2
+	select BR2_PACKAGE_FFTW_DOUBLE
 	help
 	  Compile fftw in double precision (the default), i.e. use
 	  'double' for floating point type.
@@ -57,6 +54,7 @@ config BR2_PACKAGE_FFTW_PRECISION_QUAD
 endchoice
 
 source "package/fftw/fftw-single/Config.in"
+source "package/fftw/fftw-double/Config.in"
 source "package/fftw/fftw-long-double/Config.in"
 source "package/fftw/fftw-quad/Config.in"
 
package/fftw/fftw-double/Config.in new file +5 -0
new file mode 100644
index 0000000000..cfcd1ef997
@@ -0,0 +1,5 @@
+config BR2_PACKAGE_FFTW_DOUBLE
+	bool "fftw-double"
+	help
+	  Compile fftw in double precision (the default), i.e. use
+	  'double' for floating point type.
package/fftw/fftw-double/fftw-double.hash new file +1 -0
new file mode 120000
index 0000000000..3ee7ecb3ba
@@ -0,0 +1 @@
+../fftw.hash
\ No newline at end of file
package/fftw/fftw-double/fftw-double.mk new file +22 -0
new file mode 100644
index 0000000000..4bacb26e56
@@ -0,0 +1,22 @@
+################################################################################
+#
+# fftw-double
+#
+################################################################################
+
+FFTW_DOUBLE_VERSION = $(FFTW_VERSION)
+FFTW_DOUBLE_SOURCE = fftw-$(FFTW_VERSION).tar.gz
+FFTW_DOUBLE_SITE = $(FFTW_SITE)
+FFTW_DOUBLE_DL_SUBDIR = fftw
+FFTW_DOUBLE_INSTALL_STAGING = $(FFTW_INSTALL_STAGING)
+FFTW_DOUBLE_LICENSE = $(FFTW_LICENSE)
+FFTW_DOUBLE_LICENSE_FILES = $(FFTW_LICENSE_FILES)
+
+FFTW_DOUBLE_CONF_ENV = $(FFTW_COMMON_CONF_ENV)
+
+FFTW_DOUBLE_CONF_OPTS = \
+	$(FFTW_COMMON_CONF_OPTS) \
+	CFLAGS="$(FFTW_COMMON_CFLAGS)" \
+	$(if $(BR2_X86_CPU_HAS_SSE2),--enable,--disable)-sse2
+
+$(eval $(autotools-package))
package/fftw/fftw.mk +5 -12
index ccec0e0f2d..862ad5edc0 100644
@@ -10,6 +10,10 @@ FFTW_INSTALL_STAGING = YES
 FFTW_LICENSE = GPL-2.0+
 FFTW_LICENSE_FILES = COPYING
 
+ifeq ($(BR2_PACKAGE_FFTW_DOUBLE),y)
+FFTW_DEPENDENCIES += fftw-double
+endif
+
 ifeq ($(BR2_PACKAGE_FFTW_LONG_DOUBLE),y)
 FFTW_DEPENDENCIES += fftw-long-double
 endif
@@ -36,9 +40,6 @@ ifeq ($(BR2_PACKAGE_FFTW_FAST),y)
 FFTW_COMMON_CFLAGS += -O3 -ffast-math
 endif
 
-# x86 optimisations
-FFTW_COMMON_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_SSE2),--enable,--disable)-sse2
-
 # Generic optimisations
 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
 FFTW_COMMON_CONF_OPTS += --enable-threads
@@ -48,14 +49,6 @@ FFTW_COMMON_CONF_OPTS += --disable-threads
 endif
 FFTW_COMMON_CONF_OPTS += $(if $(BR2_GCC_ENABLE_OPENMP),--enable,--disable)-openmp
 
-FFTW_CONF_ENV = $(FFTW_COMMON_CONF_ENV)
-FFTW_CONF_OPTS += \
-	$(FFTW_COMMON_CONF_OPTS) \
-	--disable-single \
-	--disable-long-double \
-	--disable-quad-precision \
-	CFLAGS="$(FFTW_COMMON_CFLAGS)"
-
-$(eval $(autotools-package))
+$(eval $(generic-package))
 
 include $(sort $(wildcard package/fftw/*/*.mk))
Signature · 1 line
2.19.2
#5 lore raw

PATCH v4 6/17 package/alsa-utils: use the new fftw-single package

From: Gwenhael Goavec-Merou <[email protected]>

---
 package/alsa-utils/alsa-utils.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/alsa-utils/alsa-utils.mk +1 -1
index 4ce4aace46..b5c36e0a46 100644
@@ -41,7 +41,7 @@ endif
 ifeq ($(BR2_PACKAGE_ALSA_UTILS_BAT),y)
 ALSA_UTILS_CONF_OPTS += --enable-bat
 # Analysis support requires fftw single precision
-ALSA_UTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_FFTW_PRECISION_SINGLE),fftw)
+ALSA_UTILS_DEPENDENCIES += $(if $(BR2_PACKAGE_FFTW_SINGLE),fftw-single)
 else
 ALSA_UTILS_CONF_OPTS += --disable-bat
 endif
Signature · 1 line
2.19.2
#6 lore raw

PATCH v4 7/17 package/aubio: use the new fftw-double and fftw-single packages

From: Gwenhael Goavec-Merou <[email protected]>

[Thomas: drop the condition on BR2_PACKAGE_FFTW]

---
Changes v3 -> v4:
* allows to build samplerate without fft support and ensure samplerate and double precision are not enabled in same time. (yann)

---
 package/aubio/aubio.mk | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
package/aubio/aubio.mk +6 -7
index b0cc8b899e..ba182d9bd7 100644
@@ -27,7 +27,7 @@ AUBIO_CONF_OPTS += --disable-sndfile
 endif
 
 # Could not compile aubio in double precision mode with libsamplerate
-ifeq ($(BR2_PACKAGE_LIBSAMPLERATE)$(BR2_PACKAGE_FFTW_PRECISION_SINGLE),yy)
+ifeq ($(BR2_PACKAGE_LIBSAMPLERATE):$(BR2_PACKAGE_FFTW_DOUBLE),y:)
 AUBIO_DEPENDENCIES += libsamplerate
 AUBIO_CONF_OPTS += --enable-samplerate
 else
@@ -41,15 +41,14 @@ else
 AUBIO_CONF_OPTS += --disable-jack
 endif
 
-ifeq ($(BR2_PACKAGE_FFTW),y)
-AUBIO_DEPENDENCIES += fftw
 # fftw3 require double otherwise it will look for fftw3f
-ifeq ($(BR2_PACKAGE_FFTW_PRECISION_DOUBLE),y)
+ifeq ($(BR2_PACKAGE_FFTW_DOUBLE),y)
 AUBIO_CONF_OPTS += --enable-fftw3 --enable-double
-else ifeq ($(BR2_PACKAGE_FFTW_PRECISION_SINGLE),y)
+AUBIO_DEPENDENCIES += fftw-double
+else ifeq ($(BR2_PACKAGE_FFTW_SINGLE),y)
 AUBIO_CONF_OPTS += --enable-fftw3f --disable-double
-endif
-else  # !BR2_PACKAGE_FFTW
+AUBIO_DEPENDENCIES += fftw-single
+else
 AUBIO_CONF_OPTS += --disable-fftw3
 endif
 
Signature · 1 line
2.19.2
#7 lore raw

PATCH v4 8/17 package/gnuradio: use the new fftw-single package

From: Gwenhael Goavec-Merou <[email protected]>

Thanks to the new fftw package organization, we can use a "select" instead of "depends on".

---
 package/gnuradio/Config.in   | 8 ++------
 package/gnuradio/gnuradio.mk | 2 +-
 2 files changed, 3 insertions(+), 7 deletions(-)
package/gnuradio/Config.in +2 -6
index 56957d59e4..533a49c81e 100644
@@ -78,11 +78,6 @@ config BR2_PACKAGE_GNURADIO_ZEROMQ
 	help
 	  zeromq communication support
 
-comment "gr-fft, -filter, -analog, -channels, -digital, -trellis, -pager, -qtgui depends fftw's single precision"
-	depends on !BR2_PACKAGE_FFTW_PRECISION_SINGLE
-
-if BR2_PACKAGE_FFTW_PRECISION_SINGLE
-
 config BR2_PACKAGE_GNURADIO_ANALOG
 	bool "gr-analog support"
 	select BR2_PACKAGE_GNURADIO_FILTER
@@ -103,6 +98,8 @@ config BR2_PACKAGE_GNURADIO_DIGITAL
 
 config BR2_PACKAGE_GNURADIO_FFT
 	bool "gr-fft support"
+	select BR2_PACKAGE_FFTW
+	select BR2_PACKAGE_FFTW_SINGLE
 	select BR2_PACKAGE_GNURADIO_BLOCKS
 	help
 	  FFT signal processing blocks
@@ -136,4 +133,3 @@ config BR2_PACKAGE_GNURADIO_TRELLIS
 	  Trellis coded modulation blocks
 
 endif
-endif
package/gnuradio/gnuradio.mk +1 -1
index ed537e3934..564ad8b2a4 100644
@@ -101,7 +101,7 @@ GNURADIO_CONF_OPTS += -DENABLE_GR_FEC=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_GNURADIO_FFT),y)
-GNURADIO_DEPENDENCIES += fftw
+GNURADIO_DEPENDENCIES += fftw-single
 GNURADIO_CONF_OPTS += -DENABLE_GR_FFT=ON
 else
 GNURADIO_CONF_OPTS += -DENABLE_GR_FFT=OFF
Signature · 1 line
2.19.2
#8 lore raw

PATCH v4 9/17 package/gqrx: remove unneeded fftw dependency

From: Gwenhael Goavec-Merou <[email protected]>

Thanks to the new fftw package organization, gnuradio already selects the appropriate fftw precision, and there is no need to propagate the "depends on BR2_PACKAGE_FFTW_PRECISION_SINGLE" that used to be present in the gnuradio package.

---
Changes v3 -> v4:
* use select instead of depends on for GNURadio and propagates dependencies.(yann)

---
 package/gqrx/Config.in | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
package/gqrx/Config.in +10 -7
index 1dc40c6d24..b55b5740ad 100644
@@ -1,22 +1,25 @@
-comment "gqrx needs a toolchain w/ C++, threads, wchar"
+comment "gqrx needs a toolchain w/ C++, threads, wchar, dynamic library"
+	depends on BR2_USE_MMU # gnuradio
+	depends on !BR2_PACKAGE_PYTHON3 # gnuradio
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \
-		!BR2_USE_WCHAR
+		!BR2_USE_WCHAR || !BR2_STATIC_LIBS
 
-comment "gqrx needs qt5, gnuradio, fftw's single precision"
-	depends on !BR2_PACKAGE_GNURADIO || !BR2_PACKAGE_FFTW_PRECISION_SINGLE || \
-		!BR2_PACKAGE_QT5
+comment "gqrx needs qt5"
+	depends on !BR2_PACKAGE_QT5
 
 config BR2_PACKAGE_GQRX
 	bool "gqrx"
-	depends on BR2_PACKAGE_FFTW_PRECISION_SINGLE # gnuradio
-	depends on BR2_PACKAGE_GNURADIO
 	depends on BR2_PACKAGE_QT5
+	depends on !BR2_PACKAGE_PYTHON3
 	depends on BR2_INSTALL_LIBSTDCPP # boost
+	depends on !BR2_STATIC_LIBS # gnuradio
+	depends on BR2_USE_MMU # gnuradio
 	depends on BR2_TOOLCHAIN_HAS_THREADS # boost
 	depends on BR2_USE_WCHAR # boost
 	select BR2_PACKAGE_BOOST
 	select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
 	select BR2_PACKAGE_BOOST_SYSTEM
+	select BR2_PACKAGE_GNURADIO
 	select BR2_PACKAGE_GNURADIO_ANALOG
 	select BR2_PACKAGE_GNURADIO_AUDIO
 	select BR2_PACKAGE_GNURADIO_BLOCKS
Signature · 1 line
2.19.2
#9 lore raw

PATCH v4 10/17 package/hackrf: use the new fftw-single package

From: Gwenhael Goavec-Merou <[email protected]>

---
 package/hackrf/Config.in | 6 ++----
 package/hackrf/hackrf.mk | 2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)
package/hackrf/Config.in +2 -4
index 4fa27699c4..b86790f2b0 100644
@@ -2,7 +2,8 @@ config BR2_PACKAGE_HACKRF
 	bool "hackrf"
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_TOOLCHAIN_HAS_THREADS
-	depends on BR2_PACKAGE_FFTW_PRECISION_SINGLE
+	select BR2_PACKAGE_FFTW
+	select BR2_PACKAGE_FFTW_SINGLE
 	select BR2_PACKAGE_LIBUSB
 	help
 	  Library and tools for accessing HackRF SDR boards.
@@ -11,6 +12,3 @@ config BR2_PACKAGE_HACKRF
 
 comment "hackrf needs a toolchain w/ threads, dynamic library"
 	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS
-
-comment "hackrf needs fftw's single precision"
-	depends on !BR2_PACKAGE_FFTW_PRECISION_SINGLE
package/hackrf/hackrf.mk +1 -1
index acab0be1d3..b83f6518e8 100644
@@ -9,7 +9,7 @@ HACKRF_SITE = https://github.com/mossmann/hackrf/releases/download/v$(HACKRF_VER
 HACKRF_SOURCE = hackrf-$(HACKRF_VERSION).tar.xz
 HACKRF_LICENSE = GPL-2.0+ BSD-3c
 HACKRF_LICENSE_FILES = COPYING
-HACKRF_DEPENDENCIES = fftw libusb
+HACKRF_DEPENDENCIES = fftw-single libusb
 HACKRF_SUBDIR = host
 HACKRF_INSTALL_STAGING = YES
 
Signature · 1 line
2.19.2
#10 lore raw

PATCH v4 11/17 package/httping: use the new fftw-double package

From: Gwenhael Goavec-Merou <[email protected]>

This patch add an explicitly dependency to fftw-double (the only compatible fftw's flavor) instead of default behavior where the package do assumption about the compatible version.

---
Changes v3 -> v4:
* improve commit message about fftw version. (Yann)

---
 package/httping/httping.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/httping/httping.mk +2 -2
index 955ee3131b..b3a625a8e1 100644
@@ -17,9 +17,9 @@ HTTPING_DEPENDENCIES = \
 	$(if $(BR2_PACKAGE_LIBICONV),libiconv) \
 	$(if $(BR2_PACKAGE_NCURSES_WCHAR),ncurses) \
 	$(if $(BR2_PACKAGE_OPENSSL),openssl) \
-	$(if $(BR2_PACKAGE_FFTW),fftw)
+	$(if $(BR2_PACKAGE_FFTW_DOUBLE),fftw-double)
 HTTPING_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) \
-	FW=$(if $(BR2_PACKAGE_FFTW),yes,no) \
+	FW=$(if $(BR2_PACKAGE_FFTW_DOUBLE),yes,no) \
 	NC=$(if $(BR2_PACKAGE_NCURSES_WCHAR),yes,no) \
 	SSL=$(if $(BR2_PACKAGE_OPENSSL),yes,no) \
 	TFO=$(if $(BR2_PACKAGE_HTTPING_TFO),yes,no) \
Signature · 1 line
2.19.2
#11 lore raw

PATCH v4 12/17 package/imagemagick: use the new fftw-double package

From: Gwenhael Goavec-Merou <[email protected]>

This patch add an explicitly dependency to fftw-double (the only compatible fftw's flavor) instead of default behavior where the package do assumption about the compatible version.

---
Changes v3 -> v4:
* improve commit message about fftw version. (Yann)

---
 package/imagemagick/imagemagick.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/imagemagick/imagemagick.mk +2 -2
index 72482267ce..7678980582 100644
@@ -113,11 +113,11 @@ else
 IMAGEMAGICK_CONF_OPTS += --without-lzma
 endif
 
-ifeq ($(BR2_PACKAGE_FFTW),y)
+ifeq ($(BR2_PACKAGE_FFTW_DOUBLE),y)
 # configure script misdetects these leading to build errors
 IMAGEMAGICK_CONF_ENV += ac_cv_func_creal=yes ac_cv_func_cimag=yes
 IMAGEMAGICK_CONF_OPTS += --with-fftw
-IMAGEMAGICK_DEPENDENCIES += fftw
+IMAGEMAGICK_DEPENDENCIES += fftw-double
 else
 IMAGEMAGICK_CONF_OPTS += --without-fftw
 endif
Signature · 1 line
2.19.2
#12 lore raw

PATCH v4 13/17 package/libvips: use the new fftw-double package

From: Gwenhael Goavec-Merou <[email protected]>

This patch add an explicitly dependency to fftw-double (the only compatible fftw's flavor) instead of default behavior where the package do assumption about the compatible version.

---
Changes v3 -> v4:
* improve commit message about fftw version. (Yann)

---
 package/libvips/libvips.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/libvips/libvips.mk +2 -2
index 8078e046d1..7622f32fbc 100644
@@ -68,9 +68,9 @@ else
 LIBVIPS_CONF_OPTS += --without-tiff
 endif
 
-ifeq ($(BR2_PACKAGE_FFTW),y)
+ifeq ($(BR2_PACKAGE_FFTW_DOUBLE),y)
 LIBVIPS_CONF_OPTS += --with-fftw
-LIBVIPS_DEPENDENCIES += fftw
+LIBVIPS_DEPENDENCIES += fftw-double
 else
 LIBVIPS_CONF_OPTS += --without-fftw
 endif
Signature · 1 line
2.19.2
#13 lore raw

PATCH v4 14/17 package/pulseaudio: use the new fftw-single package

From: Gwenhael Goavec-Merou <[email protected]>

This patch add an explicitly dependency to fftw-single (the only compatible fftw's flavor) instead of default behavior where the package do assumption about the compatible version.

---
Changes v3 -> v4:
* improve commit message about fftw version. (Yann)

---
 package/pulseaudio/pulseaudio.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/pulseaudio/pulseaudio.mk +1 -1
index d1c35654cf..c91af22935 100644
@@ -21,7 +21,7 @@ PULSEAUDIO_DEPENDENCIES = \
 	$(if $(BR2_PACKAGE_AVAHI_DAEMON),avahi) \
 	$(if $(BR2_PACKAGE_DBUS),dbus) \
 	$(if $(BR2_PACKAGE_OPENSSL),openssl) \
-	$(if $(BR2_PACKAGE_FFTW),fftw) \
+	$(if $(BR2_PACKAGE_FFTW_SINGLE),fftw-single) \
 	$(if $(BR2_PACKAGE_SYSTEMD),systemd)
 
 ifeq ($(BR2_PACKAGE_LIBSAMPLERATE),y)
Signature · 1 line
2.19.2
#14 lore raw

PATCH v4 15/17 package/liquid-dsp: use the new fftw-{single, double, long-double} packages

From: Gwenhael Goavec-Merou <[email protected]>

---
 package/liquid-dsp/liquid-dsp.mk | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
package/liquid-dsp/liquid-dsp.mk +6 -6
index db67893844..6aa27a5248 100644
@@ -30,9 +30,9 @@ LIQUID_DSP_CFLAGS += -ffast-math
 endif
 
 # use FFTW instead of built-in FFT
-ifeq ($(BR2_PACKAGE_FFTW_PRECISION_SINGLE),y)
+ifeq ($(BR2_PACKAGE_FFTW_SINGLE),y)
 LIQUID_DSP_LDFLAGS += -lfftw3f
-LIQUID_DSP_DEPENDENCIES += fftw
+LIQUID_DSP_DEPENDENCIES += fftw-single
 endif
 
 # disable altivec, it has build issues
@@ -40,14 +40,14 @@ ifeq ($(BR2_powerpc)$(BR2_powerpc64)$(BR2_powerpc64le),y)
 LIQUID_DSP_CONF_OPTS += --enable-simdoverride
 endif
 
-ifeq ($(BR2_PACKAGE_FFTW_PRECISION_DOUBLE),y)
+ifeq ($(BR2_PACKAGE_FFTW_DOUBLE),y)
 LIQUID_DSP_LDFLAGS += -lfftw3
-LIQUID_DSP_DEPENDENCIES += fftw
+LIQUID_DSP_DEPENDENCIES += fftw-double
 endif
 
-ifeq ($(BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE),y)
+ifeq ($(BR2_PACKAGE_FFTW_LONG_DOUBLE),y)
 LIQUID_DSP_LDFLAGS += -lfftw3l
-LIQUID_DSP_DEPENDENCIES += fftw
+LIQUID_DSP_DEPENDENCIES += fftw-long-double
 endif
 
 LIQUID_DSP_CONF_OPTS += \
Signature · 1 line
2.19.2
#15 lore raw

PATCH v4 16/17 package/fftw: remove as regular package

From: Thomas Petazzoni <[email protected]>

From: Thomas Petazzoni <[email protected]>

fftw is no longer a package: only fftw-single, fftw-double, fftw-long-double and fftw-quad are. fftw.mk only contains some common definitions that are used by the different fftw variants.

The old BR2_PACKAGE_FFTW_PRECISION_* options, which are no longer used anywhere, are moved to Config.in.legacy.

---
Changes v3 -> V4:
* when BR2_PACKAGE_FFTW is enabled without flavour, selects fftw-double by default. (Yann)
* suppress suppress two consecutive empty lines. (Yann)

---
 Config.in.legacy       | 35 +++++++++++++++++++++++++++++++++
 package/fftw/Config.in | 44 +++---------------------------------------
 package/fftw/fftw.mk   | 18 -----------------
 3 files changed, 38 insertions(+), 59 deletions(-)
Config.in.legacy +35 -0
index ef460752f3..b26a070759 100644
@@ -154,6 +154,41 @@ config BR2_PACKAGE_BOOST_SIGNALS
 	  was announced in 1.54. Users are encouraged to use Signals2
 	  instead.
 
+config BR2_PACKAGE_FFTW_PRECISION_SINGLE
+	bool "single"
+	select BR2_LEGACY
+	select BR2_PACKAGE_FFTW_SINGLE
+	help
+	  This option has been removed in favor of
+	  BR2_PACKAGE_FFTW_SINGLE.
+
+config BR2_PACKAGE_FFTW_PRECISION_DOUBLE
+	bool "double"
+	select BR2_LEGACY
+	select BR2_PACKAGE_FFTW_DOUBLE
+	help
+	  This option has been removed in favor of
+	  BR2_PACKAGE_FFTW_DOUBLE.
+
+config BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE
+	bool "long double"
+	depends on !(BR2_TOOLCHAIN_BUILDROOT_UCLIBC && \
+		(BR2_arm || BR2_mips || BR2_mipsel))
+	select BR2_LEGACY
+	select BR2_PACKAGE_FFTW_LONG_DOUBLE
+	help
+	  This option has been removed in favor of
+	  BR2_PACKAGE_FFTW_LONG_DOUBLE.
+
+config BR2_PACKAGE_FFTW_PRECISION_QUAD
+	bool "quad"
+	depends on (BR2_i386 || BR2_x86_64) && BR2_USE_WCHAR
+	select BR2_LEGACY
+	select BR2_PACKAGE_FFTW_QUAD
+	help
+	  This option has been removed in favor of
+	  BR2_PACKAGE_FFTW_QUAD.
+
 config BR2_PACKAGE_LUA_5_2
 	bool "Lua 5.2.x version removed"
 	select BR2_LEGACY
package/fftw/Config.in +3 -41

55 lines not on this page · raw message

package/fftw/fftw.mk +0 -18
index 862ad5edc0..bcfdb9c96a 100644
@@ -10,22 +10,6 @@ FFTW_INSTALL_STAGING = YES
 FFTW_LICENSE = GPL-2.0+
 FFTW_LICENSE_FILES = COPYING
 
-ifeq ($(BR2_PACKAGE_FFTW_DOUBLE),y)
-FFTW_DEPENDENCIES += fftw-double
-endif
-
-ifeq ($(BR2_PACKAGE_FFTW_LONG_DOUBLE),y)
-FFTW_DEPENDENCIES += fftw-long-double
-endif
-
-ifeq ($(BR2_PACKAGE_FFTW_QUAD),y)
-FFTW_DEPENDENCIES += fftw-quad
-endif
-
-ifeq ($(BR2_PACKAGE_FFTW_SINGLE),y)
-FFTW_DEPENDENCIES += fftw-single
-endif
-
 # fortran support only enables generation and installation of fortran sources
 ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y)
 FFTW_COMMON_CONF_OPTS += --enable-fortran
@@ -49,6 +33,4 @@ FFTW_COMMON_CONF_OPTS += --disable-threads
 endif
 FFTW_COMMON_CONF_OPTS += $(if $(BR2_GCC_ENABLE_OPENMP),--enable,--disable)-openmp
 
-$(eval $(generic-package))
-
 include $(sort $(wildcard package/fftw/*/*.mk))
Signature · 1 line
2.19.2
#16 lore raw

PATCH v4 17/17 package/liquid-dsp: drop support for fftw-double and fftw-long-double

From: Thomas Petazzoni <[email protected]>

From: Thomas Petazzoni <[email protected]>

liquid-dsp has the following code:
#if HAVE_FFTW3_H && !defined LIQUID_FFTOVERRIDE

#   include <fftw3.h>
#   define FFT_PLAN             fftwf_plan
#   define FFT_CREATE_PLAN      fftwf_plan_dft_1d
#   define FFT_DESTROY_PLAN     fftwf_destroy_plan
#   define FFT_EXECUTE          fftwf_execute
#   define FFT_DIR_FORWARD      FFTW_FORWARD
#   define FFT_DIR_BACKWARD     FFTW_BACKWARD
#   define FFT_METHOD           FFTW_ESTIMATE
#else
#   define FFT_PLAN             fftplan
#   define FFT_CREATE_PLAN      fft_create_plan
#   define FFT_DESTROY_PLAN     fft_destroy_plan
#   define FFT_EXECUTE          fft_execute
#   define FFT_DIR_FORWARD      LIQUID_FFT_FORWARD
#   define FFT_DIR_BACKWARD     LIQUID_FFT_BACKWARD
#   define FFT_METHOD           0

#endif

So, if it uses the external fftw library, it can only use the fftwf variant, i.e the fftw-single variant. Otherwise, it uses its internal FFT library.

There is no way for liquid-dsp to use fftw-double or fftw-long-double.

---
 package/liquid-dsp/liquid-dsp.mk | 10 ----------
 1 file changed, 10 deletions(-)
package/liquid-dsp/liquid-dsp.mk +0 -10
index 6aa27a5248..64c403e87f 100644
@@ -40,16 +40,6 @@ ifeq ($(BR2_powerpc)$(BR2_powerpc64)$(BR2_powerpc64le),y)
 LIQUID_DSP_CONF_OPTS += --enable-simdoverride
 endif
 
-ifeq ($(BR2_PACKAGE_FFTW_DOUBLE),y)
-LIQUID_DSP_LDFLAGS += -lfftw3
-LIQUID_DSP_DEPENDENCIES += fftw-double
-endif
-
-ifeq ($(BR2_PACKAGE_FFTW_LONG_DOUBLE),y)
-LIQUID_DSP_LDFLAGS += -lfftw3l
-LIQUID_DSP_DEPENDENCIES += fftw-long-double
-endif
-
 LIQUID_DSP_CONF_OPTS += \
 	CFLAGS="$(LIQUID_DSP_CFLAGS)" \
 	LDFLAGS="$(LIQUID_DSP_LDFLAGS)"
Signature · 1 line
2.19.2
#17 lore raw

PATCH v4 17/17 package/liquid-dsp: drop support for fftw-double and fftw-long-double

Hello,

Quoted 28 lines · On Mon, 21 Jan 2019 14:51:11 +0100 Gwenhael Goavec-Merou…

From: Thomas Petazzoni <[email protected]>

From: Thomas Petazzoni <[email protected]>

liquid-dsp has the following code:
#if HAVE_FFTW3_H && !defined LIQUID_FFTOVERRIDE

#   include <fftw3.h>
#   define FFT_PLAN             fftwf_plan
#   define FFT_CREATE_PLAN      fftwf_plan_dft_1d
#   define FFT_DESTROY_PLAN     fftwf_destroy_plan
#   define FFT_EXECUTE          fftwf_execute
#   define FFT_DIR_FORWARD      FFTW_FORWARD
#   define FFT_DIR_BACKWARD     FFTW_BACKWARD
#   define FFT_METHOD           FFTW_ESTIMATE
#else
#   define FFT_PLAN             fftplan
#   define FFT_CREATE_PLAN      fft_create_plan
#   define FFT_DESTROY_PLAN     fft_destroy_plan
#   define FFT_EXECUTE          fft_execute
#   define FFT_DIR_FORWARD      LIQUID_FFT_FORWARD
#   define FFT_DIR_BACKWARD     LIQUID_FFT_BACKWARD
#   define FFT_METHOD           0

#endif

So, if it uses the external fftw library, it can only use the fftwf variant, i.e the fftw-single variant. Otherwise, it uses its internal FFT library.

Quoted 7 lines

There is no way for liquid-dsp to use fftw-double or fftw-long-double.

---
 package/liquid-dsp/liquid-dsp.mk | 10 ----------
 1 file changed, 10 deletions(-)

Applied to master, thanks. I have applied *before* all other patches, because it's really a preparation fix that is useful independently from the rest of the FFTW rework.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#18 lore raw

PATCH v4 17/17 package/liquid-dsp: drop support for fftw-double and fftw-long-double

Hi Thomas,

Quoted 39 lines · Thomas Petazzoni
Quoted 28 lines · On Mon, 21 Jan 2019 14:51:11 +0100 Gwenhael Goavec-Merou…

From: Thomas Petazzoni <[email protected]>

From: Thomas Petazzoni <[email protected]>

liquid-dsp has the following code:
#if HAVE_FFTW3_H && !defined LIQUID_FFTOVERRIDE

#   include <fftw3.h>
#   define FFT_PLAN             fftwf_plan
#   define FFT_CREATE_PLAN      fftwf_plan_dft_1d
#   define FFT_DESTROY_PLAN     fftwf_destroy_plan
#   define FFT_EXECUTE          fftwf_execute
#   define FFT_DIR_FORWARD      FFTW_FORWARD
#   define FFT_DIR_BACKWARD     FFTW_BACKWARD
#   define FFT_METHOD           FFTW_ESTIMATE
#else
#   define FFT_PLAN             fftplan
#   define FFT_CREATE_PLAN      fft_create_plan
#   define FFT_DESTROY_PLAN     fft_destroy_plan
#   define FFT_EXECUTE          fft_execute
#   define FFT_DIR_FORWARD      LIQUID_FFT_FORWARD
#   define FFT_DIR_BACKWARD     LIQUID_FFT_BACKWARD
#   define FFT_METHOD           0

#endif

So, if it uses the external fftw library, it can only use the fftwf variant, i.e the fftw-single variant. Otherwise, it uses its internal FFT library.

Quoted 7 lines

There is no way for liquid-dsp to use fftw-double or fftw-long-double.

---
 package/liquid-dsp/liquid-dsp.mk | 10 ----------
 1 file changed, 10 deletions(-)
Quoted 3 lines

Applied to master, thanks. I have applied *before* all other patches, because it's really a preparation fix that is useful independently from the rest of the FFTW rework.

Unfortunately the '#' prefixed lines in the commit log were dropped again.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#19 lore raw

PATCH v4 17/17 package/liquid-dsp: drop support for fftw-double and fftw-long-double

Hello,

Quoted 5 lines · On Wed, 6 Feb 2019 07:40:24 +0200 Baruch Siach <[email protected]> wrote:
Quoted 3 lines

Applied to master, thanks. I have applied *before* all other patches, because it's really a preparation fix that is useful independently from the rest of the FFTW rework.

Unfortunately the '#' prefixed lines in the commit log were dropped again.

Yeah, Yann pointed this to me as well. Sadly now it's committed and pushed, so it's too late. Oh well.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#20 lore raw

PATCH v4 16/17 package/fftw: remove as regular package

In reply to Gwenhael Goavec-Merou

Gwenhael, All,

On 2019-01-21 14:51 +0100, Gwenhael Goavec-Merou spake thusly:

Quoted 11 lines

From: Thomas Petazzoni <[email protected]>

From: Thomas Petazzoni <[email protected]>

fftw is no longer a package: only fftw-single, fftw-double, fftw-long-double and fftw-quad are. fftw.mk only contains some common definitions that are used by the different fftw variants.

The old BR2_PACKAGE_FFTW_PRECISION_* options, which are no longer used anywhere, are moved to Config.in.legacy.

Quoted 7 lines

---
Changes v3 -> V4:
* when BR2_PACKAGE_FFTW is enabled without flavour, selects fftw-double by default. (Yann)
* suppress suppress two consecutive empty lines. (Yann)

:-)

[--SNIP--]

Quoted 13 lines
package/fftw/fftw.mk +0 -5
index 862ad5edc0..bcfdb9c96a 100644
@@ -10,22 +10,6 @@ FFTW_INSTALL_STAGING = YES
 FFTW_LICENSE = GPL-2.0+
 FFTW_LICENSE_FILES = COPYING
 
-ifeq ($(BR2_PACKAGE_FFTW_DOUBLE),y)
-FFTW_DEPENDENCIES += fftw-double
-endif
-
-ifeq ($(BR2_PACKAGE_FFTW_LONG_DOUBLE),y)

package/fftw/fftw.mk FFTW_INSTALL_STAGING = YES · line 27

Quoted 10 lines
package/fftw/fftw.mk +0 -10
-FFTW_DEPENDENCIES += fftw-long-double
-endif
-
-ifeq ($(BR2_PACKAGE_FFTW_QUAD),y)
-FFTW_DEPENDENCIES += fftw-quad
-endif
-
-ifeq ($(BR2_PACKAGE_FFTW_SINGLE),y)
-FFTW_DEPENDENCIES += fftw-single
-endif

Actually, I think these dependencies should stay. This would allow a package that needs any fftw variant to just select BR2_PACKAGE_FFTW and add FOO_DEPENDENCIES = fftw.

Regards,
Yann E. MORIN.

Quoted 13 lines
package/fftw/fftw.mk +0 -2
 # fortran support only enables generation and installation of fortran sources
 ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y)
 FFTW_COMMON_CONF_OPTS += --enable-fortran
@@ -49,6 +33,4 @@ FFTW_COMMON_CONF_OPTS += --disable-threads
 endif
 FFTW_COMMON_CONF_OPTS += $(if $(BR2_GCC_ENABLE_OPENMP),--enable,--disable)-openmp
 
-$(eval $(generic-package))
-
 include $(sort $(wildcard package/fftw/*/*.mk))
Signature · 1 line
2.19.2
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#21 lore raw

PATCH v4 16/17 package/fftw: remove as regular package

Hello,

Quoted 11 lines · On Sat, 2 Feb 2019 18:16:41 +0100 "Yann E. MORIN" <[email protected]>…
Quoted 11 lines
package/fftw/fftw.mk +0 -11
-ifeq ($(BR2_PACKAGE_FFTW_DOUBLE),y)
-FFTW_DEPENDENCIES += fftw-double
-endif
-
-ifeq ($(BR2_PACKAGE_FFTW_LONG_DOUBLE),y)
-FFTW_DEPENDENCIES += fftw-long-double
-endif
-
-ifeq ($(BR2_PACKAGE_FFTW_QUAD),y)
-FFTW_DEPENDENCIES += fftw-quad
-endif
Quoted 8 lines

package/fftw/fftw.mk FFTW_INSTALL_STAGING = YES · line 27

Quoted 4 lines
package/fftw/fftw.mk +0 -4
-
-ifeq ($(BR2_PACKAGE_FFTW_SINGLE),y)
-FFTW_DEPENDENCIES += fftw-single
-endif  

Actually, I think these dependencies should stay. This would allow a package that needs any fftw variant to just select BR2_PACKAGE_FFTW and add FOO_DEPENDENCIES = fftw.

As far as I know, we don't have any such package in the tree today, so that would be a bit of dead code.

In addition, I believe such a situation is pretty unlikely to happen. Those 4 variants are separate libraries with different filenames, and the functions provided by those libraries are different. So it's pretty unlikely that a package will be able to use "any fftw variant". Should that happen one day, it will always be time to revisit this.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#22 lore raw

PATCH v4 16/17 package/fftw: remove as regular package

In reply to Gwenhael Goavec-Merou

Gwenhael, All

On 2019-01-21 14:51 +0100, Gwenhael Goavec-Merou spake thusly:

Quoted 11 lines

From: Thomas Petazzoni <[email protected]>

fftw is no longer a package: only fftw-single, fftw-double, fftw-long-double and fftw-quad are. fftw.mk only contains some common definitions that are used by the different fftw variants.

The old BR2_PACKAGE_FFTW_PRECISION_* options, which are no longer used anywhere, are moved to Config.in.legacy.

[--SNIP--]

package/fftw/Config.in line 5

Quoted 10 lines
package/fftw/Config.in +3 -0
index ed87de1a70..89d99c5f9d 100644
@@ -1,5 +1,8 @@
 config BR2_PACKAGE_FFTW
 	bool "fftw"
+	select BR2_PACKAGE_FFTW_DOUBLE if !BR2_PACKAGE_FFTW_SINGLE \
+		&& !BR2_PACKAGE_FFTW_LONG_DOUBLE && !BR2_PACKAGE_FFTW_QUAD
+

Spurious empty line here.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#23 lore raw

PATCH v4 15/17 package/liquid-dsp: use the new fftw-{single, double, long-double} packages

In reply to Gwenhael Goavec-Merou

Gwenhael, All,

On 2019-01-21 14:51 +0100, Gwenhael Goavec-Merou spake thusly:

Quoted 4 lines

From: Gwenhael Goavec-Merou <[email protected]>

I still believe this change to be incorrect, since liquiddsp only really supports fftw-single, as patch 17 states.

So, at the very least, I believe tpatch 17 should be squashed into this one, and an even better solution would be to actually fix the package in a previous patch, as I said in my previous review.

Regards,
Yann E. MORIN.

Quoted 42 lines
---
 package/liquid-dsp/liquid-dsp.mk | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
package/liquid-dsp/liquid-dsp.mk +6 -6
index db67893844..6aa27a5248 100644
@@ -30,9 +30,9 @@ LIQUID_DSP_CFLAGS += -ffast-math
 endif
 
 # use FFTW instead of built-in FFT
-ifeq ($(BR2_PACKAGE_FFTW_PRECISION_SINGLE),y)
+ifeq ($(BR2_PACKAGE_FFTW_SINGLE),y)
 LIQUID_DSP_LDFLAGS += -lfftw3f
-LIQUID_DSP_DEPENDENCIES += fftw
+LIQUID_DSP_DEPENDENCIES += fftw-single
 endif
 
 # disable altivec, it has build issues
@@ -40,14 +40,14 @@ ifeq ($(BR2_powerpc)$(BR2_powerpc64)$(BR2_powerpc64le),y)
 LIQUID_DSP_CONF_OPTS += --enable-simdoverride
 endif
 
-ifeq ($(BR2_PACKAGE_FFTW_PRECISION_DOUBLE),y)
+ifeq ($(BR2_PACKAGE_FFTW_DOUBLE),y)
 LIQUID_DSP_LDFLAGS += -lfftw3
-LIQUID_DSP_DEPENDENCIES += fftw
+LIQUID_DSP_DEPENDENCIES += fftw-double
 endif
 
-ifeq ($(BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE),y)
+ifeq ($(BR2_PACKAGE_FFTW_LONG_DOUBLE),y)
 LIQUID_DSP_LDFLAGS += -lfftw3l
-LIQUID_DSP_DEPENDENCIES += fftw
+LIQUID_DSP_DEPENDENCIES += fftw-long-double
 endif
 
 LIQUID_DSP_CONF_OPTS += \
Signature · 1 line
2.19.2
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#24 lore raw

PATCH v4 14/17 package/pulseaudio: use the new fftw-single package

In reply to Gwenhael Goavec-Merou

Gwenhael, All,

On 2019-01-21 14:51 +0100, Gwenhael Goavec-Merou spake thusly:

Quoted 8 lines

From: Gwenhael Goavec-Merou <[email protected]>

This patch add an explicitly dependency to fftw-single (the only compatible fftw's flavor) instead of default behavior where the package do assumption about the compatible version.

Regards,
Yann E. MORIN.

Quoted 23 lines

---
Changes v3 -> v4:
* improve commit message about fftw version. (Yann)

---
 package/pulseaudio/pulseaudio.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/pulseaudio/pulseaudio.mk +1 -1
index d1c35654cf..c91af22935 100644
@@ -21,7 +21,7 @@ PULSEAUDIO_DEPENDENCIES = \
 	$(if $(BR2_PACKAGE_AVAHI_DAEMON),avahi) \
 	$(if $(BR2_PACKAGE_DBUS),dbus) \
 	$(if $(BR2_PACKAGE_OPENSSL),openssl) \
-	$(if $(BR2_PACKAGE_FFTW),fftw) \
+	$(if $(BR2_PACKAGE_FFTW_SINGLE),fftw-single) \
 	$(if $(BR2_PACKAGE_SYSTEMD),systemd)
 
 ifeq ($(BR2_PACKAGE_LIBSAMPLERATE),y)
Signature · 1 line
2.19.2
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#25 lore raw

PATCH v4 13/17 package/libvips: use the new fftw-double package

In reply to Gwenhael Goavec-Merou

Gwenhael, All,

On 2019-01-21 14:51 +0100, Gwenhael Goavec-Merou spake thusly:

Quoted 8 lines

From: Gwenhael Goavec-Merou <[email protected]>

This patch add an explicitly dependency to fftw-double (the only compatible fftw's flavor) instead of default behavior where the package do assumption about the compatible version.

Regards,
Yann E. MORIN.

Quoted 26 lines

---
Changes v3 -> v4:
* improve commit message about fftw version. (Yann)

---
 package/libvips/libvips.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/libvips/libvips.mk +2 -2
index 8078e046d1..7622f32fbc 100644
@@ -68,9 +68,9 @@ else
 LIBVIPS_CONF_OPTS += --without-tiff
 endif
 
-ifeq ($(BR2_PACKAGE_FFTW),y)
+ifeq ($(BR2_PACKAGE_FFTW_DOUBLE),y)
 LIBVIPS_CONF_OPTS += --with-fftw
-LIBVIPS_DEPENDENCIES += fftw
+LIBVIPS_DEPENDENCIES += fftw-double
 else
 LIBVIPS_CONF_OPTS += --without-fftw
 endif
Signature · 1 line
2.19.2
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#26 lore raw

PATCH v4 12/17 package/imagemagick: use the new fftw-double package

In reply to Gwenhael Goavec-Merou

Gwenhael, All,

On 2019-01-21 14:51 +0100, Gwenhael Goavec-Merou spake thusly:

Quoted 8 lines

From: Gwenhael Goavec-Merou <[email protected]>

This patch add an explicitly dependency to fftw-double (the only compatible fftw's flavor) instead of default behavior where the package do assumption about the compatible version.

Regards,
Yann E. MORIN.

Quoted 28 lines

---
Changes v3 -> v4:
* improve commit message about fftw version. (Yann)

---
 package/imagemagick/imagemagick.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/imagemagick/imagemagick.mk +2 -2
index 72482267ce..7678980582 100644
@@ -113,11 +113,11 @@ else
 IMAGEMAGICK_CONF_OPTS += --without-lzma
 endif
 
-ifeq ($(BR2_PACKAGE_FFTW),y)
+ifeq ($(BR2_PACKAGE_FFTW_DOUBLE),y)
 # configure script misdetects these leading to build errors
 IMAGEMAGICK_CONF_ENV += ac_cv_func_creal=yes ac_cv_func_cimag=yes
 IMAGEMAGICK_CONF_OPTS += --with-fftw
-IMAGEMAGICK_DEPENDENCIES += fftw
+IMAGEMAGICK_DEPENDENCIES += fftw-double
 else
 IMAGEMAGICK_CONF_OPTS += --without-fftw
 endif
Signature · 1 line
2.19.2
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#27 lore raw

PATCH v4 11/17 package/httping: use the new fftw-double package

In reply to Gwenhael Goavec-Merou

Gwenhael, All,

On 2019-01-21 14:51 +0100, Gwenhael Goavec-Merou spake thusly:

Quoted 8 lines

From: Gwenhael Goavec-Merou <[email protected]>

This patch add an explicitly dependency to fftw-double (the only compatible fftw's flavor) instead of default behavior where the package do assumption about the compatible version.

Regards,
Yann E. MORIN.

Quoted 26 lines

---
Changes v3 -> v4:
* improve commit message about fftw version. (Yann)

---
 package/httping/httping.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/httping/httping.mk +2 -2
index 955ee3131b..b3a625a8e1 100644
@@ -17,9 +17,9 @@ HTTPING_DEPENDENCIES = \
 	$(if $(BR2_PACKAGE_LIBICONV),libiconv) \
 	$(if $(BR2_PACKAGE_NCURSES_WCHAR),ncurses) \
 	$(if $(BR2_PACKAGE_OPENSSL),openssl) \
-	$(if $(BR2_PACKAGE_FFTW),fftw)
+	$(if $(BR2_PACKAGE_FFTW_DOUBLE),fftw-double)
 HTTPING_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) \
-	FW=$(if $(BR2_PACKAGE_FFTW),yes,no) \
+	FW=$(if $(BR2_PACKAGE_FFTW_DOUBLE),yes,no) \
 	NC=$(if $(BR2_PACKAGE_NCURSES_WCHAR),yes,no) \
 	SSL=$(if $(BR2_PACKAGE_OPENSSL),yes,no) \
 	TFO=$(if $(BR2_PACKAGE_HTTPING_TFO),yes,no) \
Signature · 1 line
2.19.2
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#28 lore raw

PATCH v4 9/17 package/gqrx: remove unneeded fftw dependency

In reply to Gwenhael Goavec-Merou

Gwenhael, All,

On 2019-01-21 14:51 +0100, Gwenhael Goavec-Merou spake thusly:

Quoted 7 lines

From: Gwenhael Goavec-Merou <[email protected]>

Thanks to the new fftw package organization, gnuradio already selects the appropriate fftw precision, and there is no need to propagate the "depends on BR2_PACKAGE_FFTW_PRECISION_SINGLE" that used to be present in the gnuradio package.

Quoted 6 lines

---
Changes v3 -> v4:
* use select instead of depends on for GNURadio and propagates dependencies.(yann)

[--SNIP--]

package/gqrx/Config.in line 16

Quoted 9 lines

config BR2_PACKAGE_GQRX

package/gqrx/Config.in +3 -2
 	bool "gqrx"
-	depends on BR2_PACKAGE_FFTW_PRECISION_SINGLE # gnuradio
-	depends on BR2_PACKAGE_GNURADIO
 	depends on BR2_PACKAGE_QT5
+	depends on !BR2_PACKAGE_PYTHON3
 	depends on BR2_INSTALL_LIBSTDCPP # boost
+	depends on !BR2_STATIC_LIBS # gnuradio
+	depends on BR2_USE_MMU # gnuradio

We're now trying to list dependencies in a consistent order, with architecture dependencies first, then toolchain depes, then package deps. So, dependencies on MMU should go before first, then !static libs, then libstdcpp, then packages:

https://buildroot.org/downloads/manual/manual.html#_config_files

Otherwise:

Regards,
Yann E. MORIN.

Quoted 12 lines
package/gqrx/Config.in +1 -0
 	depends on BR2_TOOLCHAIN_HAS_THREADS # boost
 	depends on BR2_USE_WCHAR # boost
 	select BR2_PACKAGE_BOOST
 	select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
 	select BR2_PACKAGE_BOOST_SYSTEM
+	select BR2_PACKAGE_GNURADIO
 	select BR2_PACKAGE_GNURADIO_ANALOG
 	select BR2_PACKAGE_GNURADIO_AUDIO
 	select BR2_PACKAGE_GNURADIO_BLOCKS
Signature · 1 line
2.19.2
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#29 lore raw

PATCH v4 8/17 package/gnuradio: use the new fftw-single package

In reply to Gwenhael Goavec-Merou

Gwenhael, All,

On 2019-01-21 14:51 +0100, Gwenhael Goavec-Merou spake thusly:

Quoted 7 lines

From: Gwenhael Goavec-Merou <[email protected]>

Thanks to the new fftw package organization, we can use a "select" instead of "depends on".

(I could turn my head I say so to you, but then it would be less fun!)

Regards,
Yann E. MORIN.

Quoted 51 lines
---
 package/gnuradio/Config.in   | 8 ++------
 package/gnuradio/gnuradio.mk | 2 +-
 2 files changed, 3 insertions(+), 7 deletions(-)
package/gnuradio/Config.in +2 -6
index 56957d59e4..533a49c81e 100644
@@ -78,11 +78,6 @@ config BR2_PACKAGE_GNURADIO_ZEROMQ
 	help
 	  zeromq communication support
 
-comment "gr-fft, -filter, -analog, -channels, -digital, -trellis, -pager, -qtgui depends fftw's single precision"
-	depends on !BR2_PACKAGE_FFTW_PRECISION_SINGLE
-
-if BR2_PACKAGE_FFTW_PRECISION_SINGLE
-
 config BR2_PACKAGE_GNURADIO_ANALOG
 	bool "gr-analog support"
 	select BR2_PACKAGE_GNURADIO_FILTER
@@ -103,6 +98,8 @@ config BR2_PACKAGE_GNURADIO_DIGITAL
 
 config BR2_PACKAGE_GNURADIO_FFT
 	bool "gr-fft support"
+	select BR2_PACKAGE_FFTW
+	select BR2_PACKAGE_FFTW_SINGLE
 	select BR2_PACKAGE_GNURADIO_BLOCKS
 	help
 	  FFT signal processing blocks
@@ -136,4 +133,3 @@ config BR2_PACKAGE_GNURADIO_TRELLIS
 	  Trellis coded modulation blocks
 
 endif
-endif
package/gnuradio/gnuradio.mk +1 -1
index ed537e3934..564ad8b2a4 100644
@@ -101,7 +101,7 @@ GNURADIO_CONF_OPTS += -DENABLE_GR_FEC=OFF
 endif
 
 ifeq ($(BR2_PACKAGE_GNURADIO_FFT),y)
-GNURADIO_DEPENDENCIES += fftw
+GNURADIO_DEPENDENCIES += fftw-single
 GNURADIO_CONF_OPTS += -DENABLE_GR_FFT=ON
 else
 GNURADIO_CONF_OPTS += -DENABLE_GR_FFT=OFF
Signature · 1 line
2.19.2
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#30 lore raw

PATCH v4 7/17 package/aubio: use the new fftw-double and fftw-single packages

In reply to Gwenhael Goavec-Merou

Gwenhael, All,

On 2019-01-21 14:51 +0100, Gwenhael Goavec-Merou spake thusly:

Quoted 36 lines

From: Gwenhael Goavec-Merou <[email protected]>

[Thomas: drop the condition on BR2_PACKAGE_FFTW]

---
Changes v3 -> v4:
* allows to build samplerate without fft support and ensure samplerate and double precision are not enabled in same time. (yann)

---
 package/aubio/aubio.mk | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
package/aubio/aubio.mk +2 -4
index b0cc8b899e..ba182d9bd7 100644
@@ -27,7 +27,7 @@ AUBIO_CONF_OPTS += --disable-sndfile
 endif
 
 # Could not compile aubio in double precision mode with libsamplerate
-ifeq ($(BR2_PACKAGE_LIBSAMPLERATE)$(BR2_PACKAGE_FFTW_PRECISION_SINGLE),yy)
+ifeq ($(BR2_PACKAGE_LIBSAMPLERATE):$(BR2_PACKAGE_FFTW_DOUBLE),y:)
 AUBIO_DEPENDENCIES += libsamplerate
 AUBIO_CONF_OPTS += --enable-samplerate
 else
@@ -41,15 +41,14 @@ else
 AUBIO_CONF_OPTS += --disable-jack
 endif
 
-ifeq ($(BR2_PACKAGE_FFTW),y)
-AUBIO_DEPENDENCIES += fftw
 # fftw3 require double otherwise it will look for fftw3f
-ifeq ($(BR2_PACKAGE_FFTW_PRECISION_DOUBLE),y)
+ifeq ($(BR2_PACKAGE_FFTW_DOUBLE),y)
 AUBIO_CONF_OPTS += --enable-fftw3 --enable-double

package/aubio/aubio.mk else · line 53

Quoted 10 lines
package/aubio/aubio.mk +4 -3
-else ifeq ($(BR2_PACKAGE_FFTW_PRECISION_SINGLE),y)
+AUBIO_DEPENDENCIES += fftw-double
+else ifeq ($(BR2_PACKAGE_FFTW_SINGLE),y)
 AUBIO_CONF_OPTS += --enable-fftw3f --disable-double
-endif
-else  # !BR2_PACKAGE_FFTW
+AUBIO_DEPENDENCIES += fftw-single
+else
 AUBIO_CONF_OPTS += --disable-fftw3
 endif

So, with this new code, it means that using fftw-double takes precendence over libsamplerate, so we can get in a situation, when fftw-single, fftw-double, and libsamplerate are all three enabled.

I wonder if, in that situation, we should not favour using libsamplerate and fftw-single, rather than using just fftw-double?

Note that I am totally OK with the patch as is, and that someone can come later to change the conditions, so:

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#31 lore raw

PATCH v4 4/17 package/fftw: break fftw-quad into a dedicated package

In reply to Gwenhael Goavec-Merou

Gwenhael, All,

On 2019-01-21 14:50 +0100, Gwenhael Goavec-Merou spake thusly:

Quoted 41 lines

From: Gwenhael Goavec-Merou <[email protected]>

fftw's library name depends on the precision option. Consequently, it's possible to install multiple flavor on the same target.

This patch breaks fftw quad precision into a new package and:

- makes BR2_PACKAGE_FFTW_PRECISION_QUAD select BR2_PACKAGE_FFTW_QUAD to keep compatibility with packages that use BR2_PACKAGE_FFTW_PRECISION_QUAD. This option will be removed in a follow-up commit;

- makes fftw depend on fftw-quad when this package is enabled.

[Yann/Thomas:
- Force --disable-quad in FFTW_CONF_OPTS, just for the sake of clarity (fftw is no longer going to build the quad variant)
- Use FFTW_QUAD_DL_SUBDIR to avoid downloading fftw multiple times
- Minor reformatting tweaks in fftw-quad.mk
- Do not deprecate BR2_PACKAGE_FFTW_PRECISION_QUAD and instead make it select BR2_PACKAGE_FFTW_QUAD, so that packages using BR2_PACKAGE_FFTW_PRECISION_QUAD continue to work.]

[Gwenhael/Yann]:
- (BR2_i386 || BR2_x86_64) -> BR2_TOOLCHAIN_HAS_LIBQUADMATH

---
 package/fftw/Config.in                |  2 ++
 package/fftw/fftw-quad/Config.in      |  7 +++++++
 package/fftw/fftw-quad/fftw-quad.hash |  1 +
 package/fftw/fftw-quad/fftw-quad.mk   | 22 ++++++++++++++++++++++
 package/fftw/fftw.mk                  |  6 +++++-
 5 files changed, 37 insertions(+), 1 deletion(-)
package/fftw/Config.in +0 -0
index 4f37b43a60..8699d9c350 100644

package/fftw/Config.in config BR2_PACKAGE_FFTW_PRECISION_QUAD · line 51

Quoted 3 lines
package/fftw/Config.in +0 -0
@@ -49,6 +49,7 @@ config BR2_PACKAGE_FFTW_PRECISION_QUAD
 	bool "quad"
 	# quad-precision needs to have a gcc with libquadmath
 	depends on (BR2_i386 || BR2_x86_64) && BR2_USE_WCHAR

You forgot to switch to libquadmath here, although...

Quoted 18 lines
package/fftw/Config.in +2 -0
+	select BR2_PACKAGE_FFTW_QUAD
 	help
 	  Compile fftw in quadruple precision, i.e. use '__float128' for
 	  floating point type.
@@ -57,6 +58,7 @@ endchoice
 
 source "package/fftw/fftw-single/Config.in"
 source "package/fftw/fftw-long-double/Config.in"
+source "package/fftw/fftw-quad/Config.in"
 
 config BR2_PACKAGE_FFTW_FAST
 	bool "optimise for speed over accuracy"
package/fftw/fftw-quad/Config.in new file +0 -0
new file mode 100644
index 0000000000..10d296df91

package/fftw/fftw-quad/Config.in line 4

Quoted 4 lines
package/fftw/fftw-quad/Config.in new file +4 -0
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_FFTW_QUAD
+	bool "fftw-quad"
+	# quad-precision needs to have a gcc with libquadmath
+	depends on BR2_TOOLCHAIN_HAS_LIBQUADMATH && BR2_USE_WCHAR

... you did it here, and thus the old symbol that does the 'select' does not have the same dependencies as the new symbol.

Also, this change should be done in own patch all alone (i.e. do the chage in a patch just before the conversions to individual packages).

Regards,
Yann E. MORIN.

Quoted 66 lines
package/fftw/fftw-quad/Config.in new file +3 -0
+	help
+	  Compile fftw in quadruple precision, i.e. use '__float128' for
+	  floating point type.
package/fftw/fftw-quad/fftw-quad.hash new file +1 -0
new file mode 120000
index 0000000000..3ee7ecb3ba
@@ -0,0 +1 @@
+../fftw.hash
\ No newline at end of file
package/fftw/fftw-quad/fftw-quad.mk new file +22 -0
new file mode 100644
index 0000000000..5ff79b1d46
@@ -0,0 +1,22 @@
+################################################################################
+#
+# fftw-quad
+#
+################################################################################
+
+FFTW_QUAD_VERSION = $(FFTW_VERSION)
+FFTW_QUAD_SOURCE = fftw-$(FFTW_VERSION).tar.gz
+FFTW_QUAD_SITE = $(FFTW_SITE)
+FFTW_QUAD_DL_SUBDIR = fftw
+FFTW_QUAD_INSTALL_STAGING = $(FFTW_INSTALL_STAGING)
+FFTW_QUAD_LICENSE = $(FFTW_LICENSE)
+FFTW_QUAD_LICENSE_FILES = $(FFTW_LICENSE_FILES)
+
+FFTW_QUAD_CONF_ENV = $(FFTW_COMMON_CONF_ENV)
+
+FFTW_QUAD_CONF_OPTS = \
+	$(FFTW_COMMON_CONF_OPTS) \
+	CFLAGS="$(FFTW_COMMON_CFLAGS)" \
+	--enable-quad-precision
+
+$(eval $(autotools-package))
package/fftw/fftw.mk +5 -1
index 26137b9f7c..ccec0e0f2d 100644
@@ -14,6 +14,10 @@ ifeq ($(BR2_PACKAGE_FFTW_LONG_DOUBLE),y)
 FFTW_DEPENDENCIES += fftw-long-double
 endif
 
+ifeq ($(BR2_PACKAGE_FFTW_QUAD),y)
+FFTW_DEPENDENCIES += fftw-quad
+endif
+
 ifeq ($(BR2_PACKAGE_FFTW_SINGLE),y)
 FFTW_DEPENDENCIES += fftw-single
 endif
@@ -49,7 +53,7 @@ FFTW_CONF_OPTS += \
 	$(FFTW_COMMON_CONF_OPTS) \
 	--disable-single \
 	--disable-long-double \
-	$(if $(BR2_PACKAGE_FFTW_PRECISION_QUAD),--enable,--disable)-quad-precision \
+	--disable-quad-precision \
 	CFLAGS="$(FFTW_COMMON_CFLAGS)"
 
 $(eval $(autotools-package))
Signature · 1 line
2.19.2
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#32 lore raw

PATCH v4 1/17 package/fftw: prepare for splitting into multiple packages

In reply to Gwenhael Goavec-Merou
Quoted 9 lines · On Mon, 21 Jan 2019 14:50:55 +0100 Gwenhael Goavec-Merou…

From: Thomas Petazzoni <[email protected]>

From: Thomas Petazzoni <[email protected]>

In preparation for splitting into multiple packages, this commit changes the fftw.mk package to use FFTW_COMMON_CONF_OPTS, FFTW_COMMON_CONF_ENV and FFTW_COMMON_CFLAGS, which will be re-used by the soon-to-be-introduced per-precision packages.

Quoted 6 lines
---
 package/fftw/fftw.mk | 40 +++++++++++++++++++++-------------------
 1 file changed, 21 insertions(+), 19 deletions(-)

Entire series applied. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com