From a9da69260691bb692d7a2f0417fc5f52bcf45b5e Mon Sep 17 00:00:00 2001 From: Fabrice Fontaine Date: Tue, 9 Jan 2024 18:30:15 +0100 Subject: [PATCH] package/madplay: force arm mode instead of Thumb mode Fix the following build failure raised because madplay uses mad_f_mul which is defined in usr/include/mad.h (installed by libmad which has been fixed by a similar workaround in commit 0aaadd525f2df02911349ffe1518814fa095bf96, unfortunately the fix works for compiled code, not mad_f_mul define): /tmp/cc5SGGoU.s:102: Error: selected processor does not support `smull r8,r9,r2,r4' in Thumb mode Fixes: - http://autobuild.buildroot.org/results/0c0955d4f6726b50cad721f4d3437dabde316e70 Signed-off-by: Fabrice Fontaine Signed-off-by: Yann E. MORIN --- package/madplay/madplay.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/madplay/madplay.mk b/package/madplay/madplay.mk index e1a78bd7d7..91ee44ab5f 100644 --- a/package/madplay/madplay.mk +++ b/package/madplay/madplay.mk @@ -15,6 +15,14 @@ MADPLAY_DEPENDENCIES = host-pkgconf libmad libid3tag $(TARGET_NLS_DEPENDENCIES) # Also 0003-configure-ac-use-pkg-config-to-find-id3tag.patch MADPLAY_AUTORECONF = YES +# madplay uses libmad which has some assembly function that is not present in +# Thumb mode: +# Error: selected processor does not support `smull r8,r9,r2,r4' in Thumb mode +# so, we desactivate Thumb mode +ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y) +MADPLAY_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -marm" +endif + # Check if ALSA is built, then we should configure after alsa-lib so # ./configure can find alsa-lib. ifeq ($(BR2_PACKAGE_MADPLAY_ALSA),y)