blob: 9dc1d011752da4c6fd2006f158f313cd5db5f678 [file] [log] [blame]
configure: fix gcc version detection
Configure script breaks on gcc version number "4.9.x-google"
--- configure 2015-05-01 15:09:04.313217659 -0700
+++ configure 2015-05-01 15:09:31.625469167 -0700
@@ -466,6 +466,13 @@
return matchup.get(arch, 'ia32')
+def int_lenient(n):
+ try:
+ return int(n)
+ except ValueError:
+ return 0
+
+
def compiler_version():
try:
proc = subprocess.Popen(shlex.split(CC) + ['--version'],
@@ -477,7 +484,7 @@
proc = subprocess.Popen(shlex.split(CC) + ['-dumpversion'],
stdout=subprocess.PIPE)
- version = tuple(map(int, proc.communicate()[0].split('.')))
+ version = tuple(map(int_lenient, proc.communicate()[0].split('.')))
return (version, is_clang)