[torquedev] Useful GCC flags for security/error catching

Chris Samuel csamuel at vpac.org
Wed Jul 22 01:22:15 MDT 2009

The Ubuntu Wiki has a useful page on GCC flags that
are used by default to build there packages.  These
are of interest as they relate to catching things
like smashing the stack and unchecked return values,


FWIW 2.3.7 compiles cleanly when adding:

 -fstack-protector -Wformat -Wformat-security -DFORTIFY_SOURCE=2

to the standard CFLAGS (which is nice!).

Christopher Samuel - (03) 9925 4751 - Systems Manager
 The Victorian Partnership for Advanced Computing
 P.O. Box 201, Carlton South, VIC 3053, Australia
VPAC is a not-for-profit Registered Research Agency

More information about the torquedev mailing list