From owner-freebsd-questions@FreeBSD.ORG Thu Sep 25 10:05:03 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BFBE106569A for ; Thu, 25 Sep 2008 10:05:03 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from mail.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id D89968FC19 for ; Thu, 25 Sep 2008 10:05:02 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from localhost (mail.rachie.is-a-geek.net [192.168.2.101]) by mail.rachie.is-a-geek.net (Postfix) with ESMTP id 1D934AFBC01; Thu, 25 Sep 2008 02:05:01 -0800 (AKDT) From: Mel To: freebsd-questions@freebsd.org Date: Thu, 25 Sep 2008 12:04:59 +0200 User-Agent: KMail/1.9.7 References: <48D7092B.1040503@brianwhalen.net> <200809250100.07383.fbsd.questions@rachie.is-a-geek.net> <20080925014520.3850bb00@gumby.homeunix.com.> In-Reply-To: <20080925014520.3850bb00@gumby.homeunix.com.> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200809251204.59963.fbsd.questions@rachie.is-a-geek.net> Cc: RW Subject: Re: ccache on amd64 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2008 10:05:03 -0000 On Thursday 25 September 2008 02:45:20 RW wrote: > On Thu, 25 Sep 2008 01:00:07 +0200 > > Mel wrote: > > Since it fails on the link, I wonder if the wrong linker is called by > > ccache. I'll see what I can find out when it quiets down, right now > > machine is under heavy load. > > > > (It might just be the path you set in /etc/profile. I use only > > the /etc/make.conf version, not set the path additionally and > > make -f /usr/src/Makefile.inc1 -V LIB32WMAKE shows it's mangeling the > > path) > > world-cc does this: > > #!/bin/sh > unset CCACHE_PATH > export CCACHE_HASH_COMPILER > exec /usr/local/libexec/ccache/cc "$@" > > So it unsets any ccache path variable set in /etc/profile. Yes. But not PATH. I'm worried about PATH, not CCACHE_PATH. =46rom ccache-howto-freebsd.txt: =46or Korn/Bourne shells Add the following to /etc/profile: export PATH=3D/usr/local/libexec/ccache:$PATH export CCACHE_PATH=3D/usr/bin:/usr/local/bin I never set this bit as I don't want my path globally mangeled and still=20 ccache works correctly for ports: # ccache -s cache directory /var/db/ccache/root cache hit 68324 cache miss 62348 called for link 5376 multiple source files 22 compile failed 1260 preprocessor error 1969 not a C/C++ file 1817 autoconf compile/link 14821 unsupported compiler option 1175 no input file 4364 files in cache 124696 cache size 2.1 Gbytes max cache size 15.0 Gbytes > > For the benefit of anyone that didn't follow the previous thread, the > issue was that in building 32-bit libraries under amd64, extra > arguments get passed to the compiler inside the CC variable > definition, hence the problem with overriding CC/CXX. I doubt that those > updated make.conf settings have had much testing, they were just > something suggested in a thread. Yeah, same here. The only difference is that they look for ccache binary an= d=20 write the CC variable more fancy. > > BTW I would suggest CCACHE_HASH_COMPILER is set globally, otherwise > building world invalidates any cache object built with the default > compiler. Only having it on for world is the default, but it seems > perverse to me - I see most of the benefit of ccache on port building. Well, you can use world-cc for ports, like I do: =2Eif=20 (!empty(.CURDIR:M/usr/src*) || !empty(.CURDIR:M/usr/obj*) || !empty(.CURDIR= :M/usr/ports*))=20 && !defined(NOCCACHE) CC=3D/usr/local/libexec/ccache/world-cc CXX=3D/usr/local/libexec/ccache/world-c++ =2Eendif The only things that choke are things configured by devel/scons, tho I have= to=20 find out why. I have it patched now by echo NOCCACHE=3Dyes=20 >cat/offending_port/Makefile.local. =2D-=20 Mel Problem with today's modular software: they start with the modules and never get to the software part.