From patchwork Tue Feb 8 16:24:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwenhael Goavec-Merou X-Patchwork-Id: 1589974 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JtSyb5xXxz9s09 for ; Wed, 9 Feb 2022 03:24:39 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id D6DA840243; Tue, 8 Feb 2022 16:24:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NZFlORaiDFU4; Tue, 8 Feb 2022 16:24:37 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id F2E9E40239; Tue, 8 Feb 2022 16:24:35 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 8105D1BF5E9 for ; Tue, 8 Feb 2022 16:24:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 6FA5B813B0 for ; Tue, 8 Feb 2022 16:24:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SrECz102FgIx for ; Tue, 8 Feb 2022 16:24:33 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from smtp6-g21.free.fr (smtp6-g21.free.fr [212.27.42.6]) by smtp1.osuosl.org (Postfix) with ESMTPS id 0E7C5813AC for ; Tue, 8 Feb 2022 16:24:32 +0000 (UTC) Received: from localhost.localdomain (unknown [78.252.129.8]) by smtp6-g21.free.fr (Postfix) with ESMTP id 55E29780344; Tue, 8 Feb 2022 17:24:29 +0100 (CET) From: Gwenhael Goavec-Merou To: buildroot@buildroot.org Date: Tue, 8 Feb 2022 17:24:08 +0100 Message-Id: <20220208162409.496110-1-gwenj@trabucayre.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/2] package/volk: new package X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gwenhael Goavec-Merou Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" From: Gwenhael Goavec-Merou VOLK is the Vector-Optimized Library of Kernels Signed-off-by: Gwenhael Goavec-Merou Reviewed-by: Romain Naour --- 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 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)) From patchwork Tue Feb 8 16:24:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwenhael Goavec-Merou X-Patchwork-Id: 1589975 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JtSyr6Xpvz9s09 for ; Wed, 9 Feb 2022 03:24:52 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 5DE25405C2; Tue, 8 Feb 2022 16:24:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9z1qzxn-EixY; Tue, 8 Feb 2022 16:24:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id 3B9DB405AD; Tue, 8 Feb 2022 16:24:48 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id EB6F41BF5E9 for ; Tue, 8 Feb 2022 16:24:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id E8535813B0 for ; Tue, 8 Feb 2022 16:24:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id j8EvcvEmx5jT for ; Tue, 8 Feb 2022 16:24:35 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from smtp6-g21.free.fr (smtp6-g21.free.fr [212.27.42.6]) by smtp1.osuosl.org (Postfix) with ESMTPS id 5FB52813AC for ; Tue, 8 Feb 2022 16:24:35 +0000 (UTC) Received: from localhost.localdomain (unknown [78.252.129.8]) by smtp6-g21.free.fr (Postfix) with ESMTP id 8CE9C780383; Tue, 8 Feb 2022 17:24:30 +0100 (CET) From: Gwenhael Goavec-Merou To: buildroot@buildroot.org Date: Tue, 8 Feb 2022 17:24:09 +0100 Message-Id: <20220208162409.496110-2-gwenj@trabucayre.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220208162409.496110-1-gwenj@trabucayre.com> References: <20220208162409.496110-1-gwenj@trabucayre.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/2] package/gnuradio: move to package/volk instead of using the internal one X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gwenhael Goavec-Merou Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" From: Gwenhael Goavec-Merou Until recent releases GNURadio was shipped with volk as a submodule. With 3.9 and 3.10 this is no more true and requires building volk before GNURadio. This patch disable internal's volk, and add a dependency to the corresponding package, to use inconditionnaly the one build by buildroot Signed-off-by: Gwenhael Goavec-Merou Reviewed-by: Romain Naour --- package/gnuradio/Config.in | 1 + package/gnuradio/gnuradio.mk | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in index 1896d1326a..103175946c 100644 --- a/package/gnuradio/Config.in +++ b/package/gnuradio/Config.in @@ -28,6 +28,7 @@ config BR2_PACKAGE_GNURADIO select BR2_PACKAGE_BOOST_THREAD select BR2_PACKAGE_LOG4CPP select BR2_PACKAGE_GMP + select BR2_PACKAGE_VOLK help GNU Radio is a free & open-source software development toolkit that provides signal processing blocks to implement diff --git a/package/gnuradio/gnuradio.mk b/package/gnuradio/gnuradio.mk index 417a51e067..ed7060b85c 100644 --- a/package/gnuradio/gnuradio.mk +++ b/package/gnuradio/gnuradio.mk @@ -19,13 +19,15 @@ GNURADIO_DEPENDENCIES = \ host-swig \ boost \ log4cpp \ - gmp + gmp \ + volk GNURADIO_CONF_OPTS = \ -DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python3 \ -DENABLE_DEFAULT=OFF \ -DENABLE_VOLK=ON \ -DENABLE_GNURADIO_RUNTIME=ON \ + -DENABLE_INTERNAL_VOLK=OFF \ -DENABLE_TESTING=OFF \ -DXMLTO_EXECUTABLE=NOTFOUND