Bladeren bron

[libc]解决龙芯内置工具链没有sys/select.h的问题

Meco Man 3 jaren geleden
bovenliggende
commit
42e61f7a63

+ 0 - 0
components/libc/compilers/common/none-gcc/SConscript → components/libc/compilers/common/nogcc/SConscript


+ 0 - 0
components/libc/compilers/common/none-gcc/readme.md → components/libc/compilers/common/nogcc/readme.md


+ 0 - 0
components/libc/compilers/common/none-gcc/sys/errno.h → components/libc/compilers/common/nogcc/sys/errno.h


+ 0 - 0
components/libc/compilers/common/none-gcc/sys/select.h → components/libc/compilers/common/nogcc/sys/select.h


+ 0 - 0
components/libc/compilers/common/none-gcc/sys/stat.h → components/libc/compilers/common/nogcc/sys/stat.h


+ 0 - 0
components/libc/compilers/common/none-gcc/sys/types.h → components/libc/compilers/common/nogcc/sys/types.h


+ 0 - 0
components/libc/compilers/common/none-gcc/sys/unistd.h → components/libc/compilers/common/nogcc/sys/unistd.h


+ 0 - 0
components/libc/compilers/common/none-gcc/unistd.h → components/libc/compilers/common/nogcc/unistd.h


+ 15 - 0
components/libc/compilers/common/partial/SConscript

@@ -0,0 +1,15 @@
+# RT-Thread building script for bridge
+
+import os
+from building import *
+
+cwd = GetCurrentDir()
+objs = []
+list = os.listdir(cwd)
+
+for d in list:
+    path = os.path.join(cwd, d)
+    if os.path.isfile(os.path.join(path, 'SConscript')):
+        objs = objs + SConscript(os.path.join(d, 'SConscript'))
+
+Return('objs')

+ 18 - 0
components/libc/compilers/common/partial/ls1/SConscript

@@ -0,0 +1,18 @@
+from shutil import copy
+from building import *
+
+Import('rtconfig')
+
+src   = []
+cwd   = GetCurrentDir()
+CPPPATH = [cwd]
+group = []
+
+# There is no 'sys/select.h' in these bsp's gcc toolchain; thus, we need to copy this file from 'nogcc/sys/select.h'
+if GetDepend('SOC_LS1B') or GetDepend('SOC_LS1C300'):
+    copy("../../nogcc/sys/select.h", "sys/select.h")
+    if GetDepend('RT_USING_LIBC'):
+        src += Glob('*.c')
+    group = DefineGroup('libc', src, depend = [], CPPPATH = CPPPATH)
+
+Return('group')