SHA256
1
0
forked from pool/protobuf
protobuf/gcc12-disable-__constinit-with-c++-11.patch
Martin Pluskal 7935975c4f Accepting request 975180 from home:marxin:branches:devel:tools:building
- Add temporary patch gcc12-disable-__constinit-with-c++-11.patch
  that addresses gh#protocolbuffers/protobuf#9916.

OBS-URL: https://build.opensuse.org/request/show/975180
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/protobuf?expand=0&rev=117
2022-05-05 14:47:45 +00:00

17 lines
544 B
Diff

diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc
index 1e360cc..e0283fe 100644
--- a/src/google/protobuf/port_def.inc
+++ b/src/google/protobuf/port_def.inc
@@ -609,7 +609,11 @@
#define PROTOBUF_CONSTINIT [[clang::require_constant_initialization]]
#define PROTOBUF_CONSTEXPR constexpr
#elif PROTOBUF_GNUC_MIN(12, 0)
+#if PROTOBUF_CPLUSPLUS_MIN(201703L)
#define PROTOBUF_CONSTINIT __constinit
+#else
+#define PROTOBUF_CONSTINIT
+#endif
#define PROTOBUF_CONSTEXPR constexpr
#else
#define PROTOBUF_CONSTINIT