Build portability: enable or disable warnings
Dr Andrew John Hughes
ahughes at redhat.com
Mon May 16 14:23:20 UTC 2011
On 14:03 Mon 16 May , Andrew Haley wrote:
> On 05/16/2011 12:08 PM, Dalibor Topic wrote:
> > On 5/16/11 12:48 PM, Andrew Haley wrote:
> >> On 16/05/11 11:22, Dalibor Topic wrote:
> >>> Any idea why, for example Fedora's & Debian's, default warning sets differ?
> >>
> >> Because the distros patch their versions of gcc.
> >
> > I don't see how the implication follows just yet - do you have an example?
>
> Yes. Debian and Gentoo turn on the -Wformat option by default.
>
We've seen the patches, at least in Gentoo's case:
http://mirror.bytemark.co.uk/gentoo/distfiles/gcc-4.6.0-patches-1.2.tar.bz2
> > The reason I'm asking is that I'm wondering if this is something we
> > should expect to crop up in different parts of the code base, or
> > whether it's a one off due to some specific thing some distros chose
> > to do different from each other.
>
> That's hard to say. It certainly could crop in other parts of the
> code base, and I'm surprised it doesn't happen regularly. I'm rather
> appalled that distros do this kind of thing, TBH.
>
I think the issue is actually having -Werror enabled for all builds, not
just debug builds. Without that, these additional warnings would just be
noise. Having -Werror on also causes problems just upgrading the version
of gcc, regardless of distro-specific patching, as new warnings are
introduced or old ones reclassified.
> Andrew.
--
Andrew :)
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
Support Free Java!
Contribute to GNU Classpath and IcedTea
http://www.gnu.org/software/classpath
http://icedtea.classpath.org
PGP Key: F5862A37 (https://keys.indymedia.org/)
Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37
More information about the build-dev
mailing list