[Momonga-devel.ja:01588] Re: OmoiKondara の distcc 対応について


かずひこです。

At Wed, 23 Apr 2003 17:35:52 +0900,
Kenta MURATA wrote:

> いえ,
> 
>   DISTCC_HOST host1
>   DISTCC_HOST host2
> 
> のように,ホストの数分だけ行を増やしてください.

tools/OmoiKondara 見たら分かることでしたね。了解しました。

> %configure を使っていない spec ファイルの場合は個別に対応する
> しかないかもしれません.
(snip)
> distcc は /usr/lib/gcc-lib/i586-redhat-linux/3.2.2/cc1 を直接
> 起動しているみたいなんで,ccache を使うには何かトリックを使わ
> ないとダメでしょう.

実は spec そのままでも、man ccache でいうところの

USING CCACHE WITH DISTCC
       distcc is a very useful program for distributing compilation
       across a range of compiler servers. It is often useful to combine
       distcc with ccache, so that compiles that are done are sped up by
       distcc, but that ccache avoids the compile completely where
       possible.

       To use distcc with ccache I recommend using the CCACHE_PREFIX
       option.  You just need to set the environment variable
       CCACHE_PREFIX to 'distcc' and ccache will prefix the command line
       used with the compiler with the command 'distcc'.

CCACHE_PREFIX を distcc にセットするだけですね。そしたら、あとはmake -jN 
みたいにするだけでよさそうですね。

ただ、make -jN がどのパッケージでも成功するとは限らないのでそのあたりの
チェックは必要でしょうが、成功するパッケージはすべて kernel とか mozilla
とかのように -jN をつけるような spec にするのはよいことだと思います。い
かがでしょうか?

# ccache なしで distcc を使いたい場合は、ccache と同様に symlink を作っ
# て自動的に distcc が起動するような方法でいいのでしょう、きっと。

それはそれとして、distcc は安全なネットワーク内で使うことを強く推奨され
ていますので、念のため。:p
-- 
かずひこ <http://www.fdiary.net/~kazuhiko/diary/>
  ★シャア「名字が付いてない」
  ☆一兵卒「あんなの飾りです。偉い人にはそれが分からんのです」