[Olsr-dev] hardening 1by1: -O2 on Linux, Android, BSD, Mac OS X

Hans-Christoph Steiner (spam-protected)
Fri Oct 5 23:34:39 CEST 2012


-O2 is set by default in Debian and other distros and is a very commonly
used set of optimizations. It also includes security enhancements like
-D_FORTIFY_SOURCE=2.

The key is that it should be easily overridable for platforms like
OpenWRT that use -Os to make small binaries.

>From what I know, this should be enabled on Linux, Android, BSD, and Mac
OS X.  I don't know enough about the other platforms to say.

Here's the Debian docs on the topic.
http://wiki.debian.org/Hardening#DEB_BUILD_HARDENING_FORTIFY_.28gcc.2BAC8-g.2B-.2B-_-D_FORTIFY_SOURCE.3D2.29

.hc




More information about the Olsr-dev mailing list