From 1f79e0a0d9c4038a7b3b7e104cfb64b7bb35ed0b Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Wed, 24 Jan 2024 16:06:44 -0500 Subject: [PATCH] gcc-14 Signed-off-by: Kaleb S. KEITHLEY --- 0039-src-common-dout.h.patch | 37 ++++++++++++++++++++++++++++++++++++ ceph.spec | 6 +++++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0039-src-common-dout.h.patch diff --git a/0039-src-common-dout.h.patch b/0039-src-common-dout.h.patch new file mode 100644 index 0000000..73b9b21 --- /dev/null +++ b/0039-src-common-dout.h.patch @@ -0,0 +1,37 @@ +diff --git a/src/common/dout.h b/src/common/dout.h +index 4cd60efff8fef..db68a042a7f1b 100644 +--- a/src/common/dout.h ++++ b/src/common/dout.h +@@ -144,17 +144,24 @@ struct is_dynamic> : public std::true_type {}; + #else + #define dout_impl(cct, sub, v) \ + do { \ +- const bool should_gather = [&](const auto cctX) { \ +- if constexpr (ceph::dout::is_dynamic::value || \ +- ceph::dout::is_dynamic::value) { \ ++ const bool should_gather = [&](const auto cctX, auto sub_, auto v_) { \ ++ /* The check is performed on `sub_` and `v_` to leverage the C++'s \ ++ * guarantee on _discarding_ one of blocks of `if constexpr`, which \ ++ * includes also the checks for ill-formed code (`should_gather<>` \ ++ * must not be feed with non-const expresions), BUT ONLY within \ ++ * a template (thus the generic lambda) and under the restriction \ ++ * it's dependant on a parameter of this template). \ ++ * GCC prior to v14 was not enforcing these restrictions. */ \ ++ if constexpr (ceph::dout::is_dynamic::value || \ ++ ceph::dout::is_dynamic::value) { \ + return cctX->_conf->subsys.should_gather(sub, v); \ + } else { \ +- /* The parentheses are **essential** because commas in angle \ +- * brackets are NOT ignored on macro expansion! A language's \ +- * limitation, sorry. */ \ +- return (cctX->_conf->subsys.template should_gather()); \ ++ constexpr auto sub_helper = static_cast(sub); \ ++ constexpr auto v_helper = static_cast(v); \ ++ return cctX->_conf->subsys.template should_gather(); \ + } \ +- }(cct); \ ++ }(cct, sub, v); \ + \ + if (should_gather) { \ + ceph::logging::MutableEntry _dout_e(v, sub); \ diff --git a/ceph.spec b/ceph.spec index 890c9b8..70990fe 100644 --- a/ceph.spec +++ b/ceph.spec @@ -206,7 +206,7 @@ ################################################################################# Name: ceph Version: 18.2.1 -Release: 2%{?dist} +Release: 3%{?dist} %if 0%{?fedora} || 0%{?rhel} Epoch: 2 %endif @@ -240,6 +240,7 @@ Patch0032: 0032-cmake-modules-BuildBoost.cmake.patch Patch0033: 0033-boost-asm.patch Patch0034: 0034-src-pybind-rbd-rbd.pyx.patch Patch0036: 0036-18.2.1.release.patch +Patch0039: 0039-src-common-dout.h.patch # ceph 14.0.1 does not support 32-bit architectures, bugs #1727788, #1727787 ExcludeArch: i686 armv7hl %if 0%{?suse_version} @@ -2857,6 +2858,9 @@ exit 0 %endif %changelog +* Wed Jan 24 2024 Kaleb S. KEITHLEY - 2:18.2.1-3 +- gcc-14 + * Tue Dec 19 2023 Kaleb S. KEITHLEY - 2:18.2.1-2 - ceph-18.2.1, incorporate changes from *final* 18.2.1 release from https://download.ceph.com/rpm-18.2.1/el9/SRPMS/ceph-18.2.1-0.el9.src.rpm