package:gmp: enable C++ support when BR2_INSTALL_LIBSTDCPP=y
PATCH 1/1 package:gmp: enable C++ support when BR2_INSTALL_LIBSTDCPP=y
From: Gwenhael Goavec-Merou <[email protected]>
gmp has a optional and disable by default, option to add C++ support.
--- package/gmp/gmp.mk | 4 ++++ 1 file changed, 4 insertions(+)
package/gmp/gmp.mk +4 -0
@@ -19,5 +19,9 @@ ifeq ($(BR2_m68k_cf)$(BR2_MIPS_CPU_MIPS32R6)$(BR2_MIPS_CPU_MIPS64R6)$(BR2_ARM_CP GMP_CONF_OPTS += --disable-assembly endif +ifeq ($(BR2_INSTALL_LIBSTDCPP),y) +GMP_CONF_OPTS += --enable-cxx +endif + $(eval $(autotools-package)) $(eval $(host-autotools-package))
Signature · 1 line
2.21.0
PATCH 1/1 package:gnuradio: bump to 3.8.0.0
From: Gwenhael Goavec-Merou <[email protected]>
Since 2019/08/09 a new version of gnuradio is available.
This patch bump to this version with some modifications:
- suppress the applied patch 0001-socket_pdu_impl.cc-fix-build-with-boost-1.70.0.patch
- add a patch to have boost unit_test_framework optional instead of mandatory
- add boost atomic (used by pmt), log4cpp (now mandatory) and gmp as dependencies
- suppress BR2_PACKAGE_GNURADIO_LOG no more available since log4cpp is mandatory
- add -mfpu=neon if the compiler support this to avoid volk test failure
Since 2019/08/09 a new version of gnuradio is available.
This patch bump to this version with some modifications:
- suppress the applied patch 0001-socket_pdu_impl.cc-fix-build-with-boost-1.70.0.patch
- add a patch to have boost unit_test_framework optional instead of mandatory
- add boost atomic (used by pmt), log4cpp (now mandatory) and gmp as dependencies
- suppress the no more available BR2_PACKAGE_GNURADIO_LOG, since log4cpp is mandatory
- add -mfpu=neon if the compiler support this to avoid volk test failure
--- ..._impl.cc-fix-build-with-boost-1.70.0.patch | 42 ------------------- ...nitest-detection-when-ENABLE_TESTING.patch | 38 +++++++++++++++++ package/gnuradio/Config.in | 9 ++-- package/gnuradio/gnuradio.hash | 2 +- package/gnuradio/gnuradio.mk | 15 +++---- 5 files changed, 47 insertions(+), 59 deletions(-) delete mode 100644 package/gnuradio/0001-socket_pdu_impl.cc-fix-build-with-boost-1.70.0.patch create mode 100644 package/gnuradio/0001-suppress-boost_unitest-detection-when-ENABLE_TESTING.patch
package/gnuradio/0001-socket_pdu_impl.cc-fix-build-with-boost-1.70.0.patch deleted +0 -42
@@ -1,42 +0,0 @@ -From 6b450f36c14dd16d476f10f3e4eb1c5c26a78daa Mon Sep 17 00:00:00 2001 -From: Fabrice Fontaine <[email protected]> -Date: Thu, 18 Apr 2019 09:40:15 +0200 -Subject: [PATCH] socket_pdu_impl.cc: fix build with boost 1.70.0 - -Fix #2446 - -Signed-off-by: Fabrice Fontaine <[email protected]> -[Upstream status: https://github.com/gnuradio/gnuradio/pull/2451] ---- - gr-blocks/lib/socket_pdu_impl.cc | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/gr-blocks/lib/socket_pdu_impl.cc b/gr-blocks/lib/socket_pdu_impl.cc -index e20f1478f..d9dd1edd6 100644 ---- a/gr-blocks/lib/socket_pdu_impl.cc -+++ b/gr-blocks/lib/socket_pdu_impl.cc -@@ -29,6 +29,12 @@ - #include <gnuradio/io_signature.h> - #include <gnuradio/blocks/pdu.h> - -+#if BOOST_VERSION >= 107000 -+#define GET_IO_SERVICE(s) ((boost::asio::io_context&)(s)->get_executor().context()) -+#else -+#define GET_IO_SERVICE(s) ((s)->get_io_service()) -+#endif -+ - namespace gr { - namespace blocks { - -@@ -165,7 +171,7 @@ namespace gr { - void - socket_pdu_impl::start_tcp_accept() - { -- tcp_connection::sptr new_connection = tcp_connection::make(d_acceptor_tcp->get_io_service(), d_rxbuf.size(), d_tcp_no_delay); -+ tcp_connection::sptr new_connection = tcp_connection::make(GET_IO_SERVICE(d_acceptor_tcp), d_rxbuf.size(), d_tcp_no_delay); - - d_acceptor_tcp->async_accept(new_connection->socket(), - boost::bind(&socket_pdu_impl::handle_tcp_accept, this, --- -2.20.1 -
package/gnuradio/0001-suppress-boost_unitest-detection-when-ENABLE_TESTING.patch new file +38 -0
@@ -0,0 +1,38 @@ +From 1dc15300b9a38cf2217768375e67922f7268cad9 Mon Sep 17 00:00:00 2001 +From: Gwenhael Goavec-Merou <[email protected]> +Date: Wed, 4 Sep 2019 11:34:51 +0200 +Subject: [PATCH] suppress boost_unitest detection when ENABLE_TESTING is not + set + +boost unit_test_framework is only used when ENABLE_TESTING is set. So instead of +adding this module as default, append to the list of required module only when +it is mandatory. + +Signed-off-by: Gwenhael Goavec-Merou <[email protected]> +--- + cmake/Modules/GrBoost.cmake | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/cmake/Modules/GrBoost.cmake b/cmake/Modules/GrBoost.cmake +index cd4b120f7..5c227db7e 100644 +--- a/cmake/Modules/GrBoost.cmake ++++ b/cmake/Modules/GrBoost.cmake +@@ -33,9 +33,14 @@ set(BOOST_REQUIRED_COMPONENTS + system + regex + thread +- unit_test_framework + ) + ++if(ENABLE_TESTING) ++ list(APPEND BOOST_REQUIRED_COMPONENTS ++ unit_test_framework ++ ) ++endif(ENABLE_TESTING) ++ + if(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64") + list(APPEND BOOST_LIBRARYDIR "/usr/lib64") #fedora 64-bit fix + endif(UNIX AND NOT BOOST_ROOT AND EXISTS "/usr/lib64") +-- +2.21.0 +
package/gnuradio/Config.in +3 -6
@@ -13,12 +13,15 @@ config BR2_PACKAGE_GNURADIO depends on BR2_USE_WCHAR # boost depends on !BR2_PACKAGE_PYTHON3 select BR2_PACKAGE_BOOST + select BR2_PACKAGE_BOOST_ATOMIC select BR2_PACKAGE_BOOST_DATE_TIME select BR2_PACKAGE_BOOST_FILESYSTEM select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS select BR2_PACKAGE_BOOST_REGEX select BR2_PACKAGE_BOOST_SYSTEM select BR2_PACKAGE_BOOST_THREAD + select BR2_PACKAGE_LOG4CPP + select BR2_PACKAGE_GMP help GNU Radio is a free & open-source software development toolkit that provides signal processing blocks to implement
@@ -56,12 +59,6 @@ config BR2_PACKAGE_GNURADIO_FEC help FEC signal processing blocks -config BR2_PACKAGE_GNURADIO_LOG - bool "gr-log support" - select BR2_PACKAGE_LOG4CPP - help - Enable logger component - config BR2_PACKAGE_GNURADIO_PYTHON bool "python support" depends on BR2_PACKAGE_PYTHON
package/gnuradio/gnuradio.hash +1 -1
@@ -1,5 +1,5 @@ # From http://gnuradio.org/releases/gnuradio/sha256sums -sha256 1e07ce40fa3c3eede1fb54e320dad8a221a3c01de341e9cef2d7b265ed06a6e9 gnuradio-3.7.13.3.tar.gz +sha256 3a9c90111f22f2f6f30450731dc671ad28ce824fc1a7bc8ea0783da9b95a7092 gnuradio-3.8.0.0.tar.gz # Hash for license file: sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING
package/gnuradio/gnuradio.mk +5 -10
@@ -4,7 +4,7 @@ # ################################################################################ -GNURADIO_VERSION = 3.7.13.3 +GNURADIO_VERSION = 3.8.0.0 GNURADIO_SITE = http://gnuradio.org/releases/gnuradio GNURADIO_LICENSE = GPL-3.0+ GNURADIO_LICENSE_FILES = COPYING
@@ -16,7 +16,9 @@ GNURADIO_DEPENDENCIES = \ host-python-mako \ host-python-six \ host-swig \ - boost + boost \ + log4cpp \ + gmp ifeq ($(BR2_PACKAGE_ORC),y) GNURADIO_DEPENDENCIES += orc
@@ -43,7 +45,7 @@ endif # CFLAGS to decide whether to build the NEON functions or not, and # wants to see the string 'armv7' in the CFLAGS. ifeq ($(BR2_ARM_CPU_ARMV7A)$(BR2_ARM_CPU_HAS_NEON),yy) -GNURADIO_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -march=armv7-a" +GNURADIO_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -march=armv7-a -mfpu=neon" endif # As soon as -mfpu=neon is supported by the compiler, gnuradio will try
@@ -115,13 +117,6 @@ else GNURADIO_CONF_OPTS += -DENABLE_GR_FILTER=OFF endif -ifeq ($(BR2_PACKAGE_GNURADIO_LOG),y) -GNURADIO_DEPENDENCIES += log4cpp -GNURADIO_CONF_OPTS += -DENABLE_GR_LOG=ON -else -GNURADIO_CONF_OPTS += -DENABLE_GR_LOG=OFF -endif - ifeq ($(BR2_PACKAGE_GNURADIO_PYTHON),y) GNURADIO_DEPENDENCIES += python GNURADIO_CONF_OPTS += -DENABLE_PYTHON=ON
Signature · 1 line
2.21.0
PATCH 1/1 package:gnuradio: move to python3
From: Gwenhael Goavec-Merou <[email protected]>
gnuradio 3.8.0.0 support both python2 and python3 but python2 is EOL, so move explicitly to python3.
- depends on python3 to avoid issues with mako at the build time
- add full path to python3 interpreter
- by default gnuradio install python libraries in dist-packages. To force installation in site-packages add GR_PYTHON_DIR in CONF_OPTS
- when python support is enabled python-six is mandatory at runtime
--- package/gnuradio/Config.in | 7 ++++--- package/gnuradio/gnuradio.mk | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-)
package/gnuradio/Config.in +4 -3
@@ -1,6 +1,6 @@ comment "gnuradio needs a toolchain w/ C++, NPTL, wchar, dynamic library" depends on BR2_USE_MMU - depends on !BR2_PACKAGE_PYTHON3 + depends on !BR2_PACKAGE_PYTHON depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
@@ -11,7 +11,7 @@ config BR2_PACKAGE_GNURADIO depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL depends on BR2_USE_MMU # use fork() depends on BR2_USE_WCHAR # boost - depends on !BR2_PACKAGE_PYTHON3 + depends on !BR2_PACKAGE_PYTHON select BR2_PACKAGE_BOOST select BR2_PACKAGE_BOOST_ATOMIC select BR2_PACKAGE_BOOST_DATE_TIME
@@ -61,11 +61,12 @@ config BR2_PACKAGE_GNURADIO_FEC config BR2_PACKAGE_GNURADIO_PYTHON bool "python support" - depends on BR2_PACKAGE_PYTHON + depends on BR2_PACKAGE_PYTHON3 depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # python-numpy select BR2_PACKAGE_BOOST_PYTHON select BR2_PACKAGE_PYTHON_NUMPY # runtime + select BR2_PACKAGE_PYTHON_SIX # runtime help Enable python component
package/gnuradio/gnuradio.mk +3 -1
@@ -25,6 +25,7 @@ GNURADIO_DEPENDENCIES += orc endif GNURADIO_CONF_OPTS = \ + -DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python$(PYTHON3_VERSION_MAJOR)m \ -DENABLE_DEFAULT=OFF \ -DENABLE_VOLK=ON \ -DENABLE_GNURADIO_RUNTIME=ON \
@@ -118,8 +119,9 @@ GNURADIO_CONF_OPTS += -DENABLE_GR_FILTER=OFF endif ifeq ($(BR2_PACKAGE_GNURADIO_PYTHON),y) -GNURADIO_DEPENDENCIES += python +GNURADIO_DEPENDENCIES += python3 python-six GNURADIO_CONF_OPTS += -DENABLE_PYTHON=ON +GNURADIO_CONF_OPTS += -DGR_PYTHON_DIR=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages else GNURADIO_CONF_OPTS += -DENABLE_PYTHON=OFF endif
Signature · 1 line
2.21.0
PATCH 1/1 package:gnuradio: move to python3
Quoted 4 lines · Gwenhael Goavec-Merou
From: Gwenhael Goavec-Merou <[email protected]>
gnuradio 3.8.0.0 support both python2 and python3 but python2 is EOL, so move explicitly to python3.
python2 is not quite EOL yet :-)
So I think removing python2 support is a bit premature. That said, if it's
simpler to not support python2, by all means go ahead. But then it should be explained in the commit message that it's too difficult to support both, and why.
Quoted 1 line
- depends on python3 to avoid issues with mako at the build time
What issue is that? There are three possibilities:
BR2_PACKAGE_PYTHON is selected -> host-python-mako will be built for python2 BR2_PACKAGE_PYTHON3 is selected -> host-python-mako will be biult for python3 Neither is selected -> host-python-mako will be built for python2
So I think you only need to have a dependency like:
$(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python)
cfr. libsigrok.
Quoted 51 lines
- add full path to python3 interpreter
- by default gnuradio install python libraries in dist-packages. To force installation in site-packages addGR_PYTHON_DIRinCONF_OPTS
- when python support is enabled python-six is mandatory at runtimeSigned-off-by Gwenhael Goavec-Merou <[email protected]>--- package/gnuradio/Config.in | 7 ++++--- package/gnuradio/gnuradio.mk | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-)package/gnuradio/Config.in +4
-3@@ -1,6 +1,6 @@ comment "gnuradio needs a toolchain w/ C++, NPTL, wchar, dynamic library" depends on BR2_USE_MMU - depends on !BR2_PACKAGE_PYTHON3 + depends on !BR2_PACKAGE_PYTHON depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS@@ -11,7 +11,7 @@ config BR2_PACKAGE_GNURADIO depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL depends on BR2_USE_MMU # use fork() depends on BR2_USE_WCHAR # boost - depends on !BR2_PACKAGE_PYTHON3 + depends on !BR2_PACKAGE_PYTHON select BR2_PACKAGE_BOOST select BR2_PACKAGE_BOOST_ATOMIC select BR2_PACKAGE_BOOST_DATE_TIME@@ -61,11 +61,12 @@ config BR2_PACKAGE_GNURADIO_FEC config BR2_PACKAGE_GNURADIO_PYTHON bool "python support" - depends on BR2_PACKAGE_PYTHON + depends on BR2_PACKAGE_PYTHON3 depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # python-numpy select BR2_PACKAGE_BOOST_PYTHON select BR2_PACKAGE_PYTHON_NUMPY # runtime + select BR2_PACKAGE_PYTHON_SIX # runtime help Enable python componentpackage/gnuradio/gnuradio.mk +0
-0
package/gnuradio/gnuradio.mk GNURADIO_DEPENDENCIES += orc · line 28
Quoted 4 lines
package/gnuradio/gnuradio.mk +1
-0@@ -25,6 +25,7 @@ GNURADIO_DEPENDENCIES += orc endif GNURADIO_CONF_OPTS = \ + -DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python$(PYTHON3_VERSION_MAJOR)m \
Why does $(HOST_DIR)/bin/python not work? If python3 is enabled on the target,
then $(HOST_DIR)/bin/python will be a symlink to python3.
package/gnuradio/gnuradio.mk GNURADIO_CONF_OPTS += -DENABLE_GR_FILTER=OFF · line 122
Quoted 9 lines
package/gnuradio/gnuradio.mk +1
-1-DENABLE_DEFAULT=OFF \ -DENABLE_VOLK=ON \ -DENABLE_GNURADIO_RUNTIME=ON \@@ -118,8 +119,9 @@ GNURADIO_CONF_OPTS += -DENABLE_GR_FILTER=OFF endif ifeq ($(BR2_PACKAGE_GNURADIO_PYTHON),y) -GNURADIO_DEPENDENCIES += python +GNURADIO_DEPENDENCIES += python3 python-six
If python-six is runtime, it shouldn't be added here.
Regards,
Arnout
Quoted 6 lines
package/gnuradio/gnuradio.mk +1
-0GNURADIO_CONF_OPTS += -DENABLE_PYTHON=ON +GNURADIO_CONF_OPTS += -DGR_PYTHON_DIR=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages else GNURADIO_CONF_OPTS += -DENABLE_PYTHON=OFF endif
PATCH 1/1 package:gnuradio: bump to 3.8.0.0
In reply to Gwenhael Goavec-MerouQuoted 6 lines · Gwenhael Goavec-Merou
From: Gwenhael Goavec-Merou <[email protected]>
Since 2019/08/09 a new version of gnuradio is available.
This patch bump to this version with some modifications:
- suppress the applied patch 0001-socket_pdu_impl.cc-fix-build-with-boost-1.70.0.patch
- add a patch to have boostunit_test_frameworkoptional instead of mandatory
Has this been sent upstream?
Quoted 3 lines
- add boost atomic (used by pmt), log4cpp (now mandatory) and gmp as dependencies
- suppressBR2_PACKAGE_GNURADIO_LOGno more available since log4cpp is mandatory
You should say explicitly in the commit message that Config.in.legacy handling
is not needed because GR_LOG is now always enabled.
Quoted 9 lines
- add -mfpu=neon if the compiler support this to avoid volk test failure
Since 2019/08/09 a new version of gnuradio is available.
This patch bump to this version with some modifications:
- suppress the applied patch 0001-socket_pdu_impl.cc-fix-build-with-boost-1.70.0.patch
- add a patch to have boostunit_test_frameworkoptional instead of mandatory
- add boost atomic (used by pmt), log4cpp (now mandatory) and gmp as dependencies
- suppress the no more availableBR2_PACKAGE_GNURADIO_LOG, since log4cpp is mandatory
- add -mfpu=neon if the compiler support this to avoid volk test failure
Copy-paste error? :-)
Quoted 2 lines
Signed-off-by Gwenhael Goavec-Merou <[email protected]>
[snip]
package/gnuradio/gnuradio.mk endif · line 48
Quoted 5 lines
# CFLAGS to decide whether to build the NEON functions or not, and
# wants to see the string 'armv7' in the CFLAGS. ifeq ($(BR2_ARM_CPU_ARMV7A)$(BR2_ARM_CPU_HAS_NEON),yy)package/gnuradio/gnuradio.mk +1
-1-GNURADIO_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -march=armv7-a" +GNURADIO_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -march=armv7-a -mfpu=neon"
This change seems to conflict with the comment above. The comment says that the
CMakeLists look for the march=armv7-a to decide whether to enable NEON or not. That kind of seems counter to passing -mfpu=neon in CFLAGS explicitly.
So at least, the comment above should be updated. And probably the
-march=armv7-a is no longer needed. Or maybe it still is.
Regards,
Arnout
Quoted 3 lines
endif
# As soon as -mfpu=neon is supported by the compiler, gnuradio will try
PATCH 1/1 package:gmp: enable C++ support when BR2_INSTALL_LIBSTDCPP=y
In reply to Gwenhael Goavec-MerouHello,
Quoted 5 lines · On Thu, 5 Sep 2019 15:40:40 +0200 Gwenhael Goavec-Merou…
From: Gwenhael Goavec-Merou <[email protected]>
gmp has a optional and disable by default, option to add C++ support.
Signed-off-by Gwenhael Goavec-Merou <[email protected]>
The correct prefix in the commit title is "package/gmp:", not "package:gmp:".
package/gmp/gmp.mk ifeq ($(BR2_m68k_cf)$(BR2_MIPS_CPU_MIPS32R6)$(BR2_MIPS_CPU_MIPS64R6)$(BR2_ARM_CP · line 24
Quoted 3 lines
package/gmp/gmp.mk +3
-0+ifeq ($(BR2_INSTALL_LIBSTDCPP),y) +GMP_CONF_OPTS += --enable-cxx +endif
We like to have an explicit --disable-cxx in an else clause.
I fixed both issues and applied. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com