ソースを参照

Merge pull request #3060 from hollylee/hollylee-patch-gccroot

Hollylee patch gccroot
Bernard Xiong 5 年 前
コミット
c6b7d14bf4
1 ファイル変更18 行追加0 行削除
  1. 18 0
      tools/gcc.py

+ 18 - 0
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):