|
From: Warzone 2. T. <in...@de...> - 2012-05-20 02:28:50
|
#3493: fails to build from source with GCC hardening options
-------------------------+-------------------------------------------------
Reporter: pabs | Type: patch (an actual patch, not a
Status: new | request for one)
Milestone: | Priority: normal
unspecified | Component: other
Version: 3.1 | Keywords:
beta10 | Blocking:
Blocked By: |
Operating System: All |
/Non-Specific |
-------------------------+-------------------------------------------------
The attached patch fixes building from source while enabling the GCC
hardening options:
CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat
-Werror=format-security"
CXXFLAGS="-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4
-Wformat -Werror=format-security"
LDFLAGS="-fPIE -pie -Wl,-z,relro -Wl,-z,now"
This is how Debian enables these options (other distros turn them on by
default in GCC):
https://wiki.debian.org/Hardening
--
Ticket URL: <http://developer.wz2100.net/ticket/3493>
Warzone 2100 Trac <http://developer.wz2100.net/>
The Warzone 2100 Project
|