parallel ports build
Jonathan Noack
noackjr at alumni.rice.edu
Thu Oct 18 16:16:51 PDT 2007
With most modern systems having 2+ cores, I was wondering if the ports
system could make use of more than one of them. I briefly searched the
web and list archives and found several short discussions and the
following page (cced author markus@):
http://www.brueffer.de/parallel_ports_build.html
The bsd.port.mk patch on that page is dated March 2004 (!) but looks
pretty simple. A port must set "SUPPORTS_PARALLEL_BUILD=yes" to allow a
parallel build. If it does, the BUILD_JOBS knob is used (either read from
/etc/make.conf, env, or defaults to 0) and "-j${BUILD_JOBS}" is passed to
make. As a bonus, the patch includes CC/CXX wrapper support for
ccache/distcc/etc.
Given that not all ports successfully build in parallel, the opt-in
approach seems reasonable. It allows port maintainers to test their ports
and update them if everything works well. Even a simple pass through the
ports tree focusing on the heavy-hitters (X, KDE, Gnome, Apache, PHP,
MySQL, Postgres, OpenOffice, etc.) and their dependencies could make a
significant dent in build time. This would be most evident for new
installs and upgrades where you are basically starting from scratch.
I am far from an expert in this area so I wanted to see what others
thought. Is this a good approach or is there a better one?
-Jon
More information about the freebsd-ports
mailing list