From: Alexander Kanavin Date: Mon, 6 Jul 2026 17:16:24 +0000 (+0200) Subject: fmt: upgrade 12.1.0 -> 12.2.0 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3336a94097f57485e4b06e91e7bddd5fdef99e80;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git fmt: upgrade 12.1.0 -> 12.2.0 License-Update: clarify presence of fmt exception: https://github.com/fmtlib/fmt/commit/91d1aced0a846161135310249664506b4a56e196 Backport a patch to address 32 bit x86 fails (which do not have a native int128 type). Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-devtools/fmt/fmt/0001-Fix-fallback-uint128-bitwise-not-4813.patch b/meta/recipes-devtools/fmt/fmt/0001-Fix-fallback-uint128-bitwise-not-4813.patch new file mode 100644 index 00000000000..ef5c6e9f82f --- /dev/null +++ b/meta/recipes-devtools/fmt/fmt/0001-Fix-fallback-uint128-bitwise-not-4813.patch @@ -0,0 +1,42 @@ +From d838c8c7923730afb751350ecac2b169256f1445 Mon Sep 17 00:00:00 2001 +From: Vinay Kumar +Date: Thu, 18 Jun 2026 12:22:12 +0530 +Subject: [PATCH] Fix fallback uint128 bitwise not (#4813) + +Upstream-Status: Backport [https://github.com/fmtlib/fmt/commit/588b3a0f8f6a8bcf2a959cae882d5b2703e86737] +Signed-off-by: Alexander Kanavin +--- + include/fmt/format.h | 3 +++ + test/format-test.cc | 5 +++++ + 2 files changed, 8 insertions(+) + +diff --git a/include/fmt/format.h b/include/fmt/format.h +index f33c8b87..ca95f6df 100644 +--- a/include/fmt/format.h ++++ b/include/fmt/format.h +@@ -326,6 +326,9 @@ class uint128 { + -> uint128 { + return {lhs.hi_ & rhs.hi_, lhs.lo_ & rhs.lo_}; + } ++ friend constexpr auto operator~(const uint128& n) -> uint128 { ++ return {~n.hi_, ~n.lo_}; ++ } + friend FMT_CONSTEXPR auto operator+(const uint128& lhs, const uint128& rhs) + -> uint128 { + auto result = uint128(lhs); +diff --git a/test/format-test.cc b/test/format-test.cc +index 61a53c72..7e48b751 100644 +--- a/test/format-test.cc ++++ b/test/format-test.cc +@@ -81,6 +81,11 @@ TEST(uint128_test, minus) { + EXPECT_EQ(n - 2, 40); + } + ++TEST(uint128_test, bitwise_not) { ++ auto n = ~uint128(0x123456789abcdef0, 0x0fedcba987654321); ++ EXPECT_EQ(n, uint128(0xedcba9876543210f, 0xf0123456789abcde)); ++} ++ + TEST(uint128_test, plus_assign) { + auto n = uint128(32); + n += uint128(10); diff --git a/meta/recipes-devtools/fmt/fmt/0001-Workaround-an-ABI-issue-in-spdlog.patch b/meta/recipes-devtools/fmt/fmt/0001-Workaround-an-ABI-issue-in-spdlog.patch index 442506f8345..afae644d490 100644 --- a/meta/recipes-devtools/fmt/fmt/0001-Workaround-an-ABI-issue-in-spdlog.patch +++ b/meta/recipes-devtools/fmt/fmt/0001-Workaround-an-ABI-issue-in-spdlog.patch @@ -1,4 +1,4 @@ -From 32f4a4a634c99d4e00cc6149786a9180ad651f76 Mon Sep 17 00:00:00 2001 +From 6ee6b54766c50ae8df9478efd91075543e89f66e Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Sat, 22 Mar 2025 06:57:04 -0700 Subject: [PATCH] Workaround an ABI issue in spdlog @@ -10,10 +10,10 @@ Signed-off-by: Khem Raj 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h -index 4a653007..82f80efd 100644 +index 5044befd..f33c8b87 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h -@@ -793,7 +793,9 @@ enum { inline_buffer_size = 500 }; +@@ -774,7 +774,9 @@ enum { inline_buffer_size = 500 }; * converted to `std::string` with `to_string(out)`. */ template { private: T store_[SIZE]; -@@ -2746,7 +2748,7 @@ class bigint { +@@ -2769,7 +2771,7 @@ class bigint { } public: diff --git a/meta/recipes-devtools/fmt/fmt_12.1.0.bb b/meta/recipes-devtools/fmt/fmt_12.2.0.bb similarity index 60% rename from meta/recipes-devtools/fmt/fmt_12.1.0.bb rename to meta/recipes-devtools/fmt/fmt_12.2.0.bb index 22cab6f1382..ca8fcb66ecb 100644 --- a/meta/recipes-devtools/fmt/fmt_12.1.0.bb +++ b/meta/recipes-devtools/fmt/fmt_12.2.0.bb @@ -1,14 +1,16 @@ SUMMARY = "open-source formatting library for C++" DESCRIPTION = "{fmt} is an open-source formatting library for C++. It can be used as a safe and fast alternative to (s)printf and iostreams." HOMEPAGE = "https://fmt.dev" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=b9257785fc4f3803a4b71b76c1412729" +LICENSE = "MIT-with-fmt-exception" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6ec080902ed8f82f5a97ed13e8042634 \ + file://doc/LICENSE-exception;md5=b9257785fc4f3803a4b71b76c1412729" -SRC_URI = "git://github.com/fmtlib/fmt;branch=master;protocol=https;tag=${PV} \ +SRC_URI = "git://github.com/fmtlib/fmt;branch=main;protocol=https;tag=${PV} \ file://0001-Workaround-an-ABI-issue-in-spdlog.patch \ file://run-ptest \ + file://0001-Fix-fallback-uint128-bitwise-not-4813.patch \ " -SRCREV = "407c905e45ad75fc29bf0f9bb7c5c2fd3475976f" +SRCREV = "1be298e1bd68957e4cd352e1f676f00e07dcfb57" inherit cmake ptest