4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-19 05:51:24 +08:00

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

This commit is contained in:
Meco Man 2021-09-14 22:21:13 -04:00
parent aa8a493c3c
commit 42e61f7a63
10 changed files with 33 additions and 0 deletions

View File

@ -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')

View File

@ -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')