From 40cbd283bd87f31b42a5d0f36b87313d54a5dad7 Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Mon, 8 Mar 2021 11:14:56 +0100 Subject: [PATCH] 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 --- ceph.spec.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ceph.spec.in b/ceph.spec.in index 0fad99f6bb768..7b286ac2a4437 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 -- 2.39.5