Try to limit memory usage on arm builds

This commit is contained in:
Orion Poplawski 2021-08-13 21:55:56 -06:00
parent 457faff280
commit b5c1e78c3d

View File

@ -661,6 +661,10 @@ pushd %{name}-%{version}
##
RPM_BUILD_NCPUS="`%{_bindir}/getconf _NPROCESSORS_ONLN`"
%ifarch %{arm}
# Likely running out of memory during build
[ $RPM_BUILD_NCPUS -gt 3 ] && RPM_BUILD_NCPUS=3
%endif
make \
V=1 MAKE_NP=$RPM_BUILD_NCPUS PETSC_DIR=%{_builddir}/%{name}-%{version}/%{name}-%{version} PETSC_ARCH=%{_arch} all
popd