summaryrefslogtreecommitdiff
path: root/components/libc/newlib/SConscript
diff options
context:
space:
mode:
author[email protected] <[email protected]>2011-10-08 13:02:22 +0000
committer[email protected] <[email protected]>2011-10-08 13:02:22 +0000
commit73a117039f90122c1e9d14ca2be7c88a6f640892 (patch)
tree6d493c3bdb981d37d2677dd078032a4bdaad9352 /components/libc/newlib/SConscript
parent0d2624313a32529dd401ae841df4ea22472c2d7b (diff)
add newlib compiler depend
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1742 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/libc/newlib/SConscript')
-rw-r--r--components/libc/newlib/SConscript25
1 files changed, 17 insertions, 8 deletions
diff --git a/components/libc/newlib/SConscript b/components/libc/newlib/SConscript
index d8ce850d0f..72f56838ce 100644
--- a/components/libc/newlib/SConscript
+++ b/components/libc/newlib/SConscript
@@ -1,8 +1,17 @@
-Import('RTT_ROOT')
-from building import *
-
-src = Glob('*.c')
-CPPPATH = [RTT_ROOT + '/components/libc/newlib']
-group = DefineGroup('newlib', src, depend = ['RT_USING_NEWLIB'], CPPPATH = CPPPATH)
-
-Return('group')
+Import('rtconfig')
+
+from building import *
+
+if rtconfig.CROSS_TOOL != 'gcc':
+ print '================ERROR============================'
+ print 'Please use GNU GCC compiler if using newlib'
+ print '================================================='
+ exit(0)
+
+cwd = GetCurrentDir()
+src = Glob('*.c')
+CPPPATH = [cwd]
+
+group = DefineGroup('newlib', src, depend = ['RT_USING_NEWLIB'], CPPPATH = CPPPATH)
+
+Return('group')