libiio: Bump version to 0.7
PATCH 1/1 libiio: Bump version to 0.7
The two previous patches have been merged upstream, so they have been deleted here. Another patch (picked from upstream) has been added to fix the build with thread-less toolchains.
Libiio v0.7 provides two new backends, a USB backend (using libusb-1.0) and a serial backend (using libserialport).
Additionally, it is now possible to compile libiio with thread-less toolchains. In that case, thread safety is disabled.
--- ...l2-detection-try-first-the-CMake-module-f.patch | 43 ---------------------- ...t-include-pthread.h-if-NO_THREADS-is-defi.patch | 26 +++++++++++++ ...IIOD-Link-pthread-with-no-network-backend.patch | 30 --------------- package/libiio/Config.in | 31 ++++++++++++++-- package/libiio/libiio.hash | 4 +- package/libiio/libiio.mk | 23 ++++++++++-- 6 files changed, 74 insertions(+), 83 deletions(-) delete mode 100644 package/libiio/0001-cmake-libxml2-detection-try-first-the-CMake-module-f.patch create mode 100644 package/libiio/0001-lock.c-Don-t-include-pthread.h-if-NO_THREADS-is-defi.patch delete mode 100644 package/libiio/0002-IIOD-Link-pthread-with-no-network-backend.patch
package/libiio/0001-cmake-libxml2-detection-try-first-the-CMake-module-f.patch deleted +0 -43
@@ -1,43 +0,0 @@ -From b613e0fe7999cfff9efb646eb388ea1e58952e30 Mon Sep 17 00:00:00 2001 -From: Samuel Martin <[email protected]> -Date: Thu, 14 Apr 2016 12:59:27 -0400 -Subject: [PATCH] cmake: libxml2 detection: try CMake module from libxml2 - -Libxml2 >=2.9.2 provides its own CMake module, so check for it before -falling back on the CMake's module FindLibXml2.cmake. - -Updated for v0.6 by: Matt Fornero <[email protected]> - -Signed-off-by: Samuel Martin <[email protected]> -Signed-off-by: Matt Fornero <[email protected]> ---- - CMakeLists.txt | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 70f61f0..4a4209b 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -143,7 +143,18 @@ if(WITH_NETWORK_BACKEND) - endif() - - if (NEED_LIBXML2) -- include(FindLibXml2) -+ # Since libxml2-2.9.2, libxml2 provides its own LibXml2-config.cmake, with all -+ # variables correctly set. -+ # So, try first to find the CMake module provided by libxml2 package, then fallback -+ # on the CMake's FindLibXml2.cmake module (which can lack some definition, especially -+ # in static build case). -+ find_package(LibXml2 QUIET NO_MODULE) -+ if(DEFINED LIBXML2_VERSION_STRING) -+ set(LIBXML2_FOUND ON) -+ set(LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_DIRS}) -+ else() -+ include(FindLibXml2) -+ endif() - - if (NOT LIBXML2_FOUND) - message(SEND_ERROR "The selected backends require libxml2 to be installed") --- -1.7.10.4 -
package/libiio/0001-lock.c-Don-t-include-pthread.h-if-NO_THREADS-is-defi.patch new file +26 -0
@@ -0,0 +1,26 @@ +From d052d263600549979a6219a59e85af80eeafc6d2 Mon Sep 17 00:00:00 2001 +From: Paul Cercueil <[email protected]> +Date: Tue, 5 Jul 2016 12:12:41 +0200 +Subject: [PATCH] lock.c: Don't include <pthread.h> if NO_THREADS is defined + +Signed-off-by: Paul Cercueil <[email protected]> +--- + lock.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lock.c b/lock.c +index 39248ab..00eb9d9 100644 +--- a/lock.c ++++ b/lock.c +@@ -18,7 +18,7 @@ + + #ifdef _WIN32 + #include <windows.h> +-#else ++#elif !defined(NO_THREADS) + #include <pthread.h> + #endif + +-- +2.8.1 +
package/libiio/0002-IIOD-Link-pthread-with-no-network-backend.patch deleted +0 -30
@@ -1,30 +0,0 @@ -From 8dcb6c3f60123511d77b9fc7e4e22ae710e7d2f4 Mon Sep 17 00:00:00 2001 -From: Matthew Fornero <[email protected]> -Date: Wed, 8 Jun 2016 20:03:56 -0400 -Subject: [PATCH] IIOD: Link pthread with no network backend - -If iiod is built without the network backend, CMake will not link in -pthreads. Update the CMake configuration to accomodate this case. - -Signed-off-by: Matthew Fornero <[email protected]> ---- - CMakeLists.txt | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 70f61f0..20fa9f1 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -56,6 +56,9 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - if (WITH_IIOD AND NOT WITH_LOCAL_BACKEND) - message(SEND_ERROR "IIOD can only be enabled if the local backend is enabled") - endif() -+ if (WITH_IIOD) -+ set(NEED_THREADS 1) -+ endif() - endif() - - option(ENABLE_IPV6 "Define if you want to enable IPv6 support" ON) --- -1.7.10.4 -
package/libiio/Config.in +27 -4
@@ -1,6 +1,6 @@ config BR2_PACKAGE_LIBIIO bool "libiio" - select BR2_PACKAGE_LIBIIO_LOCAL_BACKEND if !BR2_PACKAGE_LIBIIO_NETWORK_BACKEND + select BR2_PACKAGE_LIBIIO_LOCAL_BACKEND if !BR2_PACKAGE_LIBIIO_XML_BACKEND help Libiio is a library to ease the development of software interfacing Linux Industrial I/O (IIO) devices.
@@ -15,17 +15,40 @@ config BR2_PACKAGE_LIBIIO_LOCAL_BACKEND help Enable the local backend of the library. +config BR2_PACKAGE_LIBIIO_XML_BACKEND + bool "XML backend" + select BR2_PACKAGE_LIBXML2 + default y + help + Enable the XML backend of the library. + config BR2_PACKAGE_LIBIIO_NETWORK_BACKEND bool "Network backend" - depends on BR2_TOOLCHAIN_HAS_THREADS - select BR2_PACKAGE_LIBXML2 + depends on BR2_PACKAGE_LIBIIO_XML_BACKEND default y help Enable the network backend of the library. -comment "IIO Network backend needs a toolchain w/ threads" +config BR2_PACKAGE_LIBIIO_USB_BACKEND + bool "USB backend" + depends on BR2_TOOLCHAIN_HAS_THREADS # from libusb + depends on BR2_PACKAGE_LIBIIO_XML_BACKEND + select BR2_PACKAGE_LIBUSB + default y + help + Enable the USB backend of the library. + +comment "The USB backend needs a toolchain w/ threads" depends on !BR2_TOOLCHAIN_HAS_THREADS +config BR2_PACKAGE_LIBIIO_SERIAL_BACKEND + bool "Serial backend" + depends on BR2_PACKAGE_LIBIIO_XML_BACKEND + select BR2_PACKAGE_LIBSERIALPORT + default y + help + Enable the serial backend of the library. + config BR2_PACKAGE_LIBIIO_IIOD bool "IIO Daemon" select BR2_PACKAGE_LIBIIO_LOCAL_BACKEND
package/libiio/libiio.hash +2 -2
@@ -1,2 +1,2 @@ -# From https://github.com/analogdevicesinc/libiio/archive/v0.6/ -sha256 efd3b4ebdba01dd2bfbdce8e222356b4fec2b96daab14f99691b5c1c9089e466 libiio-0.6.tar.gz +# From https://github.com/analogdevicesinc/libiio/archive/v0.7/ +sha256 c2b02f1cb51870db52368fdaa8087dc2a4ec43f2bc3c3514d8214952f14c3f39 libiio-0.7.tar.gz
package/libiio/libiio.mk +19 -4
@@ -4,7 +4,7 @@ # ################################################################################ -LIBIIO_VERSION = 0.6 +LIBIIO_VERSION = 0.7 LIBIIO_SITE = $(call github,analogdevicesinc,libiio,v$(LIBIIO_VERSION)) LIBIIO_INSTALL_STAGING = YES LIBIIO_LICENSE = LGPLv2.1+
@@ -12,14 +12,29 @@ LIBIIO_LICENSE_FILES = COPYING.txt LIBIIO_CONF_OPTS = -DENABLE_IPV6=ON \ -DWITH_LOCAL_BACKEND=$(if $(BR2_PACKAGE_LIBIIO_LOCAL_BACKEND),ON,OFF) \ + -DWITH_NETWORK_BACKEND=$(if $(BR2_PACKAGE_LIBIIO_NETWORK_BACKEND),ON,OFF) \ -DWITH_TESTS=$(if $(BR2_PACKAGE_LIBIIO_TESTS),ON,OFF) \ -DWITH_DOC=OFF -ifeq ($(BR2_PACKAGE_LIBIIO_NETWORK_BACKEND),y) +ifeq ($(BR2_PACKAGE_LIBIIO_XML_BACKEND),y) LIBIIO_DEPENDENCIES += libxml2 -LIBIIO_CONF_OPTS += -DWITH_NETWORK_BACKEND=ON +LIBIIO_CONF_OPTS += -DWITH_XML_BACKEND=ON else -LIBIIO_CONF_OPTS += -DWITH_NETWORK_BACKEND=OFF +LIBIIO_CONF_OPTS += -DWITH_XML_BACKEND=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBIIO_USB_BACKEND),y) +LIBIIO_DEPENDENCIES += libusb +LIBIIO_CONF_OPTS += -DWITH_USB_BACKEND=ON +else +LIBIIO_CONF_OPTS += -DWITH_USB_BACKEND=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBIIO_SERIAL_BACKEND),y) +LIBIIO_DEPENDENCIES += libserialport +LIBIIO_CONF_OPTS += -DWITH_SERIAL_BACKEND=ON +else +LIBIIO_CONF_OPTS += -DWITH_SERIAL_BACKEND=OFF endif ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y)
Signature · 1 line
2.8.1
PATCH 1/1 libiio: Bump version to 0.7
Hi Paul,
Le 05/07/2016 ? 12:27, Paul Cercueil a ?crit :
Quoted 9 lines
The two previous patches have been merged upstream, so they have been deleted here. Another patch (picked from upstream) has been added to fix the build with thread-less toolchains.
Libiio v0.7 provides two new backends, a USB backend (using libusb-1.0) and a serial backend (using libserialport).
Additionally, it is now possible to compile libiio with thread-less toolchains. In that case, thread safety is disabled.
In the CMakeLists.txt, if WITH_NETWORK_BACKEND is selected then NEED_THREADS is set to 1. But you removed the dependency on BR2_TOOLCHAIN_HAS_THREADS for BR2_PACKAGE_LIBIIO_NETWORK_BACKEND, so it revert the previous fix.
It's weird to select something that require threads support in Buildroot which is finally disabled by the build system.
CMake Warning at CMakeLists.txt:239 (message):
pthread library not found; support for threads will be disabled
Best regards,
Romain
Quoted 243 lines
Signed-off-by Paul Cercueil <[email protected]>--- ...l2-detection-try-first-the-CMake-module-f.patch | 43 ---------------------- ...t-include-pthread.h-if-NO_THREADS-is-defi.patch | 26 +++++++++++++ ...IIOD-Link-pthread-with-no-network-backend.patch | 30 --------------- package/libiio/Config.in | 31 ++++++++++++++-- package/libiio/libiio.hash | 4 +- package/libiio/libiio.mk | 23 ++++++++++-- 6 files changed, 74 insertions(+), 83 deletions(-) delete mode 100644 package/libiio/0001-cmake-libxml2-detection-try-first-the-CMake-module-f.patch create mode 100644 package/libiio/0001-lock.c-Don-t-include-pthread.h-if-NO_THREADS-is-defi.patch delete mode 100644 package/libiio/0002-IIOD-Link-pthread-with-no-network-backend.patchpackage/libiio/0001-cmake-libxml2-detection-try-first-the-CMake-module-f.patch deleted +0
-43@@ -1,43 +0,0 @@ -From b613e0fe7999cfff9efb646eb388ea1e58952e30 Mon Sep 17 00:00:00 2001 -From: Samuel Martin <[email protected]> -Date: Thu, 14 Apr 2016 12:59:27 -0400 -Subject: [PATCH] cmake: libxml2 detection: try CMake module from libxml2 - -Libxml2 >=2.9.2 provides its own CMake module, so check for it before -falling back on the CMake's module FindLibXml2.cmake. - -Updated for v0.6 by: Matt Fornero <[email protected]> - -Signed-off-by: Samuel Martin <[email protected]> -Signed-off-by: Matt Fornero <[email protected]> ---- - CMakeLists.txt | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 70f61f0..4a4209b 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -143,7 +143,18 @@ if(WITH_NETWORK_BACKEND) - endif() - - if (NEED_LIBXML2) -- include(FindLibXml2) -+ # Since libxml2-2.9.2, libxml2 provides its own LibXml2-config.cmake, with all -+ # variables correctly set. -+ # So, try first to find the CMake module provided by libxml2 package, then fallback -+ # on the CMake's FindLibXml2.cmake module (which can lack some definition, especially -+ # in static build case). -+ find_package(LibXml2 QUIET NO_MODULE) -+ if(DEFINED LIBXML2_VERSION_STRING) -+ set(LIBXML2_FOUND ON) -+ set(LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_DIRS}) -+ else() -+ include(FindLibXml2) -+ endif() - - if (NOT LIBXML2_FOUND) - message(SEND_ERROR "The selected backends require libxml2 to be installed") --- -1.7.10.4 -package/libiio/0001-lock.c-Don-t-include-pthread.h-if-NO_THREADS-is-defi.patch new file +26
-0@@ -0,0 +1,26 @@ +From d052d263600549979a6219a59e85af80eeafc6d2 Mon Sep 17 00:00:00 2001 +From: Paul Cercueil <[email protected]> +Date: Tue, 5 Jul 2016 12:12:41 +0200 +Subject: [PATCH] lock.c: Don't include <pthread.h> if NO_THREADS is defined + +Signed-off-by: Paul Cercueil <[email protected]> +--- + lock.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lock.c b/lock.c +index 39248ab..00eb9d9 100644 +--- a/lock.c ++++ b/lock.c +@@ -18,7 +18,7 @@ + + #ifdef _WIN32 + #include <windows.h> +-#else ++#elif !defined(NO_THREADS) + #include <pthread.h> + #endif + +-- +2.8.1 +package/libiio/0002-IIOD-Link-pthread-with-no-network-backend.patch deleted +0
-30@@ -1,30 +0,0 @@ -From 8dcb6c3f60123511d77b9fc7e4e22ae710e7d2f4 Mon Sep 17 00:00:00 2001 -From: Matthew Fornero <[email protected]> -Date: Wed, 8 Jun 2016 20:03:56 -0400 -Subject: [PATCH] IIOD: Link pthread with no network backend - -If iiod is built without the network backend, CMake will not link in -pthreads. Update the CMake configuration to accomodate this case. - -Signed-off-by: Matthew Fornero <[email protected]> ---- - CMakeLists.txt | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 70f61f0..20fa9f1 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -56,6 +56,9 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - if (WITH_IIOD AND NOT WITH_LOCAL_BACKEND) - message(SEND_ERROR "IIOD can only be enabled if the local backend is enabled") - endif() -+ if (WITH_IIOD) -+ set(NEED_THREADS 1) -+ endif() - endif() - - option(ENABLE_IPV6 "Define if you want to enable IPv6 support" ON) --- -1.7.10.4 -package/libiio/Config.in +27
-4@@ -1,6 +1,6 @@ config BR2_PACKAGE_LIBIIO bool "libiio" - select BR2_PACKAGE_LIBIIO_LOCAL_BACKEND if !BR2_PACKAGE_LIBIIO_NETWORK_BACKEND + select BR2_PACKAGE_LIBIIO_LOCAL_BACKEND if !BR2_PACKAGE_LIBIIO_XML_BACKEND help Libiio is a library to ease the development of software interfacing Linux Industrial I/O (IIO) devices.@@ -15,17 +15,40 @@ config BR2_PACKAGE_LIBIIO_LOCAL_BACKEND help Enable the local backend of the library. +config BR2_PACKAGE_LIBIIO_XML_BACKEND + bool "XML backend" + select BR2_PACKAGE_LIBXML2 + default y + help + Enable the XML backend of the library. + config BR2_PACKAGE_LIBIIO_NETWORK_BACKEND bool "Network backend" - depends on BR2_TOOLCHAIN_HAS_THREADS - select BR2_PACKAGE_LIBXML2 + depends on BR2_PACKAGE_LIBIIO_XML_BACKEND default y help Enable the network backend of the library. -comment "IIO Network backend needs a toolchain w/ threads" +config BR2_PACKAGE_LIBIIO_USB_BACKEND + bool "USB backend" + depends on BR2_TOOLCHAIN_HAS_THREADS # from libusb + depends on BR2_PACKAGE_LIBIIO_XML_BACKEND + select BR2_PACKAGE_LIBUSB + default y + help + Enable the USB backend of the library. + +comment "The USB backend needs a toolchain w/ threads" depends on !BR2_TOOLCHAIN_HAS_THREADS +config BR2_PACKAGE_LIBIIO_SERIAL_BACKEND + bool "Serial backend" + depends on BR2_PACKAGE_LIBIIO_XML_BACKEND + select BR2_PACKAGE_LIBSERIALPORT + default y + help + Enable the serial backend of the library. + config BR2_PACKAGE_LIBIIO_IIOD bool "IIO Daemon" select BR2_PACKAGE_LIBIIO_LOCAL_BACKENDpackage/libiio/libiio.hash +2
-2@@ -1,2 +1,2 @@ -# From https://github.com/analogdevicesinc/libiio/archive/v0.6/ -sha256 efd3b4ebdba01dd2bfbdce8e222356b4fec2b96daab14f99691b5c1c9089e466 libiio-0.6.tar.gz +# From https://github.com/analogdevicesinc/libiio/archive/v0.7/ +sha256 c2b02f1cb51870db52368fdaa8087dc2a4ec43f2bc3c3514d8214952f14c3f39 libiio-0.7.tar.gzpackage/libiio/libiio.mk +19
-4@@ -4,7 +4,7 @@ # ################################################################################ -LIBIIO_VERSION = 0.6 +LIBIIO_VERSION = 0.7 LIBIIO_SITE = $(call github,analogdevicesinc,libiio,v$(LIBIIO_VERSION)) LIBIIO_INSTALL_STAGING = YES LIBIIO_LICENSE = LGPLv2.1+@@ -12,14 +12,29 @@ LIBIIO_LICENSE_FILES = COPYING.txt LIBIIO_CONF_OPTS = -DENABLE_IPV6=ON \ -DWITH_LOCAL_BACKEND=$(if $(BR2_PACKAGE_LIBIIO_LOCAL_BACKEND),ON,OFF) \ + -DWITH_NETWORK_BACKEND=$(if $(BR2_PACKAGE_LIBIIO_NETWORK_BACKEND),ON,OFF) \ -DWITH_TESTS=$(if $(BR2_PACKAGE_LIBIIO_TESTS),ON,OFF) \ -DWITH_DOC=OFF -ifeq ($(BR2_PACKAGE_LIBIIO_NETWORK_BACKEND),y) +ifeq ($(BR2_PACKAGE_LIBIIO_XML_BACKEND),y) LIBIIO_DEPENDENCIES += libxml2 -LIBIIO_CONF_OPTS += -DWITH_NETWORK_BACKEND=ON +LIBIIO_CONF_OPTS += -DWITH_XML_BACKEND=ON else -LIBIIO_CONF_OPTS += -DWITH_NETWORK_BACKEND=OFF +LIBIIO_CONF_OPTS += -DWITH_XML_BACKEND=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBIIO_USB_BACKEND),y) +LIBIIO_DEPENDENCIES += libusb +LIBIIO_CONF_OPTS += -DWITH_USB_BACKEND=ON +else +LIBIIO_CONF_OPTS += -DWITH_USB_BACKEND=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBIIO_SERIAL_BACKEND),y) +LIBIIO_DEPENDENCIES += libserialport +LIBIIO_CONF_OPTS += -DWITH_SERIAL_BACKEND=ON +else +LIBIIO_CONF_OPTS += -DWITH_SERIAL_BACKEND=OFF endif ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y)
Cercueil
PATCH 1/1 libiio: Bump version to 0.7
Hi Romain,Le mardi 05 juillet 2016 ? 16:25 +0200, Romain Naour a ?crit?:
Quoted 22 lines
Hi Paul,
Le 05/07/2016 ? 12:27, Paul Cercueil a ?crit :
Quoted 6 lines
The two previous patches have been merged upstream, so they have been
deleted here. Another patch (picked from upstream) has been added to fix
the build with thread-less toolchains.Quoted 6 lines
Libiio v0.7 provides two new backends, a USB backend (using libusb- 1.0)
and a serial backend (using libserialport).Additionally, it is now possible to compile libiio with thread-less toolchains. In that case, thread safety is disabled.
In the CMakeLists.txt, if
WITH_NETWORK_BACKENDis selected thenNEED_THREADSis
set to 1. But you removed the dependency onBR2_TOOLCHAIN_HAS_THREADSforBR2_PACKAGE_LIBIIO_NETWORK_BACKEND, so it revert the previous fix.
Quoted 6 lines
It's weird to select something that require threads support in Buildroot which
is finally disabled by the build system.CMake Warning at CMakeLists.txt:239 (message):
? pthread library not found; support for threads will be disabled
The 'NEED_THREADS' in the CMakeLists.txt previously meant a hard dependency on pthreads for the paths that enabled it. Now with v0.7, its meaning switched to 'requires thread locking mechanisms of lock.c', and those will be no-ops with a thread-less toolchain. So despite the warning, the network backend will still compile and work fine.
Regards,
-Paul
Quoted 278 lines
Best regards,
RomainQuoted 274 lines
Signed-off-by Paul Cercueil <[email protected]>---
?...l2-detection-try-first-the-CMake-module-f.patch | 43 ----------
------------
?...t-include-pthread.h-if-NO_THREADS-is-defi.patch | 26
+++++++++++++
?...IIOD-Link-pthread-with-no-network-backend.patch | 30 ----------
-----
?package/libiio/Config.in???????????????????????????| 31
++++++++++++++--
?package/libiio/libiio.hash?????????????????????????|??4 +- ?package/libiio/libiio.mk???????????????????????????| 23
++++++++++--
?6 files changed, 74 insertions(+), 83 deletions(-) ?delete mode 100644 package/libiio/0001-cmake-libxml2-detection- try-first-the-CMake-module-f.patch
?create mode 100644 package/libiio/0001-lock.c-Don-t-include- pthread.h-if-NO_THREADS-is-defi.patch
?delete mode 100644 package/libiio/0002-IIOD-Link-pthread-with-no- network-backend.patch(quoted diff) +0
-0the-CMake-module-f.patch b/package/libiio/0001-cmake-libxml2- detection-try-first-the-CMake-module-f.patch
deleted file mode 100644
index 17fbdab..0000000
--- a/package/libiio/0001-cmake-libxml2-detection-try-first-the- CMake-module-f.patch
+++/dev/null(quoted diff) +0
-1@@ -1,43 +0,0 @@ -From b613e0fe7999cfff9efb646eb388ea1e58952e30 Mon Sep 17 00:00:002001
package/libiio/0001-cmake-libxml2-detection-try-first-the-CMake-module-f.patch deleted +0
-3-From: Samuel Martin <[email protected]> -Date: Thu, 14 Apr 2016 12:59:27 -0400 -Subject: [PATCH] cmake: libxml2 detection: try CMake module fromlibxml2
(quoted diff) +0
-2- -Libxml2 >=2.9.2 provides its own CMake module, so check for itbefore
package/libiio/0001-cmake-libxml2-detection-try-first-the-CMake-module-f.patch deleted +0
-20-falling back on the CMake's module FindLibXml2.cmake. - -Updated for v0.6 by: Matt Fornero <[email protected]> - -Signed-off-by: Samuel Martin <[email protected]> -Signed-off-by: Matt Fornero <[email protected]> ---- - CMakeLists.txt |???13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 70f61f0..4a4209b 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -143,7 +143,18 @@ if(WITH_NETWORK_BACKEND) - endif() -? - if (NEED_LIBXML2) -- include(FindLibXml2) -+ # Since libxml2-2.9.2, libxml2 provides its own LibXml2-config.cmake, with all
-+ # variables correctly set.
-+ # So, try first to find the CMake module provided by
libxml2 package, then fallback
-+ # on the CMake's FindLibXml2.cmake module (which can lack
some definition, especially
-+ # in static build case).
-+find_package(LibXml2 QUIET NO_MODULE)
-+if(DEFINED LIBXML2_VERSION_STRING)
-+set(LIBXML2_FOUND ON)
-+set(LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_DIRS})
-+else()
-+ include(FindLibXml2)
-+endif()
-?
-? if (NOTLIBXML2_FOUND)
-? message(SEND_ERROR "The selected backends require
libxml2 to be installed")
---?
-1.7.10.4(quoted diff) +0
-1-(quoted diff) +0
-0NO_THREADS-is-defi.patch b/package/libiio/0001-lock.c-Don-t- include-pthread.h-if-NO_THREADS-is-defi.patch
new file mode 100644
index 0000000..fd029ccpackage/libiio/0001-lock.c-Don-t-include-pthread.h-if- new file +0
-0NO_THREADS-is-defi.patch
package/libiio/0001-lock.c-Don-t-include-pthread.h-if- new file +1
-0@@ -0,0 +1,26 @@ +From d052d263600549979a6219a59e85af80eeafc6d2 Mon Sep 17 00:00:002001
package/libiio/0001-lock.c-Don-t-include-pthread.h-if- new file +3
-0+From: Paul Cercueil <[email protected]> +Date: Tue, 5 Jul 2016 12:12:41 +0200 +Subject: [PATCH] lock.c: Don't include <pthread.h> if NO_THREADSis defined
package/libiio/0001-lock.c-Don-t-include-pthread.h-if- new file +22
-0+ +Signed-off-by: Paul Cercueil <[email protected]> +--- + lock.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lock.c b/lock.c +index 39248ab..00eb9d9 100644 +--- a/lock.c ++++ b/lock.c +@@ -18,7 +18,7 @@ +? + #ifdef _WIN32 + #include <windows.h> +-#else ++#elif !defined(NO_THREADS) + #include <pthread.h> + #endif +? +--? +2.8.1 +(quoted diff) +0
-0backend.patch b/package/libiio/0002-IIOD-Link-pthread-with-no- network-backend.patch
deleted file mode 100644
index df11a49..0000000
--- a/package/libiio/0002-IIOD-Link-pthread-with-no-network- backend.patch
+++/dev/null(quoted diff) +0
-1@@ -1,30 +0,0 @@ -From 8dcb6c3f60123511d77b9fc7e4e22ae710e7d2f4 Mon Sep 17 00:00:002001
package/libiio/0002-IIOD-Link-pthread-with-no-network-backend.patch deleted +0
-5-From: Matthew Fornero <[email protected]> -Date: Wed, 8 Jun 2016 20:03:56 -0400 -Subject: [PATCH] IIOD: Link pthread with no network backend - -If iiod is built without the network backend, CMake will not linkin
package/libiio/0002-IIOD-Link-pthread-with-no-network-backend.patch deleted +0
-14-pthreads. Update the CMake configuration to accomodate this case. - -Signed-off-by: Matthew Fornero <[email protected]> ---- - CMakeLists.txt |????3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 70f61f0..20fa9f1 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -56,6 +56,9 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") -? if (WITH_IIOD AND NOT WITH_LOCAL_BACKEND) -? message(SEND_ERROR "IIOD can only be enabled ifthe local backend is enabled")
-?endif()
-+ if (WITH_IIOD)
-+set(NEED_THREADS 1)
-+endif()
-endif()
-?
-option(ENABLE_IPV6 "Define if you want to enable IPv6 support" ON)
---?
-1.7.10.4(quoted diff) +0
-1-package/libiio/Config.in +0
-0@@ -1,6 +1,6 @@?config
BR2_PACKAGE_LIBIIO
? bool "libiio"package/libiio/Config.in +0
-1- select BR2_PACKAGE_LIBIIO_LOCAL_BACKEND if!BR2_PACKAGE_LIBIIO_NETWORK_BACKEND
package/libiio/Config.in +1
-0+ select BR2_PACKAGE_LIBIIO_LOCAL_BACKEND if!BR2_PACKAGE_LIBIIO_XML_BACKEND
? help
? ??Libiio is a library to ease the development of software
? ??interfacing Linux Industrial I/O (IIO) devices.package/libiio/Config.in +0
-0@@ -15,17 +15,40 @@ config BR2_PACKAGE_LIBIIO_LOCAL_BACKEND? help
? ??Enable the local backend of the library.
?package/libiio/Config.in +7
-0+config BR2_PACKAGE_LIBIIO_XML_BACKEND + bool "XML backend" + select BR2_PACKAGE_LIBXML2 + default y + help + ??Enable the XML backend of the library. +?config
BR2_PACKAGE_LIBIIO_NETWORK_BACKEND
? bool "Network backend"package/libiio/Config.in +1
-2- depends on BR2_TOOLCHAIN_HAS_THREADS - select BR2_PACKAGE_LIBXML2 + depends on BR2_PACKAGE_LIBIIO_XML_BACKEND? default y
? help
? ??Enable the network backend of the library.
?package/libiio/Config.in +10
-1-comment "IIO Network backend needs a toolchain w/ threads" +config BR2_PACKAGE_LIBIIO_USB_BACKEND + bool "USB backend" + depends on BR2_TOOLCHAIN_HAS_THREADS # from libusb + depends on BR2_PACKAGE_LIBIIO_XML_BACKEND + select BR2_PACKAGE_LIBUSB + default y + help + ??Enable the USB backend of the library. + +comment "The USB backend needs a toolchain w/ threads"? depends on !BR2_TOOLCHAIN_HAS_THREADS
?package/libiio/Config.in +8
-0+config BR2_PACKAGE_LIBIIO_SERIAL_BACKEND + bool "Serial backend" + depends on BR2_PACKAGE_LIBIIO_XML_BACKEND + select BR2_PACKAGE_LIBSERIALPORT + default y + help + ??Enable the serial backend of the library. +?config
BR2_PACKAGE_LIBIIO_IIOD
? bool "IIO Daemon"
? selectBR2_PACKAGE_LIBIIO_LOCAL_BACKENDpackage/libiio/libiio.hash +0
-2@@ -1,2 +1,2 @@ -# From https://github.com/analogdevicesinc/libiio/archive/v0.6/ -sha256??efd3b4ebdba01dd2bfbdce8e222356b4fec2b96daab14f99691b5c1c9089e466????libiio-0.6.tar.gz
package/libiio/libiio.hash +2
-0+# From https://github.com/analogdevicesinc/libiio/archive/v0.7/ +sha256 c2b02f1cb51870db52368fdaa8087dc2a4ec43f2bc3c3514d821
4952f14c3f39libiio-0.7.tar.gzpackage/libiio/libiio.mk +0
-0@@ -4,7 +4,7 @@?# ?##################################################################
##############
?package/libiio/libiio.mk +1
-1-LIBIIO_VERSION = 0.6 +LIBIIO_VERSION = 0.7?LIBIIO_SITE = $(call github,analogdevicesinc,libiio,v$(LIBIIO_VERSION)) ?LIBIIO_INSTALL_STAGING = YES ?LIBIIO_LICENSE = LGPLv2.1+
package/libiio/libiio.mk +0
-0@@ -12,14 +12,29 @@ LIBIIO_LICENSE_FILES = COPYING.txt?
?LIBIIO_CONF_OPTS = -DENABLE_IPV6=ON \
? -DWITH_LOCAL_BACKEND=$(if
$(BR2_PACKAGE_LIBIIO_LOCAL_BACKEND),ON,OFF) \package/libiio/libiio.mk +1
-0+ -DWITH_NETWORK_BACKEND=$(if$(BR2_PACKAGE_LIBIIO_NETWORK_BACKEND),ON,OFF) \
? -DWITH_TESTS=$(if $(BR2_PACKAGE_LIBIIO_TESTS),ON,OFF) \
? -DWITH_DOC=OFF
?package/libiio/libiio.mk +1
-1-ifeq ($(BR2_PACKAGE_LIBIIO_NETWORK_BACKEND),y) +ifeq ($(BR2_PACKAGE_LIBIIO_XML_BACKEND),y)?LIBIIO_DEPENDENCIES += libxml2
package/libiio/libiio.mk +1
-1-LIBIIO_CONF_OPTS += -DWITH_NETWORK_BACKEND=ON +LIBIIO_CONF_OPTS += -DWITH_XML_BACKEND=ON?else
package/libiio/libiio.mk +11
-1-LIBIIO_CONF_OPTS += -DWITH_NETWORK_BACKEND=OFF +LIBIIO_CONF_OPTS += -DWITH_XML_BACKEND=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBIIO_USB_BACKEND),y) +LIBIIO_DEPENDENCIES += libusb +LIBIIO_CONF_OPTS += -DWITH_USB_BACKEND=ON +else +LIBIIO_CONF_OPTS += -DWITH_USB_BACKEND=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBIIO_SERIAL_BACKEND),y)
Quoted 10 lines
Quoted 8 lines
package/libiio/libiio.mk +4
-0+LIBIIO_DEPENDENCIES += libserialport +LIBIIO_CONF_OPTS += -DWITH_SERIAL_BACKEND=ON +else +LIBIIO_CONF_OPTS += -DWITH_SERIAL_BACKEND=OFF?endif
?
?ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160705/92cd63b7/attachment.asc>
PATCH 1/1 libiio: Bump version to 0.7
Hi Paul,
Le 05/07/2016 ? 16:35, Cercueil, Paul a ?crit :
Quoted 27 lines
Hi Romain,Le mardi 05 juillet 2016 ? 16:25 +0200, Romain Naour a ?crit :
Quoted 26 lines
Hi Paul,
Le 05/07/2016 ? 12:27, Paul Cercueil a ?crit :
Quoted 6 lines
The two previous patches have been merged upstream, so they have been
deleted here. Another patch (picked from upstream) has been added to fix
the build with thread-less toolchains.Quoted 6 lines
Libiio v0.7 provides two new backends, a USB backend (using libusb- 1.0)
and a serial backend (using libserialport).Additionally, it is now possible to compile libiio with thread-less toolchains. In that case, thread safety is disabled.
In the CMakeLists.txt, if
WITH_NETWORK_BACKENDis selected thenNEED_THREADSis
set to 1. But you removed the dependency onBR2_TOOLCHAIN_HAS_THREADSforBR2_PACKAGE_LIBIIO_NETWORK_BACKEND, so it revert the previous fix.It's weird to select something that require threads support in Buildroot which
is finally disabled by the build system.
Quoted 8 lines
Quoted 2 lines
CMake Warning at CMakeLists.txt:239 (message):
pthread library not found; support for threads will be disabledThe '
NEED_THREADS' in the CMakeLists.txt previously meant a hard dependency on pthreads for the paths that enabled it. Now with v0.7, its meaning switched to 'requires thread locking mechanisms oflock.c', and those will be no-ops with a thread-less toolchain. So despite the warning, the network backend will still compile and work fine.
Ok, thanks for the explanation :)
Best regards,
Romain
Quoted 6 lines
Regards,
-PaulQuoted 1 line
Thomas Petazzoni
AppliedPATCH 1/1 libiio: Bump version to 0.7
In reply to Paul CercueilHello,
Quoted 11 lines · Paul Cercueil
The two previous patches have been merged upstream, so they have been deleted here. Another patch (picked from upstream) has been added to fix the build with thread-less toolchains.
Libiio v0.7 provides two new backends, a USB backend (using libusb-1.0) and a serial backend (using libserialport).
Additionally, it is now possible to compile libiio with thread-less toolchains. In that case, thread safety is disabled.
Signed-off-by Paul Cercueil <[email protected]>
Quoted 11 lines
--- ...l2-detection-try-first-the-CMake-module-f.patch | 43 ---------------------- ...t-include-pthread.h-if-NO_THREADS-is-defi.patch | 26 +++++++++++++ ...IIOD-Link-pthread-with-no-network-backend.patch | 30 --------------- package/libiio/Config.in | 31 ++++++++++++++-- package/libiio/libiio.hash | 4 +- package/libiio/libiio.mk | 23 ++++++++++-- 6 files changed, 74 insertions(+), 83 deletions(-) delete mode 100644 package/libiio/0001-cmake-libxml2-detection-try-first-the-CMake-module-f.patch create mode 100644 package/libiio/0001-lock.c-Don-t-include-pthread.h-if-NO_THREADS-is-defi.patch delete mode 100644 package/libiio/0002-IIOD-Link-pthread-with-no-network-backend.patch
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com