https://bugzilla.redhat.com/show_bug.cgi?id=827167
--- Comment #10 from Brendan Jones brendan.jones.it@gmail.com --- epel6 is what you use for building on RHEL. You can test it using mock or koji build --scratch dist-6E-epel some-package-srpm
You still need to pass %optflags to all your other make lines
I wouldn't concern your self with Fedora 15 - its reaching ending of life right now and no more builds are being accepted for it in Fedora.
the -fno-stack-protector is correct - GC gives the last option precendence. This also works but I think is a little messy: CFLAGS=`echo %{optflags}|sed -e 's|-fstack-protector|-fno-stack-protector|'`