Page 1 of 1

2.2.2-3.0.4-201109150655 fails to build with ccache

PostPosted: Fri Sep 16, 2011 5:06 am
by ncopa
It probably fails with distcc too.

To reproduce, install ccache and then:
Code: Select all
make CC="ccache gcc"


The error you get is something like:
...
make -C /home/ncopa/aports/main/linux-grsec/src/linux-3.0 O=/home/ncopa/aports/main/linux-grsec/src/build/.
ccache: invalid option -- p
Usage:
ccache [options]
ccache compiler [compiler options]
compiler [compiler options] (via symbolic link)

Options:
-c, --cleanup delete old files and recalculate size counters
(normally not needed as this is done automatically)
-C, --clear clear the cache completely
-F, --max-files=N set maximum number of files in cache to N (use 0 for
no limit)
-M, --max-size=SIZE set maximum size of cache to SIZE (use 0 for no
limit; available suffixes: G, M and K; default
suffix: G)
-s, --show-stats show statistics summary
-z, --zero-stats zero statistics counters

-h, --help print this help text
-V, --version print version and copyright information

See also <http://ccache.samba.org>.
/home/ncopa/aports/main/linux-grsec/src/linux-3.0/Makefile:585: *** Your gcc installation does not support plugins. If the necessary headers for plugin support are missing, they should be installed. On Debian, apt-get install gcc-<ver>-plugin-dev.. Stop.
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2



To solve it, you need to encapsulate the $(HOSTCC) and $(CC) with "". Edit line 570 in Makefile from:
Code: Select all
ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-plugin.sh $(HOSTCC) $(CC)), y)

To:
Code: Select all
ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-plugin.sh "$(HOSTCC)" "$(CC)"), y)

Re: 2.2.2-3.0.4-201109150655 fails to build with ccache

PostPosted: Fri Sep 16, 2011 8:33 am
by spender
It'll be fixed in the next patch, thanks!

-Brad