From: Michael Nosthoff via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: Semyon Kolganov <semenak94@mail.ru>
Subject: [Buildroot] [PATCH] package/fmt: fix 32-bit builds
Date: Wed, 8 Jul 2026 09:23:52 +0200 [thread overview]
Message-ID: <20260708072408.19685-2-buildroot@heine.tech> (raw)
Provide a fallback when native __int128 is not available.
Fixes:
https://autobuild.buildroot.org/results/39df217ad5a1036d5e606ae0e8291d885e9d0e1a/
Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
---
...001-fix-fallback-uint128-bitwise-not.patch | 42 +++++++++++++++++++
1 file changed, 42 insertions(+)
create mode 100644 package/fmt/0001-fix-fallback-uint128-bitwise-not.patch
diff --git a/package/fmt/0001-fix-fallback-uint128-bitwise-not.patch b/package/fmt/0001-fix-fallback-uint128-bitwise-not.patch
new file mode 100644
index 0000000000..123c43ab2c
--- /dev/null
+++ b/package/fmt/0001-fix-fallback-uint128-bitwise-not.patch
@@ -0,0 +1,42 @@
+From 588b3a0f8f6a8bcf2a959cae882d5b2703e86737 Mon Sep 17 00:00:00 2001
+From: Vinay Kumar <vkslog69@gmail.com>
+Date: Thu, 18 Jun 2026 12:22:12 +0530
+Subject: [PATCH] Fix fallback uint128 bitwise not (#4813)
+
+Upstream: https://github.com/fmtlib/fmt/commit/588b3a0f8f6a8bcf2a959cae882d5b2703e86737
+Signed-off-by: Michael Nosthoff <buildroot@heine.tech>
+---
+ 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 5044befdd863..570627922c62 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 9a2258d5921f..8c2670a19fc3 100644
+--- a/test/format-test.cc
++++ b/test/format-test.cc
+@@ -82,6 +82,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);
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next reply other threads:[~2026-07-08 7:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 7:23 Michael Nosthoff via buildroot [this message]
2026-07-10 16:42 ` [Buildroot] [PATCH] package/fmt: fix 32-bit builds Julien Olivain via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260708072408.19685-2-buildroot@heine.tech \
--to=buildroot@buildroot.org \
--cc=buildroot@heine.tech \
--cc=semenak94@mail.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.