mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
protobuf: Use __constinit only in GCC 12.2 and up
This commit is contained in:
parent
7647b1f460
commit
9288f730ad
24
packages/addons/addon-depends/protobuf/patches/9936.patch
Normal file
24
packages/addons/addon-depends/protobuf/patches/9936.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
From fc7dc129f19fec7fe3211a39f13f6fe74c35cce6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Adam Cozzette <acozzette@google.com>
|
||||||
|
Date: Mon, 9 May 2022 19:03:39 +0000
|
||||||
|
Subject: [PATCH] Use __constinit only in GCC 12.2 and up
|
||||||
|
|
||||||
|
Fixes #9916. GCC appears to have a bug preventing our use of __constinit
|
||||||
|
from working correctly, but this bug will be fixed in GCC 12.2.
|
||||||
|
---
|
||||||
|
src/google/protobuf/port_def.inc | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc
|
||||||
|
index dcb0ff758f1..289a42674cf 100644
|
||||||
|
--- a/src/google/protobuf/port_def.inc
|
||||||
|
+++ b/src/google/protobuf/port_def.inc
|
||||||
|
@@ -650,7 +650,7 @@
|
||||||
|
(!defined(__APPLE__) && __clang_major__ >= 12))
|
||||||
|
#define PROTOBUF_CONSTINIT [[clang::require_constant_initialization]]
|
||||||
|
#define PROTOBUF_CONSTEXPR constexpr
|
||||||
|
-#elif PROTOBUF_GNUC_MIN(12, 0)
|
||||||
|
+#elif PROTOBUF_GNUC_MIN(12, 2)
|
||||||
|
#define PROTOBUF_CONSTINIT __constinit
|
||||||
|
#define PROTOBUF_CONSTEXPR constexpr
|
||||||
|
#else
|
Loading…
x
Reference in New Issue
Block a user