This commit is contained in:
2024-08-05 20:57:09 +08:00
commit 46d9ee7795
3020 changed files with 1725767 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
import os
from building import *
from gcc import *
Import('rtconfig')
group = []
musllibc_version = GetMuslVersion(rtconfig)
if musllibc_version:
print('Musl version: ' + musllibc_version)
cwd = GetCurrentDir()
src = Glob('*.c')
CPPPATH = [cwd]
CPPDEFINES = ['RT_USING_MUSLLIBC', 'RT_USING_LIBC']
LIBS = ['c', 'gcc']
LINKFLAGS = ' --specs=kernel.specs'
AddDepend(['RT_USING_MUSLLIBC', 'RT_USING_LIBC'])
group = group + DefineGroup('Compiler', src, depend = [''], CPPPATH = CPPPATH, LINKFLAGS = LINKFLAGS, CPPDEFINES = CPPDEFINES, LIBS = LIBS)
list = os.listdir(cwd)
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
group = group + SConscript(os.path.join(d, 'SConscript'))
Return('group')

View File

@@ -0,0 +1,49 @@
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-09-02 Meco Man First version
*/
#ifndef __FCNTL_H__
#define __FCNTL_H__
#include_next <fcntl.h>
#define O_CREAT 0100
#define O_EXCL 0200
#define O_NOCTTY 0400
#define O_TRUNC 01000
#define O_APPEND 02000
#define O_NONBLOCK 04000
#define O_DSYNC 010000
#define O_SYNC 04010000
#define O_RSYNC 04010000
#define O_DIRECTORY 040000
#define O_NOFOLLOW 0100000
#define O_CLOEXEC 02000000
#define O_ASYNC 020000
#define O_DIRECT 0200000
#define O_LARGEFILE 0400000
#define O_NOATIME 01000000
#define O_PATH 010000000
#define O_TMPFILE 020040000
#define O_NDELAY O_NONBLOCK
#ifndef O_BINARY
#define O_BINARY 00
#endif
#ifndef O_SEARCH
#define O_SEARCH O_PATH
#endif /* O_SEARCH */
#ifndef O_EXEC
#define O_EXEC O_PATH
#endif /* O_EXEC */
#endif

View File

@@ -0,0 +1,20 @@
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2022-11-18 Meco Man first version
*/
#include <rtthread.h>
int *__errno_location(void)
{
return _rt_errno();
}
int *___errno_location(void)
{
return _rt_errno();
}