Skip to content

Commit

Permalink
lib: compiler support of arm compiler v6
Browse files Browse the repository at this point in the history
The predefined macro __CC_ARM available on 5.x is migrated to the
macro __arm__ for the version 6.x. Add defines to support both versions.

Signed-off-by: Arnaud Pouliquen <[email protected]>
  • Loading branch information
arnopo committed Nov 6, 2023
1 parent 694620f commit 9855f84
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ using std::atomic_fetch_and_explicit;
using std::atomic_thread_fence;
using std::atomic_signal_fence;

#elif defined(HAVE_STDATOMIC_H) && !defined(__CC_ARM) && \
#elif defined(HAVE_STDATOMIC_H) && !defined(__CC_ARM) && !defined(__arm__) && \
!defined(__STDC_NO_ATOMICS__)
# include <stdint.h>
# include <stdatomic.h>
Expand Down
2 changes: 1 addition & 1 deletion lib/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# include <metal/compiler/gcc/compiler.h>
#elif defined(__ICCARM__)
# include <metal/compiler/iar/compiler.h>
#elif defined(__CC_ARM)
#elif defined(__CC_ARM) || defined(__arm__)
# error "MDK-ARM ARMCC compiler requires the GNU extensions to work correctly"
#else
# error "Missing compiler support"
Expand Down
2 changes: 1 addition & 1 deletion lib/errno.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#if defined(__ICCARM__)
# include <metal/compiler/iar/errno.h>
#elif defined(__CC_ARM)
#elif defined(__CC_ARM) || defined(__arm__)
# include <metal/compiler/armcc/errno.h>
#else
# include <errno.h>
Expand Down

0 comments on commit 9855f84

Please sign in to comment.