summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--package/tremor/tremor.mk12
1 files changed, 10 insertions, 2 deletions
diff --git a/package/tremor/tremor.mk b/package/tremor/tremor.mk
index 97b0ce36e4..2a791b6729 100644
--- a/package/tremor/tremor.mk
+++ b/package/tremor/tremor.mk
@@ -16,9 +16,17 @@ TREMOR_DEPENDENCIES = libogg
# tremor has ARM assembly code that cannot be compiled in Thumb2 mode,
# so we must force the traditional ARM mode.
+# However, some ARM architectures like ARNv7-M only supports Thumb
+# instructions, but the tremor build configuration enables ARM assembly
+# code unconditionally for all arm triplets by defining _ARM_ASSEM_.
+# We are overriding this by undefining this macro for the ARM
+# architectures not supporting ARM instructions.
ifeq ($(BR2_arm),y)
-TREMOR_CONF_ENV = \
- CFLAGS="$(TARGET_CFLAGS) -marm"
+ifeq ($(BR2_ARM_CPU_HAS_ARM),y)
+TREMOR_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -marm"
+else
+TREMOR_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -U_ARM_ASSEM_"
+endif
endif
$(eval $(autotools-package))
OpenPOWER on IntegriCloud