diff --git a/SPECS/ceph.spec b/SPECS/ceph.spec index 2f11223..7fe96ec 100644 --- a/SPECS/ceph.spec +++ b/SPECS/ceph.spec @@ -1267,17 +1267,14 @@ export CXXFLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g') %endif # Parallel build settings ... -%ifarch s390 s390x -CEPH_MFLAGS_JOBS="-j1" -CEPH_SMP_NCPUS="1" -%else +%ifarch aarch64 +XRPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" +if [ "$XRPM_BUILD_NCPUS" -gt 0 ]; then +RPM_BUILD_NCPUS=(($XRPM_BUILD_NCPUS/2)) +fi +%endif CEPH_MFLAGS_JOBS="%{?_smp_mflags}" CEPH_SMP_NCPUS=$(echo "$CEPH_MFLAGS_JOBS" | sed 's/-j//') -%endif -%if 0%{?__isa_bits} == 32 -# 32-bit builds can use 3G memory max, which is not enough even for -j2 -CEPH_SMP_NCPUS="1" -%endif # do not eat all memory echo "Available memory:" free -h