2.2.2-3.0.4-201109150655 fails to build with ccache

Discuss and suggest new grsecurity features

2.2.2-3.0.4-201109150655 fails to build with ccache

Postby ncopa » Fri Sep 16, 2011 5:06 am

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)
ncopa
 
Posts: 7
Joined: Thu Jan 28, 2010 1:32 pm

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

Postby spender » Fri Sep 16, 2011 8:33 am

It'll be fixed in the next patch, thanks!

-Brad
spender
 
Posts: 2185
Joined: Wed Feb 20, 2002 8:00 pm


Return to grsecurity development

cron