summaryrefslogtreecommitdiff
path: root/components/libc/newlib/SConscript
diff options
context:
space:
mode:
author陈豪 | Jacob Chen <[email protected]>2015-03-29 18:35:44 +0800
committer陈豪 | Jacob Chen <[email protected]>2015-03-29 18:35:44 +0800
commit9a4dacaad743801c9be2dbae49251c4e1b8f99a9 (patch)
tree34def3bef5c5fc4a9b7594eba5a2729f8c86aab0 /components/libc/newlib/SConscript
parentdaac5388afe5a18d51e9839719de8423b62b00c1 (diff)
parent5af7abd8c2e8b8a39c0bf096bdf9b5cb08f266fa (diff)
Merge pull request #3 from RT-Thread/master
111
Diffstat (limited to 'components/libc/newlib/SConscript')
-rw-r--r--components/libc/newlib/SConscript15
1 files changed, 5 insertions, 10 deletions
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')