- Adjust number of jobs manually.
OBS-URL: https://build.opensuse.org/package/show/science/coq?expand=0&rev=4
This commit is contained in:
parent
a6698df172
commit
ded928ac6b
8
coq.spec
8
coq.spec
@ -86,10 +86,12 @@ export CFLAGS='%{optflags}'
|
||||
-natdynlink yes \
|
||||
-browser "xdg-open %s"
|
||||
|
||||
# Prevent OOM by limiting the number of threads.
|
||||
%define _smp_ncpus_max %(awk '/MemAvailable/ { print int($2 / 750000) }' /proc/meminfo)
|
||||
jobs=%{_smp_build_ncpus}
|
||||
max_jobs=$(awk '/MemAvailable/ { print int($2 / 1750000) }' /proc/meminfo)
|
||||
test $max_jobs -lt $jobs && jobs="$max_jobs" && \
|
||||
echo "Warning: Reducing number of jobs to $max_jobs because of memory limits"
|
||||
|
||||
make %{?_smp_mflags} world
|
||||
make -j $jobs world
|
||||
|
||||
%install
|
||||
make COQINSTALLPREFIX=%{buildroot} install
|
||||
|
Loading…
Reference in New Issue
Block a user