Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/volk: new package
@ 2022-02-08 16:24 Gwenhael Goavec-Merou
  2022-02-08 16:24 ` [Buildroot] [PATCH 2/2] package/gnuradio: move to package/volk instead of using the internal one Gwenhael Goavec-Merou
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Gwenhael Goavec-Merou @ 2022-02-08 16:24 UTC (permalink / raw)
  To: buildroot; +Cc: Gwenhael Goavec-Merou

From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>

VOLK is the Vector-Optimized Library of Kernels

Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
---
 DEVELOPERS             |  1 +
 package/Config.in      |  1 +
 package/volk/Config.in | 31 +++++++++++++++++++++++++++++++
 package/volk/volk.hash |  3 +++
 package/volk/volk.mk   | 39 +++++++++++++++++++++++++++++++++++++++
 5 files changed, 75 insertions(+)
 create mode 100644 package/volk/Config.in
 create mode 100644 package/volk/volk.hash
 create mode 100644 package/volk/volk.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 1d1cf99898..c8a9b87c47 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1181,6 +1181,7 @@ F:	package/python-markdown/
 F:	package/python-remi/
 F:	package/python-sip/
 F:	package/uhd/
+F:	package/volk/
 
 N:	Heiko Thiery <heiko.thiery@gmail.com>
 F:	board/kontron/pitx-imx8m/
diff --git a/package/Config.in b/package/Config.in
index d631ed784a..c0353829a3 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -2062,6 +2062,7 @@ endif
 	source "package/tz/Config.in"
 	source "package/tzdata/Config.in"
 	source "package/uvw/Config.in"
+	source "package/volk/Config.in"
 	source "package/xapian/Config.in"
 endmenu
 
diff --git a/package/volk/Config.in b/package/volk/Config.in
new file mode 100644
index 0000000000..4539cd2153
--- /dev/null
+++ b/package/volk/Config.in
@@ -0,0 +1,31 @@
+comment "volk needs a toolchain w/ C++, NPTL, wchar, dynamic library"
+	depends on BR2_USE_MMU
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
+		!BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
+
+config BR2_PACKAGE_VOLK
+	bool "volk"
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on !BR2_STATIC_LIBS
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
+	depends on BR2_USE_MMU # use fork()
+	depends on BR2_USE_WCHAR # boost
+	select BR2_PACKAGE_BOOST
+	select BR2_PACKAGE_BOOST_FILESYSTEM
+	select BR2_PACKAGE_BOOST_SYSTEM
+	help
+	  VOLK is the Vector-Optimized Library of Kernels. It is a
+	  library that contains kernels of hand-written SIMD code
+	  for different mathematical operations. Since each SIMD
+	  architecture can be very different and no compiler has yet
+	  come along to handle vectorization properly or highly
+	  efficiently, VOLK approaches the problem differently.
+
+	  For each architecture or platform that a developer wishes
+	  to vectorize for, a new proto-kernel is added to VOLK. At
+	  runtime, VOLK will select the correct proto-kernel. In this
+	  way, the users of VOLK call a kernel for performing the
+	  operation that is platform/architecture agnostic. This
+	  allows us to write portable SIMD code.
+
+	  https://www.libvolk.org/
diff --git a/package/volk/volk.hash b/package/volk/volk.hash
new file mode 100644
index 0000000000..9fca6c1b33
--- /dev/null
+++ b/package/volk/volk.hash
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  d9183b9f86a32cdbb8698cbbeb15de574962c05200ccf445c1058629073521f8  volk-2.5.0.tar.gz
+sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING
diff --git a/package/volk/volk.mk b/package/volk/volk.mk
new file mode 100644
index 0000000000..cdb0ea9a77
--- /dev/null
+++ b/package/volk/volk.mk
@@ -0,0 +1,39 @@
+################################################################################
+#
+# volk
+#
+################################################################################
+
+VOLK_VERSION = 2.5.0
+VOLK_SITE = https://github.com/gnuradio/volk/releases/download/v$(VOLK_VERSION)
+VOLK_LICENSE = GPL-3.0+
+VOLK_LICENSE_FILES = COPYING
+
+VOLK_SUPPORTS_IN_SOURCE_BUILD = NO
+
+# host-python-mako are needed for volk to compile
+VOLK_DEPENDENCIES = host-python3 host-python-mako boost
+
+VOLK_CONF_OPTS = \
+	-DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python3 \
+	-DENABLE_MODTOOL=OFF \
+	-DENABLE_TESTING=OFF \
+	-DENABLE_PROFILING=OFF \
+	-DVOLK_PYTHON_DIR=lib/python$(PYTHON3_VERSION_MAJOR)/site-packages
+
+# For third-party blocks, the volk library is mandatory at
+# compile time.
+VOLK_INSTALL_STAGING = YES
+
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+VOLK_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-latomic
+endif
+
+ifeq ($(BR2_PACKAGE_ORC),y)
+VOLK_DEPENDENCIES += orc
+VOLK_CONF_OPTS += -DENABLE_ORC=ON
+else
+VOLK_CONF_OPTS += -DENABLE_ORC=OFF
+endif
+
+$(eval $(cmake-package))
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-07-26 18:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-08 16:24 [Buildroot] [PATCH 1/2] package/volk: new package Gwenhael Goavec-Merou
2022-02-08 16:24 ` [Buildroot] [PATCH 2/2] package/gnuradio: move to package/volk instead of using the internal one Gwenhael Goavec-Merou
2022-07-26 17:41   ` Romain Naour
2022-07-26 18:56     ` Gwenhael Goavec-Merou
2022-07-26 18:50   ` Thomas Petazzoni via buildroot
2022-07-26 17:34 ` [Buildroot] [PATCH 1/2] package/volk: new package Romain Naour
2022-07-26 18:41 ` Thomas Petazzoni via buildroot
2022-07-26 18:51   ` Gwenhael Goavec-Merou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox