This is a light version of bug 3304. Instead of going through every package and adjusting it, we'll update the template (and possibly documentation) and remind people to add proper flags when setting up new packages and updating old ones.
Implemented by putting the flags in the %configure and %cmake macros. Also mentioned in the template in case neither autoconf or cmake are used.
Fixed in r29941 and r29942.
cmake problem fixed in r30009.
Verified that cmake / configure macros works as expected building fltk and file have the expected optimization flags.
(In reply to comment #3)
> Verified that cmake / configure macros works as expected building fltk and file
> have the expected optimization flags.
file package was a bad test. Retested configure and CFLAGS using gettext package.
Looks good. Closing...