On 09/23/2013 09:32 AM, Paul Eggert wrote: > Eric Blake wrote: >> is this >> something where you can tackle the gnulib patch faster than I can? > > I can test something easily, yes, but I'm not sure what > direction you're headed here.
Basically, gl_WARN_ADD in gnulib/m4/warnings.m4 is trying to probe whether adding -fdiagnostics-show-option to CFLAGS appears to be accepted by the compiler (no change in exit status); and if so, turns it on; but turning it on is wrong for the Sun compiler. Either gl_UNKNOWN_WARNINGS_ARE_ERRORS should add a clause that turns on the ability for Sun to force unknown CFLAGS to be an error, or we need to patch gl_COMPILER_OPTION_IF to scan for the stderr message produced by Sun when it ignores an unknown option and treat that as option-not-supported, instead of the current case of adding it to CFLAGS only to cause link failures later when the linker chokes on an unknown -f option. Having typed that, maybe it's sufficient to change gl_COMPILER_OPTION_IF to use AC_LINK_IFELSE instead of AC_COMPILE_IFELSE? Side note: -fdiagnostics-show-option is very useful for gcc; perhaps we should tweak m4/manywarnings.m4 to add it to the set of warnings probed by default when gcc warnings are enabled, instead of making packages like m4 check for it themselves. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature