[Mod] First commit

This commit is contained in:
2022-10-31 22:18:58 +08:00
commit 1c8a3d9709
13090 changed files with 526733 additions and 0 deletions

35
package/fftw/Config.in Normal file
View File

@ -0,0 +1,35 @@
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
help
Library for computing Fast Fourier Transforms.
This library computes Fast Fourier Transforms (FFT) in one
or more dimensions. It is extremely fast. This package
contains the shared library version of the fftw libraries in
double precision.
http://www.fftw.org
if BR2_PACKAGE_FFTW
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"
config BR2_PACKAGE_FFTW_FAST
bool "optimise for speed over accuracy"
help
Optimise for fast math functions, at the expense of accuracy.
Say 'y' if you need speed and can live with inaccuracies in
the results. Say 'n' (the default) if accuracy is of utmost
importance.
This basically uses gcc's -Ofast optimisation level, which in
turn is basically using gcc's -ffast-math. See the gcc manual
for what this means.
endif

View File

@ -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.

View File

@ -0,0 +1 @@
../fftw.hash

View File

@ -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))

View File

@ -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.

View File

@ -0,0 +1 @@
../fftw.hash

View File

@ -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))

View File

@ -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.

View File

@ -0,0 +1 @@
../fftw.hash

View File

@ -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))

View File

@ -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.

View File

@ -0,0 +1 @@
../fftw.hash

View File

@ -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))

5
package/fftw/fftw.hash Normal file
View File

@ -0,0 +1,5 @@
# From http://www.fftw.org/fftw-3.3.8.tar.gz.md5sum
md5 8aac833c943d8e90d51b697b27d4384d fftw-3.3.8.tar.gz
# Locally computed
sha256 6113262f6e92c5bd474f2875fa1b01054c4ad5040f6b0da7c03c98821d9ae303 fftw-3.3.7.tar.gz
sha256 231f7edcc7352d7734a96eef0b8030f77982678c516876fcb81e25b32d68564c COPYING

36
package/fftw/fftw.mk Normal file
View File

@ -0,0 +1,36 @@
################################################################################
#
# fftw
#
################################################################################
FFTW_VERSION = 3.3.8
FFTW_SITE = http://www.fftw.org
FFTW_INSTALL_STAGING = YES
FFTW_LICENSE = GPL-2.0+
FFTW_LICENSE_FILES = COPYING
# fortran support only enables generation and installation of fortran sources
ifeq ($(BR2_TOOLCHAIN_HAS_FORTRAN),y)
FFTW_COMMON_CONF_OPTS += --enable-fortran
FFTW_COMMON_CONF_ENV += FLIBS="-lgfortran -lm"
else
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
# Generic optimisations
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
FFTW_COMMON_CONF_OPTS += --enable-threads
FFTW_COMMON_CONF_OPTS += $(if $(BR2_TOOLCHAIN_HAS_OPENMP),--without,--with)-combined-threads
else
FFTW_COMMON_CONF_OPTS += --disable-threads
endif
FFTW_COMMON_CONF_OPTS += $(if $(BR2_TOOLCHAIN_HAS_OPENMP),--enable,--disable)-openmp
include $(sort $(wildcard package/fftw/*/*.mk))