diff options
Diffstat (limited to 'components')
| -rw-r--r-- | components/libc/compilers/armlibc/SConscript | 4 | ||||
| -rw-r--r-- | components/libc/compilers/dlib/SConscript | 5 | ||||
| -rw-r--r-- | components/libc/compilers/newlib/SConscript | 5 | ||||
| -rw-r--r-- | components/libc/posix/io/stdio/libc.c | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/components/libc/compilers/armlibc/SConscript b/components/libc/compilers/armlibc/SConscript index ba0d48ae05..4304deecac 100644 --- a/components/libc/compilers/armlibc/SConscript +++ b/components/libc/compilers/armlibc/SConscript @@ -4,9 +4,9 @@ Import('rtconfig') src = Glob('*.c') group = [] -CPPDEFINES = ['RT_USING_ARM_LIBC', 'RT_USING_LIBC', '__STDC_LIMIT_MACROS'] - if rtconfig.PLATFORM in ['armcc', 'armclang']: + CPPDEFINES = ['RT_USING_ARMLIBC', 'RT_USING_LIBC', '__STDC_LIMIT_MACROS'] + AddDepend(['RT_USING_ARMLIBC', 'RT_USING_LIBC']) group = DefineGroup('Compiler', src, depend = [''], CPPDEFINES = CPPDEFINES) Return('group') diff --git a/components/libc/compilers/dlib/SConscript b/components/libc/compilers/dlib/SConscript index 9c1c8a8ba2..98f664e8d9 100644 --- a/components/libc/compilers/dlib/SConscript +++ b/components/libc/compilers/dlib/SConscript @@ -4,9 +4,10 @@ Import('rtconfig') src = Glob('*.c') group = [] -CPPDEFINES = ['RT_USING_DLIBC', 'RT_USING_LIBC', '_DLIB_ADD_EXTRA_SYMBOLS=0'] - if rtconfig.PLATFORM in ['iccarm']: + CPPDEFINES = ['RT_USING_DLIBC', 'RT_USING_LIBC', '_DLIB_ADD_EXTRA_SYMBOLS=0'] + AddDepend(['RT_USING_DLIBC', 'RT_USING_LIBC']) + if GetDepend('DFS_USING_POSIX'): from distutils.version import LooseVersion from iar import IARVersion diff --git a/components/libc/compilers/newlib/SConscript b/components/libc/compilers/newlib/SConscript index ab2d3517e2..dd8966d5bd 100644 --- a/components/libc/compilers/newlib/SConscript +++ b/components/libc/compilers/newlib/SConscript @@ -17,11 +17,10 @@ if rtconfig.PLATFORM in ['gcc']: print('Newlib version:' + GetNewLibVersion(rtconfig)) # identify this is Newlib, and only enable POSIX.1-1990 - CPPDEFINES = ['RT_USING_NEWLIB', 'RT_USING_LIBC', '_POSIX_C_SOURCE=1'] - + CPPDEFINES = ['RT_USING_NEWLIBC', 'RT_USING_LIBC', '_POSIX_C_SOURCE=1'] + AddDepend(['RT_USING_NEWLIBC', 'RT_USING_LIBC']) group = DefineGroup('Compiler', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES, LIBS = LIBS) - list = os.listdir(cwd) for d in list: path = os.path.join(cwd, d) diff --git a/components/libc/posix/io/stdio/libc.c b/components/libc/posix/io/stdio/libc.c index ebdc3a537b..aa33b25d11 100644 --- a/components/libc/posix/io/stdio/libc.c +++ b/components/libc/posix/io/stdio/libc.c @@ -33,7 +33,7 @@ int libc_system_init(void) } INIT_COMPONENT_EXPORT(libc_system_init); -#if defined(RT_USING_POSIX_STDIO) && defined(RT_USING_NEWLIB) +#if defined(RT_USING_POSIX_STDIO) && defined(RT_USING_NEWLIBC) #define STDIO_DEVICE_NAME_MAX 32 static FILE* std_console = NULL; int libc_stdio_set_console(const char* device_name, int mode) @@ -134,7 +134,7 @@ int libc_stdio_set_console(const char* device_name, int mode) int libc_stdio_get_console(void) { return std_fd; } -#endif /* defined(RT_USING_POSIX_STDIO) && defined(RT_USING_NEWLIB) */ +#endif /* defined(RT_USING_POSIX_STDIO) && defined(RT_USING_NEWLIBC) */ int isatty(int fd) { |
