diff options
author | Nomis101 <[email protected]> | 2019-04-22 20:31:28 +0200 |
---|---|---|
committer | Bradley Sepos <[email protected]> | 2019-06-19 14:10:45 -0400 |
commit | 5351c1f6194f8e12d30bc693c0dfe75c87b21410 (patch) | |
tree | 05059aa6dd57493a28a24e9afb85a90d9b262743 /make/configure.py | |
parent | 79ea65ee6d16d93bf1c536fedfb49b0d29a25fc3 (diff) |
build: Add --enable-hardening flag to enable stack protection and enhanced buffer overflow protection.
Prints the hardening status on global init to the log. Closes #2027. Was #2040.
Diffstat (limited to 'make/configure.py')
-rw-r--r-- | make/configure.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/make/configure.py b/make/configure.py index b3dcc205e..eb12c34c9 100644 --- a/make/configure.py +++ b/make/configure.py @@ -686,7 +686,7 @@ class ArchAction( Action ): ## special cases in that powerpc does not match gcc -arch value ## which we like to use; so it has to be removed. - ## note: we don't know if apple will release Ssnow Leopad/ppc64 yet; just a guess. + ## note: we don't know if apple will release Snow Leopard/ppc64 yet; just a guess. if 'powerpc' in self.mode: del self.mode['powerpc'] self.mode.mode = 'ppc' @@ -1399,6 +1399,8 @@ def createCLI( cross = None ): arch.mode.cli_add_argument( grp, '--arch' ) grp.add_argument( '--cross', default=None, action='store', metavar='SPEC', help='specify GCC cross-compilation spec' ) + grp.add_argument( '--enable-hardening', dest="enable_host_harden", default=None, action='store_true', + help='enable buffer overflow protection' ) cli.add_argument_group( grp ) ## add Xcode options @@ -1948,6 +1950,7 @@ int main() doc.add( 'HOST.cross.prefix', '' ) doc.add( 'HOST.arch', arch.mode.mode ) + doc.add( 'HOST.harden', int( options.enable_host_harden != None)) doc.addBlank() doc.add( 'SRC', cfg.src_final ) |