diff options
author | Peter Kjellerstedt <pkj@axis.com> | 2025-06-01 22:54:33 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2025-06-01 23:41:01 -0700 |
commit | 908df7418376f8409e38b5e407b71c765ba67d02 (patch) | |
tree | 8eac2f3b9b107515ee6777ab3d282b0dc7128fba | |
parent | 834dda2fad231be22c57bf66aa97b8749e19f3c6 (diff) | |
download | meta-openembedded-908df7418376f8409e38b5e407b71c765ba67d02.tar.gz |
abseil-cpp: Backport a patch to build code that uses C++17 with GCC 15
GCC 15 seems to be confused about when the <version> header was
introduced (C++20) and expects it to be used with C++17.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0005-Fix-GCC15-warning-that-ciso646-is-deprecated-in-C-17.patch | 43 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20250127.1.bb | 1 |
2 files changed, 44 insertions, 0 deletions
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 @@ | |||
1 | From aa102147cdfff3aa971e61038a6455bff6828350 Mon Sep 17 00:00:00 2001 | ||
2 | From: Derek Mauro <dmauro@google.com> | ||
3 | Date: Tue, 29 Apr 2025 06:23:36 -0700 | ||
4 | Subject: [PATCH] Fix GCC15 warning that <ciso646> is deprecated in C++17 | ||
5 | |||
6 | PiperOrigin-RevId: 752709743 | ||
7 | Change-Id: I4d6b52bca913d888818e1380268089743b03ca2b | ||
8 | Upstream-Status: Backport [https://github.com/abseil/abseil-cpp/commit/5f3435aba00bcd7f12062d2e8e1839b4eaf1a575] | ||
9 | --- | ||
10 | absl/hash/internal/hash.h | 14 +++++++++++++- | ||
11 | 1 file changed, 13 insertions(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/absl/hash/internal/hash.h b/absl/hash/internal/hash.h | ||
14 | index f4a0d785..6937f413 100644 | ||
15 | --- a/absl/hash/internal/hash.h | ||
16 | +++ b/absl/hash/internal/hash.h | ||
17 | @@ -26,13 +26,25 @@ | ||
18 | |||
19 | #include "absl/base/config.h" | ||
20 | |||
21 | +// GCC15 warns that <ciso646> is deprecated in C++17 and suggests using | ||
22 | +// <version> instead, even though <version> is not available in C++17 mode prior | ||
23 | +// to GCC9. | ||
24 | +#if defined(__has_include) | ||
25 | +#if __has_include(<version>) | ||
26 | +#define ABSL_INTERNAL_VERSION_HEADER_AVAILABLE 1 | ||
27 | +#endif | ||
28 | +#endif | ||
29 | + | ||
30 | // For feature testing and determining which headers can be included. | ||
31 | -#if ABSL_INTERNAL_CPLUSPLUS_LANG >= 202002L | ||
32 | +#if ABSL_INTERNAL_CPLUSPLUS_LANG >= 202002L || \ | ||
33 | + ABSL_INTERNAL_VERSION_HEADER_AVAILABLE | ||
34 | #include <version> | ||
35 | #else | ||
36 | #include <ciso646> | ||
37 | #endif | ||
38 | |||
39 | +#undef ABSL_INTERNAL_VERSION_HEADER_AVAILABLE | ||
40 | + | ||
41 | #include <algorithm> | ||
42 | #include <array> | ||
43 | #include <bitset> | ||
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 \ | |||
14 | file://0002-Remove-maes-option-from-cross-compilation.patch \ | 14 | file://0002-Remove-maes-option-from-cross-compilation.patch \ |
15 | file://0003-Remove-neon-option-from-cross-compilation.patch \ | 15 | file://0003-Remove-neon-option-from-cross-compilation.patch \ |
16 | file://0004-abseil-ppc-fixes.patch \ | 16 | file://0004-abseil-ppc-fixes.patch \ |
17 | file://0005-Fix-GCC15-warning-that-ciso646-is-deprecated-in-C-17.patch \ | ||
17 | " | 18 | " |
18 | 19 | ||
19 | S = "${WORKDIR}/git" | 20 | S = "${WORKDIR}/git" |