public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* ccache complains in latest git about -p
@ 2006-03-25 14:21 Andi Kleen
  2006-03-25 14:28 ` Andi Kleen
  2006-03-25 14:50 ` Andreas Schwab
  0 siblings, 2 replies; 4+ messages in thread
From: Andi Kleen @ 2006-03-25 14:21 UTC (permalink / raw)
  To: sam; +Cc: linux-kernel


ccache complains for me on x86-64 now:

> make CC=ccache 
make -C /home/lsrc/quilt/linux O=/home/lsrc/quilt/obj
ccache: invalid option -- p
  Using /home/lsrc/quilt/linux as source for kernel

It's probably harmless but looks ugly

> make CC=ccache  V=1
make -C /home/lsrc/quilt/linux O=/home/lsrc/quilt/obj
make -C /home/lsrc/quilt/obj \
KBUILD_SRC=/home/lsrc/quilt/linux \
KBUILD_EXTMOD="" -f /home/lsrc/quilt/linux/Makefile _all
ccache: invalid option -- p

-Andi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ccache complains in latest git about -p
  2006-03-25 14:21 ccache complains in latest git about -p Andi Kleen
@ 2006-03-25 14:28 ` Andi Kleen
  2006-03-25 17:35   ` Christian Trefzer
  2006-03-25 14:50 ` Andreas Schwab
  1 sibling, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2006-03-25 14:28 UTC (permalink / raw)
  To: sam; +Cc: linux-kernel

On Saturday 25 March 2006 15:21, Andi Kleen wrote:
> 
> ccache complains for me on x86-64 now:
> 
> > make CC=ccache 

Sorry ignore email. Obviously was a typo on my side. With CC="ccache cc" 
it works as expected.

-Andi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ccache complains in latest git about -p
  2006-03-25 14:21 ccache complains in latest git about -p Andi Kleen
  2006-03-25 14:28 ` Andi Kleen
@ 2006-03-25 14:50 ` Andreas Schwab
  1 sibling, 0 replies; 4+ messages in thread
From: Andreas Schwab @ 2006-03-25 14:50 UTC (permalink / raw)
  To: Andi Kleen; +Cc: sam, linux-kernel

Andi Kleen <ak@suse.de> writes:

> ccache complains for me on x86-64 now:
>
>> make CC=ccache 

Didn't you mean CC="ccache gcc"?

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ccache complains in latest git about -p
  2006-03-25 14:28 ` Andi Kleen
@ 2006-03-25 17:35   ` Christian Trefzer
  0 siblings, 0 replies; 4+ messages in thread
From: Christian Trefzer @ 2006-03-25 17:35 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-kernel

[-- 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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-03-25 17:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-25 14:21 ccache complains in latest git about -p Andi Kleen
2006-03-25 14:28 ` Andi Kleen
2006-03-25 17:35   ` Christian Trefzer
2006-03-25 14:50 ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox