summaryrefslogtreecommitdiff
path: root/components/libc/compilers
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-09-23 12:08:44 +0800
committerBernard Xiong <[email protected]>2018-09-23 12:08:44 +0800
commitb98a0ba804f388f531106ff9602eb22ee66fe751 (patch)
treea132d93019f1d6d0ac77c2c34b44ad78f757b134 /components/libc/compilers
parentcf13f84c61c9a38458df0fb9c3ed81679e560ba1 (diff)
[Kernel] Add ARMCC 6.x support.
Diffstat (limited to 'components/libc/compilers')
-rw-r--r--components/libc/compilers/armlibc/mem_std.c3
-rw-r--r--components/libc/compilers/armlibc/stubs.c4
2 files changed, 7 insertions, 0 deletions
diff --git a/components/libc/compilers/armlibc/mem_std.c b/components/libc/compilers/armlibc/mem_std.c
index 138ebe9773..4393b5f2af 100644
--- a/components/libc/compilers/armlibc/mem_std.c
+++ b/components/libc/compilers/armlibc/mem_std.c
@@ -16,8 +16,11 @@
#include "rtthread.h"
#ifdef RT_USING_HEAP
+
+#ifdef __CC_ARM
/* avoid the heap and heap-using library functions supplied by arm */
#pragma import(__use_no_heap)
+#endif
void *malloc(size_t n)
{
diff --git a/components/libc/compilers/armlibc/stubs.c b/components/libc/compilers/armlibc/stubs.c
index b292cd7629..c826c8a0ec 100644
--- a/components/libc/compilers/armlibc/stubs.c
+++ b/components/libc/compilers/armlibc/stubs.c
@@ -37,7 +37,11 @@
#include "dfs_posix.h"
#endif
+#ifdef __CLANG_ARM
+__asm(".global __use_no_semihosting\n\t");
+#else
#pragma import(__use_no_semihosting_swi)
+#endif
/* Standard IO device handles. */
#define STDIN 0