]> git.apps.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)
committerKefu Chai <tchaikov@gmail.com>
Wed, 10 Aug 2022 14:37:48 +0000 (22:37 +0800)
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>
ceph.spec.in

index b23fbc3a2724b116d15d1c8e15c9d870c340d5d3..924eef9d3960ef671cda5c1d54c11ed81b83526e 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