On 06/16/2010 01:48 AM, Philip Allison wrote: > On Tue, 2010-06-15 at 20:14 +0200, Ralf Wildenhues wrote: >> Please note that in general, it is impossible for configure tests to be >> -Werror clean. That is not only due to the sheer amount of possible >> erros from different GCC compiler versions (not to speak of others), >> different sets of warning flags, and system-specific issues, but also >> because inherently, some configure tests have to do things that are only >> half-decent C. Thus we strongly recommend to add -Werror only at 'make' >> run time and not at configure time already. > > Hmm... not what I had imagined, but point taken. This was the only > failure of this kind in the particular configure script I was looking > at, but I shall bear this in mind if I run into anything similar in > future. Is there a trivial way to specify cumulative flags at > make-time, as opposed to an override? Not that the latter is a major > issue for me, just means I may have to change a few habits. :)
Coreutils serves as an example of a project that probes whether the compiler supports -Werror, then adds a specific Makefile substitution to append -Werror (or the empty string) to the various CFLAGS throughout the project. You can check out coreutils' ./configure --enable-gcc-warnings option. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature