[ccache] -fdiagnostics-color problem

tal zilcer tal.zilcer at gmail.com
Tue Nov 18 04:16:47 MST 2014


hi,

ive been using ccache for quite some time now(version 3.1.9) and decided to
upgrade to 3.2.
when i try to build buildroot for x86_64 platform with ccache i have a
build error,
because of the -fdiagnostics-color=auto flag.
from build log:
>>> host-kmod 18 Building
...
...
cc1: error: unrecognized command line option "-fdiagnostics-color=auto"

when configure runs for host-kmod it checks if it can use the color flag:
checking if /home/workspace/ccache_3.2/host/usr/bin/ccache /usr/bin/gcc
-std=gnu99 supports flag -fdiagnostics-color=auto in envvar CFLAGS... yes
from ccache log:
2014-11-18T11:40:25.004210 5163 ] Command line:
/home//workspace/ccache_3.2/host/usr/bin/ccache /usr/bin/gcc -std=gnu99 -c
-Werror -fdiagnostics-color=auto
-I/home/workspace/ccache_3.2//host/usr/include conftest.c

when ccache runs the real compiler it removes the color flag from the
command line causing the build to succeed:
[2014-11-18T11:40:25.006572 5163 ] Executing /usr/bin/gcc -std=gnu99
-Werror -I../../host/usr/include -E conftest.c

so as a result configure thinks -fdiagnostics-color=auto is supported and
later in the build phase
it fails to run the real compiler.

the relevant commit in ccache is: d875edef19d0ab157b2f6408330bb1392fd38f60

any ideas what should i do?
is this a bug?

thanks,
tal


More information about the ccache mailing list