]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rpm: refrain from using %make_build macro on SUSE 39909/head
authorNathan Cutler <ncutler@suse.com>
Mon, 8 Mar 2021 10:14:56 +0000 (11:14 +0100)
committerNathan Cutler <ncutler@suse.com>
Mon, 8 Mar 2021 10:52:09 +0000 (11:52 +0100)
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 <ncutler@suse.com>
ceph.spec.in

index 0fad99f6bb76807a75a2e402359980879ba8a4ad..7b286ac2a4437b27386c105ce4a329d1d562aa52 100644 (file)
@@ -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