Ensure __GNUC_PATCHLEVEL__ is always of str type

This commit is contained in:
Thomas Nagy 2015-08-07 10:48:22 +02:00
parent a98baba3e8
commit 45ffae6d4e
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
1 changed files with 1 additions and 4 deletions

View File

@ -1083,10 +1083,7 @@ def get_cc_version(conf, cc, gcc=False, icc=False, clang=False):
# Some versions of OSX have a faux-gcc "clang" without clang version defines
conf.env['CC_VERSION'] = (k['__GNUC__'], k['__GNUC_MINOR__'], k['__GNUC_PATCHLEVEL__'])
else:
try:
conf.env['CC_VERSION'] = (k['__GNUC__'], k['__GNUC_MINOR__'], k['__GNUC_PATCHLEVEL__'])
except KeyError:
conf.env['CC_VERSION'] = (k['__GNUC__'], k['__GNUC_MINOR__'], 0)
conf.env['CC_VERSION'] = (k['__GNUC__'], k['__GNUC_MINOR__'], k.get('__GNUC_PATCHLEVEL__', '0'))
return k
@conf