Fix the build on F35
Add back previous RPM_BUILD_NCPUS limiting code as F35 doesn't have the new %constrain_build macro. We can drop the compat code as soon as F35 is EOL.
This commit is contained in:
parent
f5c2bd2d80
commit
3e4bfaceac
26
firefox.spec
26
firefox.spec
@ -715,10 +715,34 @@ echo "ac_add_options MOZ_PGO=1" >> .mozconfig
|
|||||||
export CCACHE_DISABLE=1
|
export CCACHE_DISABLE=1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?fedora} > 35
|
||||||
# Require 2 GB of RAM per CPU core
|
# Require 2 GB of RAM per CPU core
|
||||||
%constrain_build -m 2048
|
%constrain_build -m 2048
|
||||||
|
|
||||||
echo "mk_add_options MOZ_MAKE_FLAGS=\"-j%{_smp_build_ncpus}\"" >> .mozconfig
|
echo "mk_add_options MOZ_MAKE_FLAGS=\"-j%{_smp_build_ncpus}\"" >> .mozconfig
|
||||||
|
%else
|
||||||
|
# F35 doesn't have %%constrain_build
|
||||||
|
MOZ_SMP_FLAGS=-j1
|
||||||
|
# On x86_64 architectures, Mozilla can build up to 4 jobs at once in parallel,
|
||||||
|
# however builds tend to fail on other arches when building in parallel.
|
||||||
|
%ifarch %{ix86} s390x %{arm} aarch64
|
||||||
|
[ -z "$RPM_BUILD_NCPUS" ] && \
|
||||||
|
RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"
|
||||||
|
[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2
|
||||||
|
%endif
|
||||||
|
%ifarch x86_64 ppc ppc64 ppc64le
|
||||||
|
[ -z "$RPM_BUILD_NCPUS" ] && \
|
||||||
|
RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"
|
||||||
|
[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2
|
||||||
|
[ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4
|
||||||
|
[ "$RPM_BUILD_NCPUS" -ge 8 ] && MOZ_SMP_FLAGS=-j8
|
||||||
|
[ "$RPM_BUILD_NCPUS" -ge 16 ] && MOZ_SMP_FLAGS=-j16
|
||||||
|
[ "$RPM_BUILD_NCPUS" -ge 24 ] && MOZ_SMP_FLAGS=-j24
|
||||||
|
[ "$RPM_BUILD_NCPUS" -ge 32 ] && MOZ_SMP_FLAGS=-j32
|
||||||
|
[ "$RPM_BUILD_NCPUS" -ge 64 ] && MOZ_SMP_FLAGS=-j64
|
||||||
|
%endif
|
||||||
|
echo "mk_add_options MOZ_MAKE_FLAGS=\"$MOZ_SMP_FLAGS\"" >> .mozconfig
|
||||||
|
%endif
|
||||||
|
|
||||||
echo "mk_add_options MOZ_SERVICES_SYNC=1" >> .mozconfig
|
echo "mk_add_options MOZ_SERVICES_SYNC=1" >> .mozconfig
|
||||||
echo "export STRIP=/bin/true" >> .mozconfig
|
echo "export STRIP=/bin/true" >> .mozconfig
|
||||||
#export MACH_USE_SYSTEM_PYTHON=1
|
#export MACH_USE_SYSTEM_PYTHON=1
|
||||||
|
Loading…
Reference in New Issue
Block a user