From 96c55968751d84006471a00e3de466db8f2a0439 Mon Sep 17 00:00:00 2001 From: Christophe Favergeon Date: Fri, 8 Oct 2021 10:40:28 +0200 Subject: [PATCH] CMSIS-DSP: Add support to build with XCode --- Include/arm_math_types.h | 6 +++++- Include/dsp/none.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Include/arm_math_types.h b/Include/arm_math_types.h index cce295f8..775b33c4 100755 --- a/Include/arm_math_types.h +++ b/Include/arm_math_types.h @@ -67,7 +67,11 @@ extern "C" #define __STATIC_FORCEINLINE static __forceinline #define __STATIC_INLINE static __inline #define __ALIGNED(x) __declspec(align(x)) - +#elif defined ( __APPLE_CC__ ) +#include +#define __ALIGNED(x) __attribute__((aligned(x))) +#define __STATIC_FORCEINLINE static inline __attribute__((always_inline)) +#define __STATIC_INLINE static inline #elif defined (__GNUC_PYTHON__) #include #define __ALIGNED(x) __attribute__((aligned(x))) diff --git a/Include/dsp/none.h b/Include/dsp/none.h index 62f2d144..130386ee 100755 --- a/Include/dsp/none.h +++ b/Include/dsp/none.h @@ -59,7 +59,7 @@ MSVC is not going to be used to cross-compile to ARM. So, having a MSVC compiler file in Core or Core_A would not make sense. */ -#if defined ( _MSC_VER ) || defined(__GNUC_PYTHON__) +#if defined ( _MSC_VER ) || defined(__GNUC_PYTHON__) || defined(__APPLE_CC__) __STATIC_FORCEINLINE uint8_t __CLZ(uint32_t data) { if (data == 0U) { return 32U; }