summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/gcc.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/gcc.py b/tools/gcc.py
index 525e11c44b..2e29c8f34b 100644
--- a/tools/gcc.py
+++ b/tools/gcc.py
@@ -46,6 +46,24 @@ def CheckHeader(rtconfig, filename):
if os.path.isfile(fn):
return True
+ # 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 False
def GetNewLibVersion(rtconfig):