From 246c27a9c594ff66a9ed294e7907199f3b0ac966 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 10 Nov 2017 20:05:49 +0800 Subject: [PATCH] ceph.spec: use devtoolset-7-gcc-c++ on centos/rhel for better performance. Signed-off-by: Kefu Chai --- ceph.spec.in | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ceph.spec.in b/ceph.spec.in index 82bb63aacc662..30692330aca79 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 -- 2.39.5