how to speed up port make??
c.kworr at gmail.com
Thu Jul 26 08:13:27 UTC 2012
Mr U wrote:
> is it possible to speed up port make ??
> i want to install openbox and xorg on a Pentium 4 and 2gb ram,
> compiling xorg takes about 2 hours
1. You can use devel/ccache to cache compiled data. This way when you
are compiling anything for a second time you'll get a big speed boost.
Consider compiling kernel+world in 1 hour instead of 8 hours.
1a. If using clang setenv CCACHE_CPP2.
2. Try switching to clang, it has lower memory requirements and
compilation speed. Be ready to disable it for some ports that have
2a. Don't try to build world with clang if you need
wine/openoffice/libreoffice. They are known not to work on a world built
3. Use tmpfs for port building. I always use a big swap and point
WRKSRCDIR to /tmp/ports.
4. Finetune your compilation flags. The safest way to select one is to
run `(gcc|gcc46|clang) -E -v -march=native - < /dev/null` and select the
lowest -march value then write it down to /etc/make.conf as CPUTYPE.
5. Use port management tools like portmaster. When building big ports it
will split building down to individual ports cleaning disk between
builds. This keeps cache from holding temporary files.
Sphinx of black quartz judge my vow.
More information about the freebsd-questions