summaryrefslogtreecommitdiff
path: root/include/rtdef.h
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 /include/rtdef.h
parentcf13f84c61c9a38458df0fb9c3ed81679e560ba1 (diff)
[Kernel] Add ARMCC 6.x support.
Diffstat (limited to 'include/rtdef.h')
-rw-r--r--include/rtdef.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/rtdef.h b/include/rtdef.h
index 9379a7db44..92b997151d 100644
--- a/include/rtdef.h
+++ b/include/rtdef.h
@@ -88,14 +88,19 @@ typedef rt_base_t rt_off_t; /**< Type for offset */
#define RT_UINT32_MAX 0xffffffff /**< Maxium number of UINT32 */
#define RT_TICK_MAX RT_UINT32_MAX /**< Maxium number of tick */
+#if defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
+#define __CLANG_ARM
+#endif
+
/* Compiler Related Definitions */
-#ifdef __CC_ARM /* ARM Compiler */
+#if defined(__CC_ARM) || defined(__CLANG_ARM) /* ARM Compiler */
#include <stdarg.h>
#define SECTION(x) __attribute__((section(x)))
#define RT_UNUSED __attribute__((unused))
#define RT_USED __attribute__((used))
#define ALIGN(n) __attribute__((aligned(n)))
- #define RT_WEAK __weak
+
+ #define RT_WEAK __attribute__((weak))
#define rt_inline static __inline
/* module compiling */
#ifdef RT_USING_MODULE