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

Chris Wilson <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On Sun, 21 Oct 2012 12:59:06 +0200 (CEST), [email protected] wrote:
> This behavior is described in gcc-4.4 announce http://gcc.gnu.org/gcc-4.4/changes.html
> and on later versions in the manual
> http://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/Warning-Options.html#Warning-Options
> 
> A new option has even be added after gcc-4.4 to control that behavior with -Wunknown-warning/-Wno-unknown-warning but as this new option is not know on gcc-4.4, the new option can't be used there unless using the same trick aka test if -Wunknown-warning is supported and use -Wno-unknown-warning. So there is actually no gain with that option until the last supported compiler know this new option.
> 
> Detection was made in a similar way in openssh(portable) or using makefile in linux/scripts/Kbuild.include with
> # cc-disable-warning
> # Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable)
> cc-disable-warning = $(call try-run,\
> 	$(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1)))

Thanks for the information. So my conclusion is that this patch looks
to be the lesser evil, and so I've applied it.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.