Skip to contentSkip to conversation

package/madplay: force arm mode instead of Thumb mode

PATCH Applied Fabrice Fontaine 3 participants 3 messages Jan 9, 2024 – Jan 13, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

---
 package/madplay/madplay.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/madplay/madplay.mk +8 -0
index e1a78bd7d7..91ee44ab5f 100644
@@ -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)
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Fabrice, All,

On 2024-01-09 18:30 +0100, Fabrice Fontaine spake thusly:

Quoted 6 lines

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):

Quoted 6 lines

/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

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 30 lines
---
 package/madplay/madplay.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/madplay/madplay.mk +8 -0
index e1a78bd7d7..91ee44ab5f 100644
@@ -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)
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw
In reply to Fabrice Fontaine
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

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):

Quoted 6 lines

/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

Committed to 2023.02.x and 2023.11.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot