[ccache] -fdiagnostics-color problem

Joel Rosdahl joel at rosdahl.net
Wed Nov 19 13:29:43 MST 2014


Hi Tal,

> [...] when ccache runs the real compiler it removes the color flag from
the
> command line causing the build to succeed: [...]

I believe the attached patch should fix the problem. Could you give it a
spin and see if it works for you?

-- Joel


On 18 November 2014 12:16, tal zilcer <tal.zilcer at gmail.com> wrote:

> 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
> _______________________________________________
> ccache mailing list
> ccache at lists.samba.org
> https://lists.samba.org/mailman/listinfo/ccache
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Pass-fdiagnostics-color-auto-to-the-compiler-even-if.patch
Type: text/x-patch
Size: 1096 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/ccache/attachments/20141119/884bbb8f/attachment.bin>


More information about the ccache mailing list