1from building import * 2Import('rtconfig') 3 4src = Glob('*.c') 5cwd = GetCurrentDir() 6group = [] 7 8CPPPATH = [cwd] 9CPPDEFINES = ['RT_USING_NEWLIB'] 10 11# link with libc and libm: 12# libm is a frequently used lib. Newlib is compiled with -ffunction-sections in 13# recent GCC tool chains. The linker would just link in the functions that have 14# been referenced. So setting this won't result in bigger text size. 15LIBS = ['c', 'm'] 16 17if rtconfig.PLATFORM == 'gcc': 18 group = DefineGroup('newlib', src, depend = ['RT_USING_LIBC'], 19 CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES, LIBS = LIBS) 20 21Return('group') 22