From: Kefu Chai Date: Fri, 10 Nov 2017 12:05:49 +0000 (+0800) Subject: ceph.spec: use devtoolset-7-gcc-c++ on centos/rhel X-Git-Tag: v13.0.2~867^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=246c27a9c594ff66a9ed294e7907199f3b0ac966;p=ceph.git ceph.spec: use devtoolset-7-gcc-c++ on centos/rhel for better performance. Signed-off-by: Kefu Chai --- diff --git a/ceph.spec.in b/ceph.spec.in index 82bb63aacc6..30692330aca 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -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