System hardening: enable basic options
This PR enables hardening options for all builds.
- It sets FORTIFY_SOURCE = 2 http://man7.org/linux/man-pages/man7/feature_test_macros.7.html
If _FORTIFY_SOURCE is set to 1, with compiler optimization level 1 (gcc -O1) and above, checks that shouldn't change the behavior of conforming programs are performed. With _FORTIFY_SOURCE set to 2, some more checking is added, but some conforming programs might fail.
-
Enables strong stackguard protection STACKPROTECTOR_STRONG https://lwn.net/Articles/584225/
-
Enables ASLR for user space application PKG_ASLR_PIE https://en.wikipedia.org/wiki/Address_space_layout_randomization#Linux