aboutsummaryrefslogtreecommitdiffstats
path: root/configure.py
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-02-04 23:19:40 -0500
committerJack Lloyd <[email protected]>2017-02-04 23:19:40 -0500
commit7cfb839be6e386dc068b140fe883c7bc3ac60c80 (patch)
treec5540c4517561c964531bee394d2f2a71c607cff /configure.py
parent8efc26812b3234acfdee099d6e343722f26bef24 (diff)
Make it possible to disable stack smashing protection.
Also reflect anything in ABI flags into pkg-config Libs field. GH #863
Diffstat (limited to 'configure.py')
-rwxr-xr-xconfigure.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/configure.py b/configure.py
index 29fea93b9..9f4246775 100755
--- a/configure.py
+++ b/configure.py
@@ -278,6 +278,9 @@ def process_command_line(args):
build_group.add_option('--with-sanitizers', action='store_true', default=False, dest='with_sanitizers',
help='enable ASan/UBSan checks')
+ build_group.add_option('--without-stack-protector', action='store_false', default=True, dest='with_stack_protector',
+ help='disable stack smashing protections')
+
build_group.add_option('--with-coverage', action='store_true', default=False, dest='with_coverage',
help='add coverage info and disable opts')
@@ -908,6 +911,7 @@ class CompilerInfo(object):
'size_optimization_flags': '',
'coverage_flags': '',
'sanitizer_flags': '',
+ 'stack_protector_flags': '',
'shared_flags': '',
'lang_flags': '',
'warning_flags': '',
@@ -983,6 +987,9 @@ class CompilerInfo(object):
if flag != None and flag != '' and flag not in abi_link:
abi_link.append(flag)
+ if options.with_stack_protector and self.stack_protector_flags != '':
+ abi_link.append(self.stack_protector_flags)
+
if options.with_coverage_info:
if self.coverage_flags == '':
raise ConfigureError('No coverage handling for %s' % (self.basename))
@@ -1008,9 +1015,7 @@ class CompilerInfo(object):
if options.cc_abi_flags != '':
abi_flags += ' ' + options.cc_abi_flags
- if abi_flags != '':
- return ' ' + abi_flags
- return ''
+ return abi_flags
def cc_warning_flags(self, options):
def gen_flags():