rpmbuild setting for multi core CPU (2)
According to Fedora Project's Package Guideline, %{?_smp_mflags}
seems to be the recommended way.
Whenever possible, invocations of
make
should be done asmake %{?_smp_mflags}
This generally speeds up builds and especially on SMP machines.
Do make sure, however, that the package builds cleanly this way as some make files do not support parallel building. Therefore you should consider adding
%_smp_mflags -j3
to your
~/.rpmmacros
file -- even on UP machines -- as this will expose most of these errors.
Today, however, most of packages do not use make %{?_smp_mflags}
. The %__make /usr/bin/make -j 6
hack I wrote in this blog is tentative.