From: Nathan Cutler Date: Mon, 8 Mar 2021 10:14:56 +0000 (+0100) Subject: rpm: refrain from using %make_build macro on SUSE X-Git-Tag: v17.1.0~2693^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=40cbd283bd87f31b42a5d0f36b87313d54a5dad7;p=ceph.git rpm: refrain from using %make_build macro on SUSE The recently merged commit 0e511973f7b6b0e5dbb3c4caf98f1290f81829e9 replaced make %{_smp_mflags} with %make_build for the stated purpose of hiding the %_smp_mflags macro in a higher-level macro. But, on SUSE, the higher-level macro (%make_build) expands to: make -O %{_smp_mflags} The addition of the -O flag makes the build considerably slower and increases the memory requirement. The exact reason for this is unknown - possibly it's due to a bug in make, although the same slowness was observed with ninja as well. In any event, this is a deal-breaker when building in the OBS, because the build infrastructure there is optimized for builds that do not require huge amounts of memory and we would rather have a fast build with mixed up compiler messages than a very slow one with synced compiler messages. Fixes: 0e511973f7b6b0e5dbb3c4caf98f1290f81829e9 Signed-off-by: Nathan Cutler --- diff --git a/ceph.spec.in b/ceph.spec.in index 0fad99f6bb76..7b286ac2a443 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -1312,7 +1312,11 @@ cat ./CMakeFiles/CMakeOutput.log cat ./CMakeFiles/CMakeError.log %endif +%if 0%{?suse_version} +make %{_smp_mflags} +%else %make_build +%endif %if 0%{with make_check} %check