This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] GDB testsuite: Suppress GCC's colored output
Simon Marchi <simon.marchi@polymtl.ca> writes:
> My gcc (5.4) doesn't recognize it:
>
> $ gcc -fno-color-diagnostics test.c
> gcc: error: unrecognized command line option ‘-fno-color-diagnostics’
>
Ah, sorry. What I meant is -fdiagnostics-color=never.
> It knows about -fdiagnostics-color=never however, which clang seems to
> recognize as well. It would be nice however not to restrict the
> compiler version used for testing just for this. Can we write a small
> proc that checks if the compiler recognizes that flag and only include
> it if it does?
Yes, we can do that, but be careful on the recursive calls here. We
want to pass -fdiagnostics-color=never to compiler during compilation,
but we need to check whether compiler understands this option or not.
When we test compiler, we may pass -fdiagnostics-color=never to compiler
to try to compile something again to see if compiler understands.
--
Yao (齐尧)