From 5187d75af538d9ae268e7d4d31dd412f20d0a63d Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Wed, 29 Dec 2021 14:14:07 -0500 Subject: [armclang] 使用__clang__代替__CLANG_ARM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libcpu/arm/cortex-m3/cpuport.c | 2 +- libcpu/arm/cortex-m33/cpuport.c | 4 ++-- libcpu/arm/cortex-m33/trustzone.c | 2 +- libcpu/arm/cortex-m4/cpuport.c | 4 ++-- libcpu/arm/cortex-m7/cpuport.c | 4 ++-- libcpu/sim/win32/startup.c | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) (limited to 'libcpu') diff --git a/libcpu/arm/cortex-m3/cpuport.c b/libcpu/arm/cortex-m3/cpuport.c index d376f00424..66e2aa4809 100644 --- a/libcpu/arm/cortex-m3/cpuport.c +++ b/libcpu/arm/cortex-m3/cpuport.c @@ -385,7 +385,7 @@ __asm int __rt_ffs(int value) exit BX lr } -#elif defined(__CLANG_ARM) +#elif defined(__clang__) int __rt_ffs(int value) { __asm volatile( diff --git a/libcpu/arm/cortex-m33/cpuport.c b/libcpu/arm/cortex-m33/cpuport.c index aa2325012c..71e1fea848 100644 --- a/libcpu/arm/cortex-m33/cpuport.c +++ b/libcpu/arm/cortex-m33/cpuport.c @@ -20,7 +20,7 @@ #include #if /* ARMCC */ ( (defined ( __CC_ARM ) && defined ( __TARGET_FPU_VFP )) \ - /* Clang */ || (defined ( __CLANG_ARM ) && defined ( __VFP_FP__ ) && !defined(__SOFTFP__)) \ + /* Clang */ || (defined ( __clang__ ) && defined ( __VFP_FP__ ) && !defined(__SOFTFP__)) \ /* IAR */ || (defined ( __ICCARM__ ) && defined ( __ARMVFP__ )) \ /* GNU */ || (defined ( __GNUC__ ) && defined ( __VFP_FP__ ) && !defined(__SOFTFP__)) ) #define USE_FPU 1 @@ -472,7 +472,7 @@ __asm int __rt_ffs(int value) exit BX lr } -#elif defined(__CLANG_ARM) +#elif defined(__clang__) int __rt_ffs(int value) { if (value == 0) return value; diff --git a/libcpu/arm/cortex-m33/trustzone.c b/libcpu/arm/cortex-m33/trustzone.c index f49f0c24f8..2cc19a06e4 100644 --- a/libcpu/arm/cortex-m33/trustzone.c +++ b/libcpu/arm/cortex-m33/trustzone.c @@ -37,7 +37,7 @@ static __inline rt_uint32_t __get_IPSR(void) register rt_uint32_t result __asm("ipsr"); return(result); } -#elif defined(__CLANG_ARM) +#elif defined(__clang__) __attribute__((always_inline)) static __inline rt_uint32_t __get_IPSR(void) { rt_uint32_t result; diff --git a/libcpu/arm/cortex-m4/cpuport.c b/libcpu/arm/cortex-m4/cpuport.c index f24c33cf4d..6b748255c5 100644 --- a/libcpu/arm/cortex-m4/cpuport.c +++ b/libcpu/arm/cortex-m4/cpuport.c @@ -20,7 +20,7 @@ #include #if /* ARMCC */ ( (defined ( __CC_ARM ) && defined ( __TARGET_FPU_VFP )) \ - /* Clang */ || (defined ( __CLANG_ARM ) && defined ( __VFP_FP__ ) && !defined(__SOFTFP__)) \ + /* Clang */ || (defined ( __clang__ ) && defined ( __VFP_FP__ ) && !defined(__SOFTFP__)) \ /* IAR */ || (defined ( __ICCARM__ ) && defined ( __ARMVFP__ )) \ /* GNU */ || (defined ( __GNUC__ ) && defined ( __VFP_FP__ ) && !defined(__SOFTFP__)) ) #define USE_FPU 1 @@ -469,7 +469,7 @@ __asm int __rt_ffs(int value) exit BX lr } -#elif defined(__CLANG_ARM) +#elif defined(__clang__) int __rt_ffs(int value) { __asm volatile( diff --git a/libcpu/arm/cortex-m7/cpuport.c b/libcpu/arm/cortex-m7/cpuport.c index f24c33cf4d..6b748255c5 100644 --- a/libcpu/arm/cortex-m7/cpuport.c +++ b/libcpu/arm/cortex-m7/cpuport.c @@ -20,7 +20,7 @@ #include #if /* ARMCC */ ( (defined ( __CC_ARM ) && defined ( __TARGET_FPU_VFP )) \ - /* Clang */ || (defined ( __CLANG_ARM ) && defined ( __VFP_FP__ ) && !defined(__SOFTFP__)) \ + /* Clang */ || (defined ( __clang__ ) && defined ( __VFP_FP__ ) && !defined(__SOFTFP__)) \ /* IAR */ || (defined ( __ICCARM__ ) && defined ( __ARMVFP__ )) \ /* GNU */ || (defined ( __GNUC__ ) && defined ( __VFP_FP__ ) && !defined(__SOFTFP__)) ) #define USE_FPU 1 @@ -469,7 +469,7 @@ __asm int __rt_ffs(int value) exit BX lr } -#elif defined(__CLANG_ARM) +#elif defined(__clang__) int __rt_ffs(int value) { __asm volatile( diff --git a/libcpu/sim/win32/startup.c b/libcpu/sim/win32/startup.c index 756d409315..e3e76323b9 100644 --- a/libcpu/sim/win32/startup.c +++ b/libcpu/sim/win32/startup.c @@ -199,7 +199,7 @@ void rt_application_init(void); void rt_hw_board_init(void); int rtthread_startup(void); -#if defined(__CC_ARM) || defined(__CLANG_ARM) +#if defined(__ARMCC_VERSION) extern int $Super$$main(void); /* re-define main function */ int $Sub$$main(void) @@ -248,7 +248,7 @@ void main_thread_entry(void *parameter) rt_hw_secondary_cpu_up(); #endif /* invoke system main function */ -#if defined(__CC_ARM) || defined(__CLANG_ARM) +#if defined(__ARMCC_VERSION) { extern int $Super$$main(void); $Super$$main(); /* for ARMCC. */ -- cgit v1.3.1