From 3ede7630c07f09852163f298a57c23d68c9eb984 Mon Sep 17 00:00:00 2001 From: zhangjun <2281979437@qq.com> Date: Thu, 22 Aug 2019 15:34:50 +0800 Subject: [components][libc][compilers][common]拆分armcc和iar的time相关函数到common目录,同时修复原来在使用LIBC时time相关函数的BUG(armcc下使用gmtime、localtime、mktime会导致崩溃) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/libc/compilers/common/SConscript | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'components/libc/compilers/common/SConscript') diff --git a/components/libc/compilers/common/SConscript b/components/libc/compilers/common/SConscript index 02bf49941d..d4ec321dc1 100644 --- a/components/libc/compilers/common/SConscript +++ b/components/libc/compilers/common/SConscript @@ -2,11 +2,18 @@ from building import * Import('rtconfig') -src = Glob('*.c') +src = [] cwd = GetCurrentDir() group = [] CPPPATH = [cwd] -group = DefineGroup('libc', src, depend = ['RT_USING_LIBC'], CPPPATH = CPPPATH) +if GetDepend('RT_USING_LIBC'): + src += Glob('*.c') +else: + if GetDepend('RT_USING_MINI_TIME'): + src += ['time.c'] + +if (rtconfig.PLATFORM == 'armcc' or rtconfig.PLATFORM == 'iar') and rtconfig.ARCH != 'sim' : + group = DefineGroup('libc', src, depend = [''], CPPPATH = CPPPATH) Return('group') -- cgit v1.3.1 From 9714b520c43570c028b49adc650c82f005c03b27 Mon Sep 17 00:00:00 2001 From: zhangjun <2281979437@qq.com> Date: Thu, 22 Aug 2019 15:59:51 +0800 Subject: [components][libc]修改Kconfig选项名 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/libc/Kconfig | 4 ++-- components/libc/compilers/common/SConscript | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'components/libc/compilers/common/SConscript') diff --git a/components/libc/Kconfig b/components/libc/Kconfig index d870ba0581..2d1e9315f1 100644 --- a/components/libc/Kconfig +++ b/components/libc/Kconfig @@ -40,8 +40,8 @@ if RT_USING_LIBC && RT_USING_DFS endif if RT_USING_LIBC != y - config RT_USING_MINI_TIME - bool "Enable MINI TIME FUNCTIONS WITHOUT COMPILER'S LIBC" + config RT_LIBC_USING_TIME + bool "Enable TIME FUNCTIONS WITHOUT COMPILER'S LIBC" default y endif diff --git a/components/libc/compilers/common/SConscript b/components/libc/compilers/common/SConscript index d4ec321dc1..a8d2606820 100644 --- a/components/libc/compilers/common/SConscript +++ b/components/libc/compilers/common/SConscript @@ -10,7 +10,7 @@ CPPPATH = [cwd] if GetDepend('RT_USING_LIBC'): src += Glob('*.c') else: - if GetDepend('RT_USING_MINI_TIME'): + if GetDepend('RT_LIBC_USING_TIME'): src += ['time.c'] if (rtconfig.PLATFORM == 'armcc' or rtconfig.PLATFORM == 'iar') and rtconfig.ARCH != 'sim' : -- cgit v1.3.1