ccacheのインストール

distccと併せて、ccacheも入れてみることにした。
これでコンパイル処理が分散化され速くなればかなりうれしい。

portinstallでccacheをインストール

# cd /usr/ports
# portinstall devel/ccache devel/distcc

# mkdir -p /.ccache
# setenv CCACHE_DIR /.ccache
# printenv

/etc/make.confに追記

.if (!empty(.CURDIR:M/usr/src*) || !empty(.CURDIR:M/usr/obj*)) && !defined(NOCCACHE)
CC=/usr/local/libexec/ccache/world-cc
CXX=/usr/local/libexec/ccache/world-c++
.endif

/etc/csh.cshrcに追記

setenv PATH /usr/local/libexec/ccache/:$PATH
setenv CCACHE_PATH /usr/bin:/usr/local/bin
setenv CCACHE_DIR /.ccache
setenv CCACHE_LOGFILE /var/log/ccache.log
#To use distcc
setenv CCACHE_PREFIX /usr/local/bin/distcc
setenv DISTCC_HOSTS 'localhost vine gentoo redhat'


参考URL
otsune's FreeBSD memo

コメント

Comment spam is annoying.

There has been an increase in comment spam, but we decline it. It’s pointless because we use Akismet to block spam comments. Spam comments will not be posted.

コメントスパムが増えていますがお断りします。akismetでスパムコメントを弾いているので無意味です。スパムコメントは掲載されません。

ブロックしたスパム

DMM広告

タイトルとURLをコピーしました