package/tinycbor: bump to version 0.6.1
PATCH 1/1 package/tinycbor: bump to version 0.6.1
This is nominally a bugfix release which now also includes the patch we previously backported, so we can remove it.
However, it also introduced some breakage:
- Builds with older toolchains (like br-arm-full-static, GCC 9) fail because the introduction of C23 [[fallthrough]] to the code was not properly gated on compiler support.
- Compiling for x86 without SSE2 support (e.g. with bootlin-x86-i686-musl) fails because the check for native half-with float arithmetic support on the target was not strict enough.
Import unreleased upstream patches that fix these issues.
Release notes: https://github.com/intel/tinycbor/releases/tag/v0.6.1
--- ...CC-11-fallthrough-is-supported-but-n.patch | 55 +++++++++++++++++ .../0001-Makefile-add-DISABLE_WERROR.patch | 44 -------------- .../0002-fix-build-on-i386-without-SSE2.patch | 59 +++++++++++++++++++ package/tinycbor/tinycbor.hash | 2 +- package/tinycbor/tinycbor.mk | 2 +- 5 files changed, 116 insertions(+), 46 deletions(-) create mode 100644 package/tinycbor/0001-Fix-build-with-GCC-11-fallthrough-is-supported-but-n.patch delete mode 100644 package/tinycbor/0001-Makefile-add-DISABLE_WERROR.patch create mode 100644 package/tinycbor/0002-fix-build-on-i386-without-SSE2.patch
package/tinycbor/0001-Fix-build-with-GCC-11-fallthrough-is-supported-but-n.patch new file +55 -0
@@ -0,0 +1,55 @@ +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-Makefile-add-DISABLE_WERROR.patch deleted +0 -44
44 lines not on this page · raw message
package/tinycbor/0002-fix-build-on-i386-without-SSE2.patch new file +59 -0
59 lines not on this page · raw message
package/tinycbor/tinycbor.hash +1 -1
@@ -1,3 +1,3 @@ # Locally computed: -sha256 512e2c9fce74f60ef9ed3af59161e905f9e19f30a52e433fc55f39f4c70d27e4 tinycbor-0.6.0.tar.gz +sha256 0f9944496d1143935e9c996bc6233ca0dd5451299def33ef400a409942f8f34b tinycbor-0.6.1.tar.gz sha256 3c6ba0b5bfa7830505301ffb336a17b0748e0d61c4d34216e9dc98f10e40395e LICENSE
package/tinycbor/tinycbor.mk +1 -1
@@ -4,7 +4,7 @@ # ################################################################################ -TINYCBOR_VERSION = 0.6.0 +TINYCBOR_VERSION = 0.6.1 TINYCBOR_SITE = $(call github,intel,tinycbor,v$(TINYCBOR_VERSION)) TINYCBOR_LICENSE = MIT TINYCBOR_LICENSE_FILES = LICENSE
Signature · 6 lines
2.50.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 18 lines · On Tue, 19 Aug 2025 23:32:59 +0200 Florian Larysch <[email protected]> wrote:
This is nominally a bugfix release which now also includes the patch we previously backported, so we can remove it.
However, it also introduced some breakage:
- Builds with older toolchains (like br-arm-full-static, GCC 9) fail because the introduction of C23 [[fallthrough]] to the code was not properly gated on compiler support.
- Compiling for x86 without SSE2 support (e.g. with bootlin-x86-i686-musl) fails because the check for native half-with float arithmetic support on the target was not strict enough.
Import unreleased upstream patches that fix these issues.
Release notes: https://github.com/intel/tinycbor/releases/tag/v0.6.1
Signed-off-by Florian Larysch <[email protected]>
Quoted 10 lines
--- ...CC-11-fallthrough-is-supported-but-n.patch | 55 +++++++++++++++++ .../0001-Makefile-add-DISABLE_WERROR.patch | 44 -------------- .../0002-fix-build-on-i386-without-SSE2.patch | 59 +++++++++++++++++++ package/tinycbor/tinycbor.hash | 2 +- package/tinycbor/tinycbor.mk | 2 +- 5 files changed, 116 insertions(+), 46 deletions(-) create mode 100644 package/tinycbor/0001-Fix-build-with-GCC-11-fallthrough-is-supported-but-n.patch delete mode 100644 package/tinycbor/0001-Makefile-add-DISABLE_WERROR.patch create mode 100644 package/tinycbor/0002-fix-build-on-i386-without-SSE2.patch
Thanks for this patch. Even though it's a bug fix only release, it seems to introduce some potential breakage, and we haven't had any failures of tinycbor in our autobuilders for the past 3 years, so I applied to next. Just a minor nit: you hard forgotten to update our .checkpackageignore file which was ignoring an issue with patch 0001 that you're deleting.
Thanks a lot for this contribution!
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 4 lines · Thomas Petazzoni via buildroot
Thanks for this patch. Even though it's a bug fix only release, it seems to introduce some potential breakage, and we haven't had any failures of tinycbor in our autobuilders for the past 3 years, so I applied to next.
Makes sense, I've also been a bit apprehensive about this.
Quoted 3 lines
Just a minor nit: you hard forgotten to update our .checkpackageignore file which was ignoring an issue with patch 0001 that you're deleting.
Oh, I wasn't even aware this existed. Thanks for pointing it out!
Florian
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot