RFC: RPM build flags

Tom Lane tgl at redhat.com
Tue Feb 17 06:45:28 UTC 2009


Here's a not entirely tongue in cheek suggestion: the default build
flags should include -fno-strict-aliasing.

I have spent most of today slogging through the compiler warnings
for a random sample of packages (well, maybe not totally random,
they're the dependencies of unixODBC).  What I saw convinced me
of something I'd suspected for awhile: there is not any significant
chunk of C code anywhere that isn't broken by strict-aliasing
optimizations.  If I were the maintainer of any of those packages
I'd be setting -fno-strict-aliasing into CFLAGS.  Take a look at
your own packages and see if you don't see a few warnings about
things possibly or definitely violating strict-aliasing rules ...
and then remember that gcc is still not bright enough to warn
you about all the places where it'll break your code.

I'm sure the gcc boys will be screaming about this suggestion,
but I think putting -fno-strict-aliasing into default CFLAGS
might be the single easiest thing we could do to improve the
reliability of F11.

			regards, tom lane




More information about the fedora-devel-list mailing list