Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Nov 2005 17:17:55 -0500
From:      Nicolas Blais <nb_root@videotron.ca>
To:        Steve Hodgson <steve@acidy.com>
Cc:        freebsd-current@freebsd.org, Jens Schweikhardt <schweikh@schweikhardt.net>
Subject:   Re: Using ccache for build{world, kernel}
Message-ID:  <200511151717.55841.nb_root@videotron.ca>
In-Reply-To: <437A5CF5.4020203@acidy.com>
References:  <200511141702.45491.nb_root@videotron.ca> <200511151657.44716.nb_root@videotron.ca> <437A5CF5.4020203@acidy.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart6742360.pLxbfN5fVG
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On November 15, 2005 05:11 pm, Steve Hodgson wrote:
> Nicolas Blais wrote:
> >On November 15, 2005 04:14 pm, Jens Schweikhardt wrote:
> >>Folks,
> >>
> >># Put this in /usr/ports/devel/ccache/files/patch-nohash-size-mtime and
> >># reinstall the port. Then export CCACHE_NOHASH_SIZE_MTIME=3Dy during y=
our
> >># makes for buildworld and buildkernel. This melts my buildworld time
> >># from 2700s (real@~100%CPU) to under 1000s and buildkernel from 800s
> >># to 250s, so you gain about a factor 3 for ab-initio builds. Sweet!
> >>#
> >>#
> >># --- ccache.c.orig	Mon Oct 31 17:38:21 2005
> >># +++ ccache.c	Mon Oct 31 17:52:31 2005
> >># @@ -331,8 +331,10 @@
> >>#  		hash_string(str_basename(args->argv[0]));
> >>#  	}
> >>#
> >># -	hash_int(st.st_size);
> >># -	hash_int(st.st_mtime);
> >># +	if (!getenv("CCACHE_NOHASH_SIZE_MTIME")) {
> >># +		hash_int(st.st_size);
> >># +		hash_int(st.st_mtime);
> >># +	}
> >>[Rest of patch snipped ...]
> >>
> >>I just asked the devel/ccache maintainer to commit this patch and he
> >>promptly did (Thanks Michael Johnson, aka ahze!). So you only need this
> >>unless your ports tree is current as of now.
> >>
> >>Regards,
> >>
> >>	Jens
> >
> >Thanks, very helpful!
>
> So would the following form a better set of instructions for the port
> (given the above patch is merged)?
>
> 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*}
> CC=3DCCACHE_NOHASH_SIZE_MTIME=3Dy /usr/local/bin/ccache cc
> CXX=3DCCACHE_NOHASH_SIZE_MTIME=3Dy /usr/local/bin/ccache c++
> .else
> CC=3D/usr/local/bin/ccache cc
> CXX=3D/usr/local/bin/ccache c++
> .endif
> .endif
>
> (untested though)
>
> Steve

Didn't get far:

[snip]
=2D-------------------------------------------------------------
>>> stage 1.1: legacy release compatibility shims
=2D-------------------------------------------------------------
cd /usr/src; MAKEOBJDIRPREFIX=3D/usr/obj/usr/src/tmp =20
INSTALL=3D"sh /usr/src/tools/install.sh" =20
PATH=3D/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr=
/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/sbin:/bin:/usr/sbin:/usr/bin =20
WORLDTMP=3D/usr/obj/usr/src/tmp  MAKEFLAGS=3D"-m /usr/src/tools/build/mk =20
=2Dm /usr/src/share/mk" make -f Makefile.inc1  DESTDIR=3D  BOOTSTRAPPING=3D=
700006 =20
=2DDNO_HTML -DNO_INFO -DNO_LINT -DNO_MAN -DNO_NLS -DNO_PIC  -DNO_PROFILE=20
=2DDNO_SHARED -DNO_CPU_CFLAGS -DNO_WARNS legacy
=3D=3D=3D> tools/build (obj,includes,depend,all,install)
/usr/obj/usr/src/tmp/usr/src/tools/build created for /usr/src/tools/build
cd /usr/src/tools/build; make buildincludes; make installincludes
rm -f .depend
CC=3D'CCACHE_NOHASH_SIZE_MTIME=3Dy /usr/local/bin/ccache cc' mkdep -f .depe=
nd -a   =20
=2DI/usr/obj/usr/src/tmp/legacy/usr/include /usr/src/tools/build/dummy.c
CCACHE_NOHASH_SIZE_MTIME=3Dy: not found
mkdep: compile failed
*** Error code 1

Stop in /usr/src/tools/build.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
0.300u 0.138s 0:00.58 74.1%     270+382k 6+1io 1pf+0w

=2D-=20
=46reeBSD 7.0-CURRENT #0: Tue Nov 15 06:21:56 EST 2005    =20
root@clk01a:/usr/obj/usr/src/sys/CLK01A=20
PGP? : http://www.clkroot.net/security/nb_root.asc

--nextPart6742360.pLxbfN5fVG
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQBDel6Tz38ton5LGeIRApaeAJ9t1PUE50IPyHYwTg1NS58to7UCDQCeOte8
q+ylZz/TwN4tMgO+ffReKhQ=
=ntx+
-----END PGP SIGNATURE-----

--nextPart6742360.pLxbfN5fVG--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511151717.55841.nb_root>