From 80a0a80874be02c7e2e4d4957d85b03c787e14ba Mon Sep 17 00:00:00 2001 From: weety <494406036@qq.com> Date: Wed, 28 Aug 2019 16:52:58 +0800 Subject: [PATCH] Compatible with gcc-arm-none-eabi toolchain under linux. --- tools/gcc.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/gcc.py b/tools/gcc.py index 11751ebeec..0b5b2c3a20 100644 --- a/tools/gcc.py +++ b/tools/gcc.py @@ -32,7 +32,12 @@ def GetGCCRoot(rtconfig): if prefix.endswith('-'): prefix = prefix[:-1] - root_path = os.path.join(exec_path, '..', prefix) + if exec_path == '/usr/bin': + root_path = os.path.join('/usr/lib', prefix) + print(root_path) + else: + root_path = os.path.join(exec_path, '..', prefix) + print(root_path) return root_path