summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2016-04-24 19:59:48 +0800
committerBernard Xiong <[email protected]>2016-04-24 19:59:48 +0800
commitfd7a65b4becb74f8e78802aeadbe908780d973f3 (patch)
tree47bb42b9d70dd447721dfa37eef7239016f68bb2
parent255f8b7c3447b3adf06f1fb998d9861cde81558b (diff)
[LIBC] remove minilibc when compiling simulator under Linux
-rwxr-xr-xbsp/simulator/drivers/sd_sim.c4
-rw-r--r--components/libc/SConscript2
2 files changed, 4 insertions, 2 deletions
diff --git a/bsp/simulator/drivers/sd_sim.c b/bsp/simulator/drivers/sd_sim.c
index ea2aa223ca..866acecd4f 100755
--- a/bsp/simulator/drivers/sd_sim.c
+++ b/bsp/simulator/drivers/sd_sim.c
@@ -1,6 +1,8 @@
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
+#ifdef _WIN32
+#include <stdlib.h>
+#endif
#include <rtthread.h>
#include <dfs_def.h>
diff --git a/components/libc/SConscript b/components/libc/SConscript
index 4ca00c5b86..4ed1dde123 100644
--- a/components/libc/SConscript
+++ b/components/libc/SConscript
@@ -14,7 +14,7 @@ if GetDepend('RT_USING_LIBC'):
elif rtconfig.PLATFORM == 'iar':
objs = objs + SConscript('dlib/SConscript')
else:
- if rtconfig.PLATFORM == 'gcc':
+ if rtconfig.PLATFORM == 'gcc' and rtconfig.ARCH != 'sim':
objs = objs + SConscript('minilibc/SConscript')
Return('objs')