]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.spec.in: %enable_devtoolset11 only if the macro is defined
authorKefu Chai <tchaikov@gmail.com>
Wed, 10 Aug 2022 14:35:14 +0000 (22:35 +0800)
committerDavid Galloway <dgallowa@redhat.com>
Wed, 10 Aug 2022 20:46:46 +0000 (16:46 -0400)
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 <tchaikov@gmail.com>
(cherry picked from commit 75dd92353381c6ec5ac7251585a276059b8a2253)

ceph.spec.in

index ae89dc569193b084f73ddc86591f444b1800ff69..56e5a085e937bd10f07207c71a329b46b9def279 100644 (file)
 # 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