What does it mean to use ports?

Steve O'Hara-Smith steve at sohara.org
Mon Jul 15 05:08:14 UTC 2019


On Mon, 15 Jul 2019 06:25:17 +0200
hw <hw at adminart.net> wrote:

> Thanks for the warning --- Gentoo has something like that, too.
> 
> Wouldn't I want everything to be optimized for the CPU it's running on?

	It is rarely worth the compile time (ie. the CPU time saving over
the lifetime of the system is less than the CPU time to perform the
compilation) to optimise to a particular CPU rather than using generic
binaries for the CPU family. Of course for some CPUs and some applications
there are big wins to be had, but not on average especially when most
software is IO bound not CPU bound.

	I generally only compile a port for one of two reasons, some cannot
be shipped as packages for licensing reasons and some are built with
different options to the ones I want (CPU optimisation is one I've not
needed but YMMV).

	When I do need to compile a port the first thing I do is make sure
my ports tree is up to date then I use make missing to get a list of
dependencies that aren't installed and use pkg to install them first so
that I am only compiling the one thing I need to compile rather than all
the dependencies. Finally I use pkg lock to prevent package updates
overwriting my customised version.

-- 
Steve O'Hara-Smith <steve at sohara.org>


More information about the freebsd-questions mailing list