From 802c768475b5575192c0b2b5e7802e8d4aebceba Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Tue, 28 Oct 2014 03:45:43 +0000 Subject: [LIBC] Use RT_USING_LIBC instead of libs option for each compiler --- components/libc/newlib/SConscript | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'components/libc/newlib/SConscript') diff --git a/components/libc/newlib/SConscript b/components/libc/newlib/SConscript index ae8e8756e1..574c2a8d1f 100644 --- a/components/libc/newlib/SConscript +++ b/components/libc/newlib/SConscript @@ -1,15 +1,10 @@ -Import('rtconfig') from building import * -if GetDepend('RT_USING_NEWLIB') and rtconfig.CROSS_TOOL != 'gcc': - print '================ERROR============================' - print 'Please use GNU GCC compiler if using newlib' - print '=================================================' - exit(0) - +src = Glob('*.c') cwd = GetCurrentDir() -src = Glob('*.c') + CPPPATH = [cwd] +CPPDEFINES = ['RT_USING_NEWLIB'] # link with libc and libm: # libm is a frequently used lib. Newlib is compiled with -ffunction-sections in @@ -17,7 +12,7 @@ CPPPATH = [cwd] # been referenced. So setting this won't result in bigger text size. LIBS = ['c', 'm'] -group = DefineGroup('newlib', src, depend = ['RT_USING_NEWLIB'], - CPPPATH = CPPPATH, LIBS = LIBS) +group = DefineGroup('newlib', src, depend = ['RT_USING_LIBC'], + CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES, LIBS = LIBS) Return('group') -- cgit v1.3.1