]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.spec.in: Use gcc11-c++ on openSUSE Leap 15.x 48042/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 01:13:28 +0000 (11:13 +1000)
Fixes: 80949babab4aac86647ce9973f6b44adb92fae95
Fixes: https://tracker.ceph.com/issues/57497
Signed-off-by: Tim Serong <tserong@suse.com>
ceph.spec.in

index b1ac5252d5ce017dbed534e8c7e04258055d4226..fd20f35bafbf6a7de4c1509ea50b7258a217f2e1 100644 (file)
@@ -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} \