Comment 1 for bug 1317307

Revision history for this message
Steve Beattie (sbeattie) wrote :

Attached is an updated version of gcc-default-ssp.diff that enables -fstack-protector-strong by default for gcc-4.9. In addition to enabling the default, it fixes the following testsuite failures:

-FAIL: gcc.dg/fstack-protector-strong.c scan-assembler-times stack_chk_fail 10
-FAIL: g++.dg/fstack-protector-strong.C -std=gnu++98 scan-assembler-times stack_chk_fail 2
-FAIL: g++.dg/fstack-protector-strong.C -std=gnu++11 scan-assembler-times stack_chk_fail 2
-FAIL: g++.dg/fstack-protector-strong.C -std=gnu++1y scan-assembler-times stack_chk_fail 2

I did need to update one of the tests that was generating an additional test failure; I'll attach that patch in just a second.

I've added tests to lp:qa-regression-testing to verify that -fstack-protector-strong works and is the default option for utopic's compiler.