Enable -mzero-caller-saved-regs

This flag will zero caller-touched register values upon function
return as a security feature.
This commit is contained in:
William Douglas
2018-02-22 18:05:18 +00:00
committed by Matthew Johnson
parent 054d2fa242
commit 6b6f03bc1f
+1
View File
@@ -436,6 +436,7 @@ class Specfile(object):
flags.extend(["-Os", "-ffunction-sections", "-fdata-sections", "-fno-semantic-interposition"])
if config.config_opts['security_sensitive']:
flags.append("-fstack-protector-strong")
flags.append("-mzero-caller-saved-regs")
if self.need_avx2_flags:
flags.extend(["-O3", "-march=haswell"])
if self.need_avx512_flags: