diff options
| author | Meco Man <[email protected]> | 2021-12-29 14:14:07 -0500 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2021-12-29 14:15:38 -0500 |
| commit | 5187d75af538d9ae268e7d4d31dd412f20d0a63d (patch) | |
| tree | 953af30a8faeb298e945b30eb761eb25c967da67 /components | |
| parent | ead24644f008232f81e0408bfb15e99deff115bb (diff) | |
[armclang] 使用__clang__代替__CLANG_ARM
Diffstat (limited to 'components')
| -rw-r--r-- | components/cplusplus/cxx_crt_init.c | 4 | ||||
| -rw-r--r-- | components/libc/compilers/armlibc/syscalls.c | 4 | ||||
| -rw-r--r-- | components/utilities/utest/utest.c | 2 | ||||
| -rw-r--r-- | components/utilities/var_export/var_export.c | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/components/cplusplus/cxx_crt_init.c b/components/cplusplus/cxx_crt_init.c index 977dee6ee9..46946089ff 100644 --- a/components/cplusplus/cxx_crt_init.c +++ b/components/cplusplus/cxx_crt_init.c @@ -13,7 +13,7 @@ #include <rtthread.h> -#if defined(__CC_ARM) || defined(__CLANG_ARM) +#if defined(__ARMCC_VERSION) extern void $Super$$__cpp_initialize__aeabi_(void); /* we need to change the cpp_initialize order */ RT_WEAK void $Sub$$__cpp_initialize__aeabi_(void) @@ -36,7 +36,7 @@ RT_WEAK void *__dso_handle = 0; RT_WEAK int cplusplus_system_init(void) { -#if defined(__CC_ARM) || defined(__CLANG_ARM) +#if defined(__ARMCC_VERSION) /* If there is no SHT$$INIT_ARRAY, calling * $Super$$__cpp_initialize__aeabi_() will cause fault. At least until Keil5.12 * the problem still exists. So we have to initialize the C++ runtime by ourself. diff --git a/components/libc/compilers/armlibc/syscalls.c b/components/libc/compilers/armlibc/syscalls.c index 54d8b40bf6..14b47d3627 100644 --- a/components/libc/compilers/armlibc/syscalls.c +++ b/components/libc/compilers/armlibc/syscalls.c @@ -30,11 +30,11 @@ #define DBG_LVL DBG_INFO #include <rtdbg.h> -#ifdef __CLANG_ARM +#ifdef __clang__ __asm(".global __use_no_semihosting\n\t"); #else #pragma import(__use_no_semihosting_swi) -#endif /* __CLANG_ARM */ +#endif /* Standard IO device handles. */ #define STDIN 0 diff --git a/components/utilities/utest/utest.c b/components/utilities/utest/utest.c index 7103efb89c..8c8ffd674a 100644 --- a/components/utilities/utest/utest.c +++ b/components/utilities/utest/utest.c @@ -68,7 +68,7 @@ void utest_log_lv_set(rt_uint8_t lv) int utest_init(void) { /* initialize the utest commands table.*/ -#if defined(__CC_ARM) || defined(__CLANG_ARM) /* ARM C Compiler */ +#if defined(__ARMCC_VERSION) /* ARM C Compiler */ extern const int UtestTcTab$$Base; extern const int UtestTcTab$$Limit; tc_table = (utest_tc_export_t)&UtestTcTab$$Base; diff --git a/components/utilities/var_export/var_export.c b/components/utilities/var_export/var_export.c index f4623dec04..1e54f39362 100644 --- a/components/utilities/var_export/var_export.c +++ b/components/utilities/var_export/var_export.c @@ -20,7 +20,7 @@ static rt_size_t ve_exporter_num = 0; #endif /* for ARM C and IAR Compiler */ -#if defined(__CC_ARM) || defined(__CLANG_ARM) || defined (__ICCARM__) || defined(__ICCRX__) +#if defined(__ARMCC_VERSION) || defined (__ICCARM__) || defined(__ICCRX__) static RT_USED const struct ve_exporter __ve_table_start RT_SECTION("0.""VarExpTab") = {"ve_start", "ve_start", 0}; @@ -43,7 +43,7 @@ RT_USED const struct ve_exporter __ve_table_end = { "ve_end", "ve_end", 2}; int var_export_init(void) { /* initialize the var export table.*/ -#if defined(__CC_ARM) || defined(__CLANG_ARM) /* for ARM C Compiler */ +#if defined(__ARMCC_VERSION) /* for ARM C Compiler */ ve_exporter_table = &__ve_table_start + 1; ve_exporter_num = &__ve_table_end - &__ve_table_start; #elif defined (__GNUC__) /* for GCC Compiler */ @@ -94,7 +94,7 @@ int var_export_init(void) } } ve_exporter_table = ve_exporter_tab; -#endif /* __CC_ARM || __CLANG_ARM */ +#endif /* __ARMCC_VERSION */ return ve_exporter_num; } |
