Skip to content

Commit

Permalink
Use %getncpus for %_smp_mflags and %_lto_cflags to make them affinity…
Browse files Browse the repository at this point in the history
…-aware

Making %_smp_mflags affinity-aware was requested long, long ago in
https://bugzilla.redhat.com/show_bug.cgi?id=891588 but somewhere along
it fell in the cracks between distro versions...
  • Loading branch information
pmatilai committed Jan 15, 2019
1 parent e11068a commit 4732701
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platform.in
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
#%_smp_ncpus_max 0

%_smp_build_ncpus %([ -z "$RPM_BUILD_NCPUS" ] \\\
&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
&& RPM_BUILD_NCPUS="%{getncpus}"; \\\
ncpus_max=%{?_smp_ncpus_max}; \\\
if [ -n "$ncpus_max" ] && [ "$ncpus_max" -gt 0 ] && [ "$RPM_BUILD_NCPUS" -gt "$ncpus_max" ]; then RPM_BUILD_NCPUS="$ncpus_max"; fi; \\\
echo "$RPM_BUILD_NCPUS";)
Expand Down

0 comments on commit 4732701

Please sign in to comment.