From owner-freebsd-current@freebsd.org Tue Oct 20 15:50:37 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1336BA194F8 for ; Tue, 20 Oct 2015 15:50:37 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-oi0-x236.google.com (mail-oi0-x236.google.com [IPv6:2607:f8b0:4003:c06::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C72B8B5F for ; Tue, 20 Oct 2015 15:50:36 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: by oiev17 with SMTP id v17so12373091oie.2 for ; Tue, 20 Oct 2015 08:50:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=x52FZB3cM51+iAHpzxGi7SQmKFnCulViIj/WSEMD/4Q=; b=DWDSnYmHCobQCv0Stl/9VTxx2T383srMnwHazLFQwAS1onGVmhkrefqICimFPP7/4h GMoDxz87TCpq7N72x5IZa2Q8YAiblc2RfVdBxSzNEGF6yGllQSMgbhxBq2I8wgWSWxzb NM7vAr4tkiUqtZ/cmNvrH5Q2GBoqLGYgT6ubD/t4/G5yANJ4mIy3uf7IgR6YZ4N2jcDI boFaIVpQrII6VhPY+Byzqkej0rEK5oMRqqf0ikwPheboWdcU2ZEDPDvVhvPGZIJkVRfa Oiu24yJ82wyhLjMbEDgj5euWOVrmXSupsrMibXGzE8KandE9jb2z46WF5GFqKJMmh4IT bhlw== MIME-Version: 1.0 X-Received: by 10.202.108.81 with SMTP id h78mr2417811oic.86.1445356235984; Tue, 20 Oct 2015 08:50:35 -0700 (PDT) Received: by 10.76.8.4 with HTTP; Tue, 20 Oct 2015 08:50:35 -0700 (PDT) In-Reply-To: <56264279.7020504@club.fr> References: <56264279.7020504@club.fr> Date: Tue, 20 Oct 2015 08:50:35 -0700 Message-ID: Subject: Re: [CFT] Buildworld ccache support From: Freddie Cash To: =?UTF-8?Q?Juan_Ram=C3=B3n_Molina_Menor?= Cc: FreeBSD-Current Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Oct 2015 15:50:37 -0000 On Tue, Oct 20, 2015 at 6:32 AM, Juan Ram=C3=B3n Molina Menor wrote: > Hi! > > I=E2=80=99m certainly doing it wrong, because CCACHE does not kick in aft= er > applying the patch and modifying make.conf. CCACHE stats ('ccache -z' > followed by 'ccache -s') remain at zero during buildworld while they used > to reflect the cache miss/hits before. > > # cat /etc/make.conf > WITH_CCACHE_BUILD=3D > =E2=80=8BYou need to actually set this to a value, in order for the variabl= e to be defined. WITH_CCACHE_BUILD=3Dyes WITH_CCACHE_BUILD=3Dsomething WITH_CCACHE_BUILD=3Dwhatever It doesn't matter what it's set to, but it has to be set to something.=E2= =80=8B > =E2=80=8B > # svn diff /usr/src/share/mk/local.init.mk > Index: /usr/src/share/mk/local.init.mk > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- /usr/src/share/mk/local.init.mk (revision 289627) > +++ /usr/src/share/mk/local.init.mk (working copy) > @@ -38,3 +38,37 @@ > HOST_CFLAGS+=3D -DHOSTPROG > CFLAGS+=3D ${HOST_CFLAGS} > .endif > + > +# Handle ccache after CC is determined. If CC is at some specific path > then > +# we must prepend the ccache wrapper. Otherwise we can just prepend PAT= H > with > +# the wrapper location, which is a more safe solution since it avoids > spaces > +# and compiler type guessing based on filename. > +LOCALBASE?=3D /usr/local > +CCACHE_WRAPPER_PATH?=3D ${LOCALBASE}/libexec/ccache > +CCACHE_PATH?=3D ${LOCALBASE}/bin/ccache > +.if defined(WITH_CCACHE_BUILD) && !defined(NOCCACHE) && \ > =E2=80=8BThis line here checks if the variable is defined (meaning, that it= is set to something), and if it is, then the code after it enabled CCACHE.=E2=80= =8B --=20 Freddie Cash fjwcash@gmail.com