Skip to content

Commit 44e5795

Browse files
committed
tools: Remove gcc version check warning
Remove the GCC version check warning, as it's not necessary for the tools to print supported GCC versions. Refer to the documentation for the version of Mbed OS you are using instead. The warning is likewise not future proof, as newer versions of GCC may work fine, yet annoyingly one still sees a warning about it.
1 parent 432cf28 commit 44e5795

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed

tools/toolchains/gcc.py

+1-27
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ class GCC(mbedToolchain):
3636
STD_LIB_NAME = "lib%s.a"
3737
DIAGNOSTIC_PATTERN = re.compile('((?P<file>[^:]+):(?P<line>\d+):)(?P<col>\d+):? (?P<severity>warning|[eE]rror|fatal error): (?P<message>.+)')
3838

39-
GCC_RANGE = (LooseVersion("9.0.0"), LooseVersion("10.0.0"))
40-
GCC_VERSION_RE = re.compile(b"\d+\.\d+\.\d+")
4139
DWARF_PRODUCER_RE = re.compile(r'(DW_AT_producer)(.*:\s*)(?P<producer>.*)')
4240

4341
def __init__(self, target, notify=None, macros=None, build_profile=None,
@@ -179,31 +177,7 @@ def __init__(self, target, notify=None, macros=None, build_profile=None,
179177
self.coverage_ld.remove(flag)
180178

181179
def version_check(self):
182-
stdout, _, retcode = run_cmd([self.cc[0], "--version"], redirect=True)
183-
msg = None
184-
match = self.GCC_VERSION_RE.search(stdout.encode("utf-8"))
185-
if match:
186-
found_version = LooseVersion(match.group(0).decode('utf-8'))
187-
else:
188-
found_version = None
189-
min_ver, max_ver = self.GCC_RANGE
190-
if found_version and (found_version < min_ver
191-
or found_version >= max_ver):
192-
msg = ("Compiler version mismatch: Have {}; "
193-
"expected version >= {} and < {}"
194-
.format(found_version, min_ver, max_ver))
195-
elif not match:
196-
msg = ("Compiler version mismatch: Could not detect version; "
197-
"expected version >= {} and < {}"
198-
.format(min_ver, max_ver))
199-
if msg:
200-
self.notify.cc_info({
201-
"message": msg,
202-
"file": "",
203-
"line": "",
204-
"col": "",
205-
"severity": "Warning",
206-
})
180+
return
207181

208182
def is_not_supported_error(self, output):
209183
return "error: #error [NOT_SUPPORTED]" in output

0 commit comments

Comments
 (0)