From b660b79bf5d71fc0ebf5061b8a99319b5e28e3fa Mon Sep 17 00:00:00 2001 From: Tim Serong Date: Mon, 12 Sep 2022 11:10:14 +1000 Subject: [PATCH] ceph.spec.in: Use gcc11-c++ on openSUSE Leap 15.x Fixes: 80949babab4aac86647ce9973f6b44adb92fae95 Fixes: https://tracker.ceph.com/issues/57497 Signed-off-by: Tim Serong --- ceph.spec.in | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ceph.spec.in b/ceph.spec.in index b1ac5252d5ce..fd20f35bafbf 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -203,9 +203,12 @@ BuildRequires: selinux-policy-devel BuildRequires: gperf BuildRequires: cmake > 3.5 BuildRequires: fuse-devel -%if 0%{?fedora} || 0%{?suse_version} || 0%{?rhel} == 9 +%if 0%{?fedora} || 0%{?suse_version} > 1500 || 0%{?rhel} == 9 BuildRequires: gcc-c++ >= 11 %endif +%if 0%{?suse_version} == 1500 +BuildRequires: gcc11-c++ +%endif %if 0%{?rhel} == 8 BuildRequires: %{gts_prefix}-gcc-c++ BuildRequires: %{gts_prefix}-build @@ -1321,6 +1324,10 @@ env | sort mkdir -p %{_vpath_builddir} pushd %{_vpath_builddir} cmake .. \ +%if 0%{?suse_version} == 1500 + -DCMAKE_C_COMPILER=gcc-11 \ + -DCMAKE_CXX_COMPILER=g++-11 \ +%endif -DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_INSTALL_LIBDIR:PATH=%{_libdir} \ -DCMAKE_INSTALL_LIBEXECDIR:PATH=%{_libexecdir} \ -- 2.47.3