]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.spec.in: Use gcc11-c++ on openSUSE Leap 15.x 48058/head
authorTim Serong <tserong@suse.com>
Mon, 12 Sep 2022 01:10:14 +0000 (11:10 +1000)
committerTim Serong <tserong@suse.com>
Mon, 12 Sep 2022 23:53:54 +0000 (09:53 +1000)
Fixes: 80949babab4aac86647ce9973f6b44adb92fae95
Fixes: https://tracker.ceph.com/issues/57497
Signed-off-by: Tim Serong <tserong@suse.com>
(cherry picked from commit b660b79bf5d71fc0ebf5061b8a99319b5e28e3fa)

ceph.spec.in

index 5c5e390f4ae8eeaaaf9d9e6b4058c36551590415..0a0f4ca1198bccb5ba6eb672fa619c6b0f647df2 100644 (file)
@@ -202,9 +202,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
@@ -1307,6 +1310,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} \