[cairo] [PATCH 2/2] configure : fix unrecognized -Wno option

Chris Wilson chris at chris-wilson.co.uk
Sun Oct 21 01:40:50 PDT 2012


On Sat, 20 Oct 2012 20:22:51 +0200, Gilles Espinasse <g.esp at free.fr> wrote:
> Signed-off-by: Gilles Espinasse <g.esp at free.fr>
> 
> gcc-4.4 and later accept every -Wno option
> Test for the option without no in the name to check if the option is supported.
> 
> Each time a warning is emitted and without this fix, on gcc-4.4 that will add this warning:
> cc1: warning: unrecognized command line option "-Wno-unused-but-set-variable"

I'm not convinced this is the best approach, it seems fragile to assume
that GCC will accept all -Wno options. Could we not improve the
detection of an unsupported flag instead? If it requires a warning to
generate the spurious warning, maybe we should just fill the test code
with junk...

The other question is which is the lesser evil?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the cairo mailing list