summaryrefslogtreecommitdiff
path: root/include
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
parentcf13f84c61c9a38458df0fb9c3ed81679e560ba1 (diff)
[Kernel] Add ARMCC 6.x support.
Diffstat (limited to 'include')
-rw-r--r--include/libc/libc_signal.h2
-rw-r--r--include/rtdef.h9
-rw-r--r--include/rtlibc.h2
-rw-r--r--include/rtthread.h2
4 files changed, 10 insertions, 5 deletions
diff --git a/include/libc/libc_signal.h b/include/libc/libc_signal.h
index 5db43eb35e..b592b8227e 100644
--- a/include/libc/libc_signal.h
+++ b/include/libc/libc_signal.h
@@ -71,7 +71,7 @@ typedef struct siginfo siginfo_t;
#include <sys/signal.h>
#endif
-#ifdef __CC_ARM
+#if defined(__CC_ARM) || defined(__CLANG_ARM)
#include <signal.h>
typedef unsigned long sigset_t;
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
diff --git a/include/rtlibc.h b/include/rtlibc.h
index 385d57500e..020c34764e 100644
--- a/include/rtlibc.h
+++ b/include/rtlibc.h
@@ -25,7 +25,7 @@
#include "libc/libc_signal.h"
#include "libc/libc_fdset.h"
-#if defined(__CC_ARM) || defined(__IAR_SYSTEMS_ICC__)
+#if defined(__CC_ARM) || defined(__CLANG_ARM) || defined(__IAR_SYSTEMS_ICC__)
typedef signed long off_t;
typedef int mode_t;
#endif
diff --git a/include/rtthread.h b/include/rtthread.h
index 82d975d648..f8da2d46bf 100644
--- a/include/rtthread.h
+++ b/include/rtthread.h
@@ -501,7 +501,7 @@ rt_int32_t rt_strncmp(const char *cs, const char *ct, rt_ubase_t count);
rt_int32_t rt_strcmp(const char *cs, const char *ct);
rt_size_t rt_strlen(const char *src);
char *rt_strdup(const char *s);
-#ifdef __CC_ARM
+#if defined(__CC_ARM) || defined(__CLANG_ARM)
/* leak strdup interface */
char* strdup(const char* str);
#endif