build: gcc version detection on openSUSE Tumbleweed

PR-URL: https://github.com/joyent/node/pull/25671
Reviewed-By: Alexis Campailla <alexis@janeasystems.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This commit is contained in:
Henrique Aparecido Lavezzo authored and Alexis Campailla committed 2015-08-11 13:59:04 -04:00
1 parent e192f61514
commit 8564a9f5f7
1 file changed
+4 -1
Vendored
+4 -1
View File
@@ -495,7 +495,10 @@ def configure_node(o):
o['variables']['clang'] = 1 if is_clang else 0 o['variables']['clang'] = 1 if is_clang else 0
if not is_clang and cc_version != 0: if not is_clang and cc_version != 0:
o['variables']['gcc_version'] = 10 * cc_version[0] + cc_version[1] try:
o['variables']['gcc_version'] = 10 * cc_version[0] + cc_version[1]
except IndexError:
o['variables']['gcc_version'] = 10 * cc_version[0]
# clang has always supported -fvisibility=hidden, right? # clang has always supported -fvisibility=hidden, right?
if not is_clang and cc_version < (4,0,0): if not is_clang and cc_version < (4,0,0):