From: Kefu Chai Date: Wed, 10 Aug 2022 14:35:14 +0000 (+0800) Subject: ceph.spec.in: %enable_devtoolset11 only if the macro is defined X-Git-Tag: v17.2.4~113^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d3f80b790f6c8cd1d2eac6069bbd428edfc570ea;p=ceph.git ceph.spec.in: %enable_devtoolset11 only if the macro is defined there is chance that we are using `yum-builddep` to prepare the build dependencies. in that case, gcc-toolset-11-build is not installed. it's like a chicken-egg dilemma, but the point is `yum-builddep` is able to pull in the gcc-toolset-11-build. once gcc-toolset-11-build is installed, we will have the %enable_devtoolset11 rpm macro. Signed-off-by: Kefu Chai (cherry picked from commit 75dd92353381c6ec5ac7251585a276059b8a2253) --- diff --git a/ceph.spec.in b/ceph.spec.in index ae89dc569193..56e5a085e937 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -153,7 +153,7 @@ # do not provide gcc-annobin.so anymore, despite that they provide annobin.so. but # redhat-rpm-config still passes -fplugin=gcc-annobin to the compiler. %undefine _annotated_build -%if 0%{?rhel} >= 8 +%if 0%{?rhel} >= 8 && 0%{?enable_devtoolset11:1} %enable_devtoolset11 %endif