]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.spec: use devtoolset-7-gcc-c++ on centos/rhel
authorKefu Chai <kchai@redhat.com>
Fri, 10 Nov 2017 12:05:49 +0000 (20:05 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 5 Dec 2017 02:29:48 +0000 (10:29 +0800)
for better performance.

Signed-off-by: Kefu Chai <kchai@redhat.com>
ceph.spec.in

index 82bb63aacc6624d695325e675c9dfb31a734c921..30692330aca79a987ca6fbd3778c7d17382dc07e 100644 (file)
@@ -119,7 +119,13 @@ BuildRequires:     gperf
 BuildRequires:  cmake
 BuildRequires: cryptsetup
 BuildRequires: fuse-devel
+%if 0%{?rhel} == 7
+# devtoolset offers newer make and valgrind-devel, but the old ones are good
+# enough.
+BuildRequires: devtoolset-7-gcc-c++
+%else
 BuildRequires: gcc-c++
+%endif
 BuildRequires: gdbm
 %if 0%{with tcmalloc}
 BuildRequires: gperftools-devel >= 2.4
@@ -781,6 +787,11 @@ python-rbd, python-rgw or python-cephfs instead.
 %autosetup -p1 -n @TARBALL_BASENAME@
 
 %build
+
+%if 0%{?rhel} == 7
+. /opt/rh/devtoolset-7/enable
+%endif
+
 %if 0%{with cephfs_java}
 # Find jni.h
 for i in /usr/{lib64,lib}/jvm/java/include{,/linux}; do