diff mbox series

[meta-oe] libcereal: Fix build with clang-19

Message ID 20240911012803.2929215-1-raj.khem@gmail.com
State New
Headers show
Series [meta-oe] libcereal: Fix build with clang-19 | expand

Commit Message

Khem Raj Sept. 11, 2024, 1:28 a.m. UTC
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...-Wmissing-template-arg-list-after-te.patch | 41 +++++++++++++++++++
 .../libcereal/libcereal_1.3.2.bb              |  1 +
 2 files changed, 42 insertions(+)
 create mode 100644 meta-oe/recipes-support/libcereal/files/0001-Fix-instances-of-Wmissing-template-arg-list-after-te.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/libcereal/files/0001-Fix-instances-of-Wmissing-template-arg-list-after-te.patch b/meta-oe/recipes-support/libcereal/files/0001-Fix-instances-of-Wmissing-template-arg-list-after-te.patch
new file mode 100644
index 0000000000..86ee6902f2
--- /dev/null
+++ b/meta-oe/recipes-support/libcereal/files/0001-Fix-instances-of-Wmissing-template-arg-list-after-te.patch
@@ -0,0 +1,41 @@ 
+From 395cd70a8c28a4ea408a227d745fe20ed8af9105 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 10 Sep 2024 18:11:40 -0700
+Subject: [PATCH] Fix instances of
+ -Wmissing-template-arg-list-after-template-kw.
+
+Clang has a new warning that requires a template argument list after using
+the template keyword. Remove uses of the template keyword when we're not
+specifying types.
+
+See https://github.com/llvm/llvm-project/issues/94194 for the upstream
+clang changes
+
+Upstream-Status: Submitted [https://github.com/USCiLab/cereal/pull/835]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ include/cereal/types/tuple.hpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/cereal/types/tuple.hpp b/include/cereal/types/tuple.hpp
+index 80c68075..5c79eca9 100644
+--- a/include/cereal/types/tuple.hpp
++++ b/include/cereal/types/tuple.hpp
+@@ -95,7 +95,7 @@ namespace cereal
+       template <class Archive, class ... Types> inline
+       static void apply( Archive & ar, std::tuple<Types...> & tuple )
+       {
+-        serialize<Height - 1>::template apply( ar, tuple );
++        serialize<Height - 1>::apply( ar, tuple );
+         ar( CEREAL_NVP_(tuple_element_name<Height - 1>::c_str(),
+             std::get<Height - 1>( tuple )) );
+       }
+@@ -116,7 +116,7 @@ namespace cereal
+   template <class Archive, class ... Types> inline
+   void CEREAL_SERIALIZE_FUNCTION_NAME( Archive & ar, std::tuple<Types...> & tuple )
+   {
+-    tuple_detail::serialize<std::tuple_size<std::tuple<Types...>>::value>::template apply( ar, tuple );
++    tuple_detail::serialize<std::tuple_size<std::tuple<Types...>>::value>::apply( ar, tuple );
+   }
+ } // namespace cereal
+ 
diff --git a/meta-oe/recipes-support/libcereal/libcereal_1.3.2.bb b/meta-oe/recipes-support/libcereal/libcereal_1.3.2.bb
index 6ad20d6370..c2ab0d61b8 100644
--- a/meta-oe/recipes-support/libcereal/libcereal_1.3.2.bb
+++ b/meta-oe/recipes-support/libcereal/libcereal_1.3.2.bb
@@ -22,6 +22,7 @@  SRC_URI = "git://github.com/USCiLab/cereal.git;branch=master;protocol=https \
            file://0001-sandbox-Do-not-use-int8_t-in-std-uniform_int_distrib.patch \
            file://0001-cmake-Use-idirafter-instead-of-isystem.patch \
            file://0001-doctest-Do-not-use-unnamed-class.patch \
+           file://0001-Fix-instances-of-Wmissing-template-arg-list-after-te.patch \
            file://run-ptest \
 "