diff --git a/core/clang/arm.mk b/core/clang/arm.mk index ca66986820..ceb4a5a038 100644 --- a/core/clang/arm.mk +++ b/core/clang/arm.mk @@ -4,6 +4,12 @@ CLANG_CONFIG_arm_EXTRA_ASFLAGS := CLANG_CONFIG_arm_EXTRA_CFLAGS := +ifneq (,$(filter krait,$(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT))) + # Android's clang support's krait as a CPU whereas GCC doesn't. Specify + # -mcpu here rather than the more normal core/combo/arch/arm/armv7-a-neon.mk. + CLANG_CONFIG_arm_EXTRA_CFLAGS += -mcpu=krait +endif + CLANG_CONFIG_arm_EXTRA_CPPFLAGS := CLANG_CONFIG_arm_EXTRA_LDFLAGS := diff --git a/core/combo/arch/arm/armv7-a-neon.mk b/core/combo/arch/arm/armv7-a-neon.mk index 3f4c3917ec..d535afca68 100644 --- a/core/combo/arch/arm/armv7-a-neon.mk +++ b/core/combo/arch/arm/armv7-a-neon.mk @@ -9,7 +9,8 @@ ARCH_ARM_HAVE_NEON := true ifneq (,$(filter cortex-a15 krait denver,$(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT))) # TODO: krait is not a cortex-a15, we set the variant to cortex-a15 so that # hardware divide operations are generated. This should be removed and a - # krait CPU variant added to GCC/clang. + # krait CPU variant added to GCC. For clang we specify -mcpu for krait in + # core/clang/arm.mk. arch_variant_cflags := -mcpu=cortex-a15 # Fake an ARM compiler flag as these processors support LPAE which GCC/clang