diff options
author | lloyd <[email protected]> | 2009-07-31 13:46:16 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-07-31 13:46:16 +0000 |
commit | fa8fe0047479257d5ab30db14f5c718844feb0a1 (patch) | |
tree | 6b3b37f9ca02dff7ff8c2828490e38e4fd88b487 /configure.py | |
parent | 6e22961af44549789af31161a5f3372057d60553 (diff) |
If GCC was not installed configure.py would attempt to execute it on
32-bit machines (for the version check if -fpermissive is needed)
and then fail with an uncaught exception when subprocess.Popen signaled the
problem. Instead note the failure and carry on.
Diffstat (limited to 'configure.py')
-rwxr-xr-x | configure.py | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/configure.py b/configure.py index a1cacb6c8..c92850cda 100755 --- a/configure.py +++ b/configure.py @@ -1038,14 +1038,19 @@ def main(argv = None): return False if not is_64bit_arch(options.arch) and not options.dumb_gcc: - gcc_version = ''.join( - subprocess.Popen(['g++', '-v'], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE).communicate()) - - if re.search('(4\.[01234]\.)|(3\.[34]\.)|(2\.95\.[0-4])', - gcc_version): - options.dumb_gcc = True + try: + + matching_version = '(4\.[01234]\.)|(3\.[34]\.)|(2\.95\.[0-4])' + + gcc_version = ''.join( + subprocess.Popen(['g++', '-v'], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE).communicate()) + + if re.search(matching_version, gcc_version): + options.dumb_gcc = True + except OSError, e: + logging.info('Could not execute GCC for version check') if options.dumb_gcc is True: logging.info('Setting -fpermissive to work around gcc bug') |