mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Trefzer <ctrefzer@gmx.de>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: ccache complains in latest git about -p
Date: Sat, 25 Mar 2006 18:35:11 +0100	[thread overview]
Message-ID: <20060325173511.GB10293@zeus.uziel.local> (raw)
In-Reply-To: <200603251528.20299.ak@suse.de>

[-- Attachment #1: Type: text/plain, Size: 2018 bytes --]

On Sat, Mar 25, 2006 at 03:28:20PM +0100, Andi Kleen wrote:
> With CC="ccache cc" it works as expected.

And here I was, thinking that CC should be a variable containing no
whitespace, ie. just a single path to a binary, be it relative or
absolute, and that there were ways of teaching ccache to be completely
transparent (using gentoo, it was set up for me that way):

 $ ls -l /usr/lib/ccache/bin/
insgesamt 0
lrwxrwxrwx 1 root root 15  6. Mär 01:13 c++ -> /usr/bin/ccache
lrwxrwxrwx 1 root root 15  6. Mär 01:13 cc -> /usr/bin/ccache
lrwxrwxrwx 1 root root 15  6. Mär 01:13 g++ -> /usr/bin/ccache
lrwxrwxrwx 1 root root 15  6. Mär 01:13 gcc -> /usr/bin/ccache
lrwxrwxrwx 1 root root 15  6. Mär 01:13 i686-pc-linux-gnu-c++ ->
/usr/bin/ccache
lrwxrwxrwx 1 root root 15  6. Mär 01:13 i686-pc-linux-gnu-g++ ->
/usr/bin/ccache
lrwxrwxrwx 1 root root 15  6. Mär 01:13 i686-pc-linux-gnu-gcc ->
/usr/bin/ccache
 $ 

So all I need to do in order to enable ccache is add this stub dir to
the front of my PATH:

 $ echo $PATH
/usr/lib/ccache/bin:/usr/lib/distcc/bin:/usr/local/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.0:[...]
(Note: the order of distcc after ccache is important, if not obvious)

So what the thing does is call the next instance of the name it was
called by from your path, ie. subtracts dirname($0) from the beginning
of $PATH, and supply each and every argument to that. In my past setup,
stuff is taken from the cache, and if not found, distributed across
machines. Works extremely well for kernel builds on slow machines, with
a faster one right beside it. And no dirty CC= stuff to begin with : )

AFAICT this is not a religious or purist issues, as there have been real
problems with CC not following the recommendation and some projects
relying on that, but as this thread goes to show there occur problems
even without real problems existing ; ) Maybe setting obscure CC
variables works reliably for kernel builds, I never tried...


Kind regards,

Chris


[-- Attachment #2: Type: application/pgp-signature, Size: 829 bytes --]

  reply	other threads:[~2006-03-25 17:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-25 14:21 Andi Kleen
2006-03-25 14:28 ` Andi Kleen
2006-03-25 17:35   ` Christian Trefzer [this message]
2006-03-25 14:50 ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060325173511.GB10293@zeus.uziel.local \
    --to=ctrefzer@gmx.de \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®