未验证 提交 723ca994 编写于 作者: H hollylee 提交者: GitHub

GetGCCRoot() for usual toolchain dir structures

So don't depend on any special assumptions. See comments in the codes.
上级 2ed84b61
......@@ -37,6 +37,24 @@ def GetGCCRoot(rtconfig):
else:
root_path = os.path.join(exec_path, '..', prefix)
# Usually the cross compiling gcc toolchain has directory as:
#
# bin
# lib
# share
# arm-none-eabi
# bin
# include
# lib
# share
prefix = rtconfig.PREFIX
if prefix.endswith('-'):
prefix = prefix[:-1]
fn = os.path.join(root, prefix, 'include', filename)
if os.path.isfile(fn):
return True
return root_path
def CheckHeader(rtconfig, filename):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册