From 5b3320624da5149fc21c2d3e1f321d855e3d0dfe Mon Sep 17 00:00:00 2001 From: Supper Thomas <78900636@qq.com> Date: Sun, 16 Feb 2025 22:02:42 +0800 Subject: [src/ktime] fix the bug when use keil AC6 and open RT_USING_HOOKLIST … (#9993) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [src/ktime] fix the bug when use keil AC6 and open RT_USING_HOOKLIST and RT_USING_KTIME --- src/SConscript | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/SConscript b/src/SConscript index 8407e6ef18..93b8e8e3f3 100644 --- a/src/SConscript +++ b/src/SConscript @@ -44,6 +44,12 @@ if rtconfig.PLATFORM in ['gcc']: # only for GCC if rtconfig.ARCH not in ['sim']: LINKFLAGS += ' -Wl,--gc-sections,--print-memory-usage' # remove unused sections and print memory usage +if GetDepend('RT_USING_HOOKLIST') == True: + if rtconfig.PLATFORM in ['gcc', 'armclang']: + LOCAL_CFLAGS += ' -std=gnu99' + elif rtconfig.PLATFORM in ['armcc']: + LOCAL_CFLAGS += ' --c99 --gnu' + group = DefineGroup('Kernel', src, depend=[''], CPPPATH=inc, LINKFLAGS=LINKFLAGS, LOCAL_CFLAGS=LOCAL_CFLAGS, CPPDEFINES=['__RTTHREAD__'], LOCAL_CPPDEFINES=['__RT_KERNEL_SOURCE__']) -- cgit v1.3.1