Commit e5be4302 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

Revert "component/default: system gcc can be used only if all gcc, g++ and...

Revert "component/default: system gcc can be used only if all gcc, g++ and gfortran exist and their versions are same."

This reverts commit eb7edc8ff1cba0667e31d75bc0dc61031ae1ba53.
parent 908139d5
......@@ -42,22 +42,13 @@ min_version = 5.4
init =
import os, subprocess
parse_version = lambda ver: tuple(map(int, ver.strip().split('.')))
version_set = set()
for command in ('gcc', 'g++', 'gfortran'):
try:
version = subprocess.check_output((command, '-dumpfullversion'),
stderr=subprocess.STDOUT,
universal_newlines=True).strip()
except subprocess.CalledProcessError: # BBB: old GCC
version = subprocess.check_output((command, '-dumpversion'),
universal_newlines=True).strip()
except FileNotFoundError:
version = None
version_set.add(version)
if None in version_set or len(version_set) != 1:
current = '0.0.0'
else:
current, = version_set
try:
current = subprocess.check_output(('gcc', '-dumpfullversion'),
stderr=subprocess.STDOUT,
universal_newlines=True).strip()
except subprocess.CalledProcessError: # BBB: old GCC
current = subprocess.check_output(('gcc', '-dumpversion'),
universal_newlines=True).strip()
self.system_version = current
# If we're still going to use the same GCC,
# the conditions have no impact on the dependant parts.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment