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 eb7edc8f.
parent 908139d5
Pipeline #33929 failed with stage
in 0 seconds
...@@ -42,22 +42,13 @@ min_version = 5.4 ...@@ -42,22 +42,13 @@ min_version = 5.4
init = init =
import os, subprocess import os, subprocess
parse_version = lambda ver: tuple(map(int, ver.strip().split('.'))) parse_version = lambda ver: tuple(map(int, ver.strip().split('.')))
version_set = set() try:
for command in ('gcc', 'g++', 'gfortran'): current = subprocess.check_output(('gcc', '-dumpfullversion'),
try: stderr=subprocess.STDOUT,
version = subprocess.check_output((command, '-dumpfullversion'), universal_newlines=True).strip()
stderr=subprocess.STDOUT, except subprocess.CalledProcessError: # BBB: old GCC
universal_newlines=True).strip() current = subprocess.check_output(('gcc', '-dumpversion'),
except subprocess.CalledProcessError: # BBB: old GCC universal_newlines=True).strip()
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
self.system_version = current self.system_version = current
# If we're still going to use the same GCC, # If we're still going to use the same GCC,
# the conditions have no impact on the dependant parts. # 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