package/tinycbor: bump to v7.0
PATCH 1/1 package/tinycbor: bump to v7.0
Update tinycbor to the latest version. This release migrates from a hand-written Makefile to CMake, which required a number of patches to restore parity with the old system:
- Fix building on toolchains without C++ support
- Keep installing the json2cbor command line tool
Also building on GCC versions older than 11 was fixed and subsequently broken again, so this requires a refreshed version of the patch that was already present for 0.6.1.
Changelog: https://github.com/intel/tinycbor/releases/tag/v7.0
--- ...CC-11-fallthrough-is-supported-but-n.patch | 55 ---------------- package/tinycbor/0001-install-json2cbor.patch | 29 +++++++++ ...ompilersupport-fix-build-with-GCC-11.patch | 41 ++++++++++++ .../0002-fix-build-on-i386-without-SSE2.patch | 59 ------------------ ...-depend-on-C-compiler-for-main-build.patch | 62 +++++++++++++++++++ package/tinycbor/tinycbor.hash | 2 +- package/tinycbor/tinycbor.mk | 31 +--------- 7 files changed, 135 insertions(+), 144 deletions(-) delete mode 100644 package/tinycbor/0001-Fix-build-with-GCC-11-fallthrough-is-supported-but-n.patch create mode 100644 package/tinycbor/0001-install-json2cbor.patch create mode 100644 package/tinycbor/0002-compilersupport-fix-build-with-GCC-11.patch delete mode 100644 package/tinycbor/0002-fix-build-on-i386-without-SSE2.patch create mode 100644 package/tinycbor/0003-CMake-don-t-depend-on-C-compiler-for-main-build.patch
package/tinycbor/0001-Fix-build-with-GCC-11-fallthrough-is-supported-but-n.patch deleted +0 -55
@@ -1,55 +0,0 @@ -From 45e4641059709862b4e46f3608d140337566334b Mon Sep 17 00:00:00 2001 -From: Thiago Macieira <[email protected]> -Date: Wed, 2 Apr 2025 08:39:04 -0700 -Subject: [PATCH] Fix build with GCC < 11: [[fallthrough]] is supported but not - allowed in C - -I think GCC says `__has_cpp_attribute(fallthrough)` is true because C++ -supports it (it means "has C++ attribute"), but that doesn't apply to -the C language. This causes a compilation error: - -``` -compilersupport_p.h:57:41: error: expected expression before '[' token - 57 | # define CBOR_FALLTHROUGH [[fallthrough]] - | ^ -cborparser.c:225:13: note: in expansion of macro 'CBOR_FALLTHROUGH' - 225 | CBOR_FALLTHROUGH; - | ^~~~~~~~~~~~~~~~ -``` - -Instead, we should use the C23 `__has_c_attribute` to detect the C -attribute. - -Fixes #293. - -Signed-off-by: Thiago Macieira <[email protected]> - -Upstream: https://github.com/intel/tinycbor/commit/45e4641059709862b4e46f3608d140337566334b -Signed-off-by: Florian Larysch <[email protected]> ---- - src/compilersupport_p.h | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/compilersupport_p.h b/src/compilersupport_p.h -index c91ea93..9251799 100644 ---- a/src/compilersupport_p.h -+++ b/src/compilersupport_p.h -@@ -52,10 +52,14 @@ - # define cbor_static_assert(x) ((void)sizeof(char[2*!!(x) - 1])) - #endif - --#if defined(__has_cpp_attribute) // C23 and C++17 -+#if defined(__has_cpp_attribute) && defined(__cplusplus) // C++17 - # if __has_cpp_attribute(fallthrough) - # define CBOR_FALLTHROUGH [[fallthrough]] - # endif -+#elif defined(__has_c_attribute) && !defined(__cplusplus) // C23 -+# if __has_c_attribute(fallthrough) -+# define CBOR_FALLTHROUGH [[fallthrough]] -+# endif - #endif - #ifndef CBOR_FALLTHROUGH - # ifdef __GNUC__ --- -2.50.1 -
package/tinycbor/0001-install-json2cbor.patch new file +29 -0
@@ -0,0 +1,29 @@ +From c2c569fbef704685ce62d45fb7b20a804f45e9f3 Mon Sep 17 00:00:00 2001 +From: Florian Larysch <[email protected]> +Date: Mon, 13 Apr 2026 21:57:03 +0200 +Subject: [PATCH] install json2cbor + +The old Make-based build system installed json2cbor during "make +install" if it has been built. However, this behavior got dropped during +the CMake migration, causing this tool to be missing by default. Restore +the old behavior. + +Signed-off-by: Florian Larysch <[email protected]> +Upstream: https://github.com/intel/tinycbor/commit/c2c569fbef704685ce62d45fb7b20a804f45e9f3 +--- + tools/json2cbor/CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tools/json2cbor/CMakeLists.txt b/tools/json2cbor/CMakeLists.txt +index 41892a3..a873114 100644 +--- a/tools/json2cbor/CMakeLists.txt ++++ b/tools/json2cbor/CMakeLists.txt +@@ -6,4 +6,5 @@ if(LIBCJSON_FOUND) + tinycbor_add_executable(json2cbor json2cbor.c) + target_include_directories(json2cbor SYSTEM PUBLIC ${LIBCJSON_INCLUDE_DIRS}) + target_link_libraries(json2cbor ${LIBCJSON_LIBRARIES}) ++ install(TARGETS json2cbor) + endif() +-- +2.53.0 +
package/tinycbor/0002-compilersupport-fix-build-with-GCC-11.patch new file +41 -0
41 lines not on this page · raw message
package/tinycbor/0002-fix-build-on-i386-without-SSE2.patch deleted +0 -59
59 lines not on this page · raw message
package/tinycbor/0003-CMake-don-t-depend-on-C-compiler-for-main-build.patch new file +62 -0
62 lines not on this page · raw message
package/tinycbor/tinycbor.hash +1 -1
@@ -1,3 +1,3 @@ # Locally computed: -sha256 0f9944496d1143935e9c996bc6233ca0dd5451299def33ef400a409942f8f34b tinycbor-0.6.1.tar.gz +sha256 8b1b76001b9f987677f2ea7aa814fba1f810ff6cbbffa62ea3bac612c55b1a56 tinycbor-7.0.tar.gz sha256 3c6ba0b5bfa7830505301ffb336a17b0748e0d61c4d34216e9dc98f10e40395e LICENSE
package/tinycbor/tinycbor.mk +2 -29
@@ -4,42 +4,15 @@ # ################################################################################ -TINYCBOR_VERSION = 0.6.1 +TINYCBOR_VERSION = 7.0 TINYCBOR_SITE = $(call github,intel,tinycbor,v$(TINYCBOR_VERSION)) TINYCBOR_LICENSE = MIT TINYCBOR_LICENSE_FILES = LICENSE -TINYCBOR_DEPENDENCIES = host-pkgconf TINYCBOR_INSTALL_STAGING = YES ifeq ($(BR2_PACKAGE_CJSON),y) TINYCBOR_DEPENDENCIES += cjson endif -TINYCBOR_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) DISABLE_WERROR=1 V=1 prefix=/usr - -ifeq ($(BR2_STATIC_LIBS),y) -TINYCBOR_MAKE_OPTS += BUILD_STATIC=1 BUILD_SHARED=0 -else ifeq ($(BR2_SHARED_STATIC_LIBS),y) -TINYCBOR_MAKE_OPTS += BUILD_STATIC=1 BUILD_SHARED=1 -else ifeq ($(BR2_SHARED_LIBS),y) -TINYCBOR_MAKE_OPTS += BUILD_STATIC=0 BUILD_SHARED=1 -endif - -# disabled parallel build because of build failures while -# producing the .config file -define TINYCBOR_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE1) $(TINYCBOR_MAKE_OPTS) -C $(@D) -endef - -define TINYCBOR_INSTALL_STAGING_CMDS - $(TARGET_MAKE_ENV) $(MAKE) $(TINYCBOR_MAKE_OPTS) -C $(@D) \ - DESTDIR=$(STAGING_DIR) install -endef - -define TINYCBOR_INSTALL_TARGET_CMDS - $(TARGET_MAKE_ENV) $(MAKE) $(TINYCBOR_MAKE_OPTS) -C $(@D) \ - DESTDIR=$(TARGET_DIR) install -endef - -$(eval $(generic-package)) +$(eval $(cmake-package))
Signature · 6 lines
2.53.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 7 lines · Florian Larysch
Update tinycbor to the latest version. This release migrates from a hand-written
Makefileto CMake, which required a number of patches to restore parity with the old system:- Fix building on toolchains without C++ support
- Keep installing the json2cbor command line tool
Quoted 6 lines
Also building on GCC versions older than 11 was fixed and subsequently broken again, so this requires a refreshed version of the patch that was already present for 0.6.1.
Changelog: https://github.com/intel/tinycbor/releases/tag/v7.0
Signed-off-by Florian Larysch <[email protected]>
Applied to master, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot