Skip to content

Commit ab7778a

Browse files
committed
Tools: check for GCC 8, rather than 6
Planning to update to supporting GCC 8 as found in GNU Tools for Arm Embedded Processors 8-2018q4-major. Newer GCC in particular supports ARMv8-M security extensions, and link-time optimisation - two areas of interest. Should be no code changes required, but need to change the warning in the toolchain script.
1 parent 64575fe commit ab7778a

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

tools/test/toolchains/api_test.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def test_gcc_version_check(_run_cmd):
155155
toolchain = TOOLCHAIN_CLASSES["GCC_ARM"](
156156
TARGET_MAP["K64F"], notify=notifier)
157157
toolchain.version_check()
158-
assert notifier.messages == []
158+
assert len(notifier.messages) == 1
159159
_run_cmd.return_value = ("""
160160
arm-none-eabi-gcc (Arch Repository) 8.1.0
161161
Copyright (C) 2018 Free Software Foundation, Inc.
@@ -165,13 +165,21 @@ def test_gcc_version_check(_run_cmd):
165165
toolchain.version_check()
166166
assert len(notifier.messages) == 1
167167
_run_cmd.return_value = ("""
168-
arm-none-eabi-gcc (Arch Repository)
168+
arm-none-eabi-gcc (Arch Repository) 9.1.0
169169
Copyright (C) 2018 Free Software Foundation, Inc.
170170
This is free software; see the source for copying conditions. There is NO
171171
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
172172
""", "", 0)
173173
toolchain.version_check()
174174
assert len(notifier.messages) == 2
175+
_run_cmd.return_value = ("""
176+
arm-none-eabi-gcc (Arch Repository)
177+
Copyright (C) 2018 Free Software Foundation, Inc.
178+
This is free software; see the source for copying conditions. There is NO
179+
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
180+
""", "", 0)
181+
toolchain.version_check()
182+
assert len(notifier.messages) == 3
175183

176184

177185
@given(fixed_dictionaries({

tools/toolchains/gcc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class GCC(mbedToolchain):
3333
STD_LIB_NAME = "lib%s.a"
3434
DIAGNOSTIC_PATTERN = re.compile('((?P<file>[^:]+):(?P<line>\d+):)(?P<col>\d+):? (?P<severity>warning|[eE]rror|fatal error): (?P<message>.+)')
3535

36-
GCC_RANGE = (LooseVersion("6.0.0"), LooseVersion("7.0.0"))
36+
GCC_RANGE = (LooseVersion("8.0.0"), LooseVersion("9.0.0"))
3737
GCC_VERSION_RE = re.compile(b"\d+\.\d+\.\d+")
3838

3939
def __init__(self, target, notify=None, macros=None, build_profile=None,

0 commit comments

Comments
 (0)