Re: Using ccache for build{world, kernel}

From: Jens Schweikhardt <schweikh_at_schweikhardt.net>
Date: Tue, 15 Nov 2005 23:42:12 +0100
Steve et al,

# So would the following form a better set of instructions for the port
# (given the above patch is merged)?

Might not, because...

# 1. don't follow the instructions about changing your PATH and setting
# CCACHE_PATH in /etc/profile or cshrc
# 2. use the following in /etc/make.conf
# 
# .if !defined(NOCCACHE)
# .if ${.CURDIR:M/usr/src*}

...I'm not sure whether the CURDIR always is under /usr/src;
it might change to somewhere under /usr/obj. Haven't investigated, though.

# CC=CCACHE_NOHASH_SIZE_MTIME=y /usr/local/bin/ccache cc
# CXX=CCACHE_NOHASH_SIZE_MTIME=y /usr/local/bin/ccache c++
# .else
# CC=/usr/local/bin/ccache cc
# CXX=/usr/local/bin/ccache c++
# .endif
# .endif
# 
# (untested though)

I would simply not mess with make.conf and obfuscated .CURDIR magic, but
rather write a little and obvious shell script "build-sys" along

#!/bin/sh
set -e
unset CCACHE_PATH  # Make ccache search PATH for the real compilers.
CC="/usr/local/bin/ccache cc" CXX="/usr/local/bin/ccache c++"
export CCACHE_NOHASH_SIZE_MTIME=yes
cd /usr/src
make CC="${CC}" CXX="${CXX}" buildworld
make CC="${CC}" CXX="${CXX}" buildkernel

Does this work for you? BTW, you can always disable ccache with
export CCACHE_DISABLE=yes.

Regards,

	Jens
-- 
Jens Schweikhardt http://www.schweikhardt.net/
SIGSIG -- signature too long (core dumped)
Received on Tue Nov 15 2005 - 21:42:28 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:47 UTC