diff options
author | lloyd <[email protected]> | 2013-12-14 14:56:28 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2013-12-14 14:56:28 +0000 |
commit | e3f89d3489eea09f7792e88bb283b15332aefbf8 (patch) | |
tree | f50dda7c078d740c3d4281bfee9e8da6bf42cc7d | |
parent | ce0f8e6f66842c83373dd24f70d191e67484d3a5 (diff) |
Add --cc-abi-flags option to configure.py
-rwxr-xr-x | configure.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/configure.py b/configure.py index 211b59547..588c33159 100755 --- a/configure.py +++ b/configure.py @@ -229,8 +229,10 @@ def process_command_line(args): metavar='BINARY', help='set the name of the compiler binary') - target_group.add_option('--chost', dest='chost', - help=optparse.SUPPRESS_HELP) + target_group.add_option('--cc-abi-flags', metavar='FLAG', + help='set compiler ABI flags') + + target_group.add_option('--chost', help=optparse.SUPPRESS_HELP) target_group.add_option('--with-endian', metavar='ORDER', default=None, help='override guess of CPU byte order') @@ -811,21 +813,23 @@ class CompilerInfo(object): """ Return the machine specific ABI flags """ - def mach_abi_link_flags(self, osname, arch, submodel, debug_p): - + def mach_abi_link_flags(self, options): def all(): - if debug_p: + if options.debug_build: return 'all-debug' return 'all' abi_link = set() - for what in [all(), osname, arch, submodel]: + for what in [all(), options.os, options.arch, options.cpu]: if self.mach_abi_linking.get(what) != None: abi_link.add(self.mach_abi_linking.get(what)) + for flag in options.cc_abi_flags.split(' '): + abi_link.add(flag) + if len(abi_link) == 0: return '' - return ' ' + ' '.join(abi_link) + return ' ' + ' '.join(sorted(list(abi_link))) """ @@ -1139,9 +1143,7 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo): 'mp_bits': choose_mp_bits(), - 'cc': (options.compiler_binary or cc.binary_name) + - cc.mach_abi_link_flags(options.os, options.arch, - options.cpu, options.debug_build), + 'cc': (options.compiler_binary or cc.binary_name) + cc.mach_abi_link_flags(options), 'lib_opt': cc.library_opt_flags(options), 'check_opt': '' if options.no_optimizations else cc.check_opt_flags, |