From 908df7418376f8409e38b5e407b71c765ba67d02 Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Sun, 1 Jun 2025 22:54:33 +0200 Subject: abseil-cpp: Backport a patch to build code that uses C++17 with GCC 15 GCC 15 seems to be confused about when the header was introduced (C++20) and expects it to be used with C++17. Signed-off-by: Peter Kjellerstedt Signed-off-by: Khem Raj --- ...arning-that-ciso646-is-deprecated-in-C-17.patch | 43 ++++++++++++++++++++++ .../abseil-cpp/abseil-cpp_20250127.1.bb | 1 + 2 files changed, 44 insertions(+) create mode 100644 meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0005-Fix-GCC15-warning-that-ciso646-is-deprecated-in-C-17.patch diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0005-Fix-GCC15-warning-that-ciso646-is-deprecated-in-C-17.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0005-Fix-GCC15-warning-that-ciso646-is-deprecated-in-C-17.patch new file mode 100644 index 0000000000..7fe9ab4708 --- /dev/null +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0005-Fix-GCC15-warning-that-ciso646-is-deprecated-in-C-17.patch @@ -0,0 +1,43 @@ +From aa102147cdfff3aa971e61038a6455bff6828350 Mon Sep 17 00:00:00 2001 +From: Derek Mauro +Date: Tue, 29 Apr 2025 06:23:36 -0700 +Subject: [PATCH] Fix GCC15 warning that is deprecated in C++17 + +PiperOrigin-RevId: 752709743 +Change-Id: I4d6b52bca913d888818e1380268089743b03ca2b +Upstream-Status: Backport [https://github.com/abseil/abseil-cpp/commit/5f3435aba00bcd7f12062d2e8e1839b4eaf1a575] +--- + absl/hash/internal/hash.h | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/absl/hash/internal/hash.h b/absl/hash/internal/hash.h +index f4a0d785..6937f413 100644 +--- a/absl/hash/internal/hash.h ++++ b/absl/hash/internal/hash.h +@@ -26,13 +26,25 @@ + + #include "absl/base/config.h" + ++// GCC15 warns that is deprecated in C++17 and suggests using ++// instead, even though is not available in C++17 mode prior ++// to GCC9. ++#if defined(__has_include) ++#if __has_include() ++#define ABSL_INTERNAL_VERSION_HEADER_AVAILABLE 1 ++#endif ++#endif ++ + // For feature testing and determining which headers can be included. +-#if ABSL_INTERNAL_CPLUSPLUS_LANG >= 202002L ++#if ABSL_INTERNAL_CPLUSPLUS_LANG >= 202002L || \ ++ ABSL_INTERNAL_VERSION_HEADER_AVAILABLE + #include + #else + #include + #endif + ++#undef ABSL_INTERNAL_VERSION_HEADER_AVAILABLE ++ + #include + #include + #include diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20250127.1.bb b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20250127.1.bb index 5368dfaada..39c3b0b6db 100644 --- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20250127.1.bb +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20250127.1.bb @@ -14,6 +14,7 @@ SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH};protocol=https \ file://0002-Remove-maes-option-from-cross-compilation.patch \ file://0003-Remove-neon-option-from-cross-compilation.patch \ file://0004-abseil-ppc-fixes.patch \ + file://0005-Fix-GCC15-warning-that-ciso646-is-deprecated-in-C-17.patch \ " S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf