From owner-freebsd-ports@FreeBSD.ORG Sat Aug 4 15:03:37 2012 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5ACEE106566B; Sat, 4 Aug 2012 15:03:37 +0000 (UTC) (envelope-from kpaasial@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id B9E698FC12; Sat, 4 Aug 2012 15:03:36 +0000 (UTC) Received: by vbmv11 with SMTP id v11so213390vbm.13 for ; Sat, 04 Aug 2012 08:03: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=JbLZjxngXiEm1QfaM/NErY4x5c6WTXg75M5d2s4Ql7A=; b=NjYYN6vFhHU2HOVnwupCJP9vFPoe/8PIWy31G1yvGKmogoQ3/JIk6eq9nedVxmcTzc h5A8pI6B/C7MJEl8qQwZzKP28DzRXyA+J99HfWSKNpsfwJNVl/t4IHbJqOOLtYcH2z5C wR+By6swV+gm+prIZHk6Y1XJKn3U9m6kjpnCUQLg6vvxRPb4EIkgdda4pKbMOdOmnKmb 9ShF2nDzVtwWwuEZvZZw1/p7JRZdQD2lOagU5appxQIyGVsbZzIwgWwunYP9gMBA71B/ /xzYGMa6V1y42tsy3VgpsaOPKcumjb+KHKn6v+YFXV14xxNUCHvz5COgebUMneLQPm0Q 5RvA== MIME-Version: 1.0 Received: by 10.52.94.80 with SMTP id da16mr3513740vdb.40.1344092615841; Sat, 04 Aug 2012 08:03:35 -0700 (PDT) Received: by 10.58.145.10 with HTTP; Sat, 4 Aug 2012 08:03:35 -0700 (PDT) In-Reply-To: <501D34DF.2070205@FreeBSD.org> References: <501C7572.3020707@FreeBSD.org> <20120804141607.55249f62@gumby.homeunix.com> <501D34DF.2070205@FreeBSD.org> Date: Sat, 4 Aug 2012 18:03:35 +0300 Message-ID: From: Kimmo Paasiala To: Bryan Drewery Content-Type: text/plain; charset=UTF-8 Cc: ports@freebsd.org, RW Subject: Re: [CFT] [bsd.port.mk] ports ccache build support X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Aug 2012 15:03:37 -0000 On Sat, Aug 4, 2012 at 5:42 PM, Bryan Drewery wrote: > On 8/4/2012 8:16 AM, RW wrote: >> On Fri, 03 Aug 2012 20:05:54 -0500 >> Bryan Drewery wrote: >> >>> Hi, >>> >>> ports/169579 is currently tracking this. >>> >>> This patch adds ccache support to ports (off by default). Other >>> patches have changed $CC to use ccache, which results in having a >>> space in $CC. This breaks many ports such as boost and libtool ports. >>> >>> This patch however utilizes the symlinks in >>> /usr/local/libexec/ccache/{cc,gcc,etc...} by prefixing that directory >>> into $PATH in the $MAKE_ENV. >> >> But if you've read the ccache documentation you probably already have >> that directory in PATH anyway. Does this patch provide a significant >> advantage? > > That requires needless customization. The purpose here is easy, safe and > native support. > > The included ccache-howto-freebsd.txt with devel/ccache is quite long > for something that is straight forward. > > I've seen many incorrect guides that suggest changing $CC. There's forum > posts and sysutils/bsdadminscripts that do this. This leads to broken > builds and needing to define which ports support ccache via $CC and > which do not. > >> >> >>> The cache directory CCACHE_DIR defaults to /usr/obj/ccache >>> ... >>> To use ccache(1) from the command line to configure the size or view >>> stats: CCACHE_DIR=/usr/obj/ccache ccache -s >> >> Having a default ccache directory in the makefile that's different from >> the default documented in the ccache man page seems needlessly >> confusing to me. > > The default being $HOME/.ccache makes even less sense for port building. > >> >> And see hier(7) and section 25.7.6 of the handbook for >> why /usr/obj/ccache is a poor choice. > > I think /usr/obj makes sense. There is /var/cache now, but /var is > typically a smaller partition. > > Do you have a better suggestion? > Based on what I've read on the subject I'd say it's better to leave /usr/obj to just for stuff from /usr/src. I vote for /var/cache/ccache as the default ccache directory. -Kimmo