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
This commit is contained in:
Martin Pluskal 2022-05-05 14:47:45 +00:00 committed by Git OBS Bridge
parent ba2c1947ae
commit 7935975c4f
3 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,16 @@
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

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu May 5 10:54:05 UTC 2022 - Martin Liška <mliska@suse.cz>
- Add temporary patch gcc12-disable-__constinit-with-c++-11.patch
that addresses gh#protocolbuffers/protobuf#9916.
-------------------------------------------------------------------
Thu May 5 05:25:44 UTC 2022 - Matej Cepl <mcepl@suse.com>

View File

@ -36,6 +36,7 @@ URL: https://github.com/protocolbuffers/protobuf
Source0: https://github.com/protocolbuffers/protobuf/archive/v%{version}.tar.gz#/%{tarname}-%{version}.tar.gz
Source1: manifest.txt.in
Source2: baselibs.conf
Patch0: gcc12-disable-__constinit-with-c++-11.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module python-dateutil}
BuildRequires: %{python_module setuptools}