Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
104
Merge Requests
104
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
f0c9b57c
Commit
f0c9b57c
authored
Apr 05, 2024
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
component/default: system gcc can be used only if all gcc, g++ and gfortran exist.
parent
9e769522
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
component/defaults.cfg
component/defaults.cfg
+16
-7
No files found.
component/defaults.cfg
View file @
f0c9b57c
...
...
@@ -42,13 +42,22 @@ min_version = 5.4
init =
import os, subprocess
parse_version = lambda ver: tuple(map(int, ver.strip().split('.')))
version_list = []
for command in ('gcc', 'g++', 'gfortran'):
try:
current = subprocess.check_output(('gcc'
, '-dumpfullversion'),
version = subprocess.check_output((command
, '-dumpfullversion'),
stderr=subprocess.STDOUT,
universal_newlines=True).strip()
except subprocess.CalledProcessError: # BBB: old GCC
current = subprocess.check_output(('gcc'
, '-dumpversion'),
version = subprocess.check_output((command
, '-dumpversion'),
universal_newlines=True).strip()
except FileNotFoundError:
version = None
version_list.append(version)
if None in version_list:
current = '0.0.0'
else:
current = sorted(version_list, key=parse_version)[0]
self.system_version = current
# If we're still going to use the same GCC,
# the conditions have no impact on the dependant parts.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment