From: Ross Burton <ross.burton@arm.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] fmt: fix build with GCC 9.4
Date: Mon, 20 Jan 2025 11:45:20 +0000 [thread overview]
Message-ID: <20250120114520.2836036-1-ross.burton@arm.com> (raw)
fmt-native is needed to build ccache-native, and the compile fails on
hosts with GCC 9.4 (such as Ubuntu 20.04). Backport a patch to fix this
issue.
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
.../recipes-devtools/fmt/files/fix-gcc9.patch | 26 +++++++++++++++++++
meta/recipes-devtools/fmt/fmt_11.1.1.bb | 3 ++-
2 files changed, 28 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-devtools/fmt/files/fix-gcc9.patch
diff --git a/meta/recipes-devtools/fmt/files/fix-gcc9.patch b/meta/recipes-devtools/fmt/files/fix-gcc9.patch
new file mode 100644
index 00000000000..1d67f7094de
--- /dev/null
+++ b/meta/recipes-devtools/fmt/files/fix-gcc9.patch
@@ -0,0 +1,26 @@
+From 5f0572acdca120e11f6d810765d7a6a3c593fcbb Mon Sep 17 00:00:00 2001
+From: Victor Zverovich <viz@meta.com>
+Date: Sat, 18 Jan 2025 09:00:22 -0800
+Subject: [PATCH] Workaround a compilation error on gcc 9.4
+
+Upstream-Status: Backport [5f0572acdca120e11f6d810765d7a6a3c593fcbb]
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+---
+ include/fmt/format.h | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/include/fmt/format.h b/include/fmt/format.h
+index 9cd523a9e6a5..4466b4f4d24b 100644
+--- a/include/fmt/format.h
++++ b/include/fmt/format.h
+@@ -227,7 +227,9 @@ FMT_CONSTEXPR inline void abort_fuzzing_if(bool condition) {
+ #if defined(FMT_USE_STRING_VIEW)
+ template <typename Char> using std_string_view = std::basic_string_view<Char>;
+ #else
+-template <typename T> struct std_string_view {};
++template <typename Char> struct std_string_view {
++ operator basic_string_view<Char>() const;
++};
+ #endif
+
+ template <typename Char, Char... C> struct string_literal {
diff --git a/meta/recipes-devtools/fmt/fmt_11.1.1.bb b/meta/recipes-devtools/fmt/fmt_11.1.1.bb
index a99a377ad4a..cfacd81a11a 100644
--- a/meta/recipes-devtools/fmt/fmt_11.1.1.bb
+++ b/meta/recipes-devtools/fmt/fmt_11.1.1.bb
@@ -4,7 +4,8 @@ HOMEPAGE = "https://fmt.dev"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b9257785fc4f3803a4b71b76c1412729"
-SRC_URI = "git://github.com/fmtlib/fmt;branch=master;protocol=https"
+SRC_URI = "git://github.com/fmtlib/fmt;branch=master;protocol=https \
+ file://fix-gcc9.patch"
SRCREV = "e3ddede6c4ee818825c4e5a6dfa1d384860c27d9"
S = "${WORKDIR}/git"
--
2.43.0
reply other threads:[~2025-01-20 11:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250120114520.2836036-1-ross.burton@arm.com \
--to=ross.burton@arm.com \
--cc=openembedded-core@lists.openembedded.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox