diff mbox series

ffmpeg: fix build with binutils 2.43 on arm with commerical codecs

Message ID 20240808171608.1312222-1-ross.burton@arm.com
State Accepted, archived
Commit 06d29af58521b94518c924468db34d0eed1cb056
Headers show
Series ffmpeg: fix build with binutils 2.43 on arm with commerical codecs | expand

Commit Message

Ross Burton Aug. 8, 2024, 5:16 p.m. UTC
binutils 2.43 is stricter with label names, so rename a label to stop
assembler errors.

[ YOCTO #15570 ]

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 ...lpdsp_armv5te-fix-label-format-to-wo.patch | 52 +++++++++++++++++++
 .../recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb |  1 +
 2 files changed, 53 insertions(+)
 create mode 100644 meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch

Comments

Alexander Kanavin Aug. 8, 2024, 6:08 p.m. UTC | #1
I know you don’t need to be lectured about pending, but at least do provide
an explanation/plan for it in brackets.

Alex

On Thu 8. Aug 2024 at 20.20, Ross Burton via lists.openembedded.org
<ross.burton=arm.com@lists.openembedded.org> wrote:

> binutils 2.43 is stricter with label names, so rename a label to stop
> assembler errors.
>
> [ YOCTO #15570 ]
>
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
>  ...lpdsp_armv5te-fix-label-format-to-wo.patch | 52 +++++++++++++++++++
>  .../recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb |  1 +
>  2 files changed, 53 insertions(+)
>  create mode 100644
> meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch
>
> diff --git
> a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch
> b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch
> new file mode 100644
> index 00000000000..a5947af668e
> --- /dev/null
> +++
> b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch
> @@ -0,0 +1,52 @@
> +From 0b541aa54b9573d8eef7401a0cc58c422fe60a9a Mon Sep 17 00:00:00 2001
> +From: Ross Burton <ross.burton@arm.com>
> +Date: Thu, 8 Aug 2024 18:04:17 +0100
> +Subject: [PATCH] libavcodec/arm/mlpdsp_armv5te: fix label format to work
> with
> + binutils 2.43
> +
> +binutils 2.43 has stricter validation for labels[1] and results in errors
> +when building ffmpeg for armv5:
> +
> +src/libavcodec/arm/mlpdsp_armv5te.S:232: Error: junk at end of line,
> first unrecognized character is `0'
> +
> +Remove the leading zero in the "01" label to resolve this error.
> +
> +[1]
> https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=226749d5a6ff0d5c607d6428d6c81e1e7e7a994b
> +
> +Upstream-Status: Pending
> +Signed-off-by: Ross Burton <ross.burton@arm.com>
> +---
> + libavcodec/arm/mlpdsp_armv5te.S | 6 +++---
> + 1 file changed, 3 insertions(+), 3 deletions(-)
> +
> +diff --git a/libavcodec/arm/mlpdsp_armv5te.S
> b/libavcodec/arm/mlpdsp_armv5te.S
> +index 4f9aa48..d315686 100644
> +--- a/libavcodec/arm/mlpdsp_armv5te.S
> ++++ b/libavcodec/arm/mlpdsp_armv5te.S
> +@@ -229,7 +229,7 @@ A .endif
> +   .endif
> +
> +         // Begin loop
> +-01:
> ++1:
> +   .if TOTAL_TAPS == 0
> +         // Things simplify a lot in this case
> +         // In fact this could be pipelined further if it's worth it...
> +@@ -241,7 +241,7 @@ A .endif
> +         str     ST0, [PST, #-4]!
> +         str     ST0, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)]
> +         str     ST0, [PSAMP], #4 * MAX_CHANNELS
> +-        bne     01b
> ++        bne     1b
> +   .else
> +     .if \fir_taps & 1
> +       .set LOAD_REG, 1
> +@@ -333,7 +333,7 @@ T       orr     AC0, AC0, AC1
> +         str     ST3, [PST, #-4]!
> +         str     ST2, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)]
> +         str     ST3, [PSAMP], #4 * MAX_CHANNELS
> +-        bne     01b
> ++        bne     1b
> +   .endif
> +         b       99f
> +
> diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb
> b/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb
> index dea1f545804..fe34b87ccf5 100644
> --- a/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb
> +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb
> @@ -27,6 +27,7 @@ SRC_URI = " \
>      file://av1_ordering_info.patch \
>      file://vulkan_av1_stable_API.patch \
>      file://vulkan_fix_gcc14.patch \
> +
> file://0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch \
>  "
>
>  SRC_URI[sha256sum] =
> "8684f4b00f94b85461884c3719382f1261f0d9eb3d59640a1f4ac0873616f968"
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#203143):
> https://lists.openembedded.org/g/openembedded-core/message/203143
> Mute This Topic: https://lists.openembedded.org/mt/107794004/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
diff mbox series

Patch

diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch
new file mode 100644
index 00000000000..a5947af668e
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch
@@ -0,0 +1,52 @@ 
+From 0b541aa54b9573d8eef7401a0cc58c422fe60a9a Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@arm.com>
+Date: Thu, 8 Aug 2024 18:04:17 +0100
+Subject: [PATCH] libavcodec/arm/mlpdsp_armv5te: fix label format to work with
+ binutils 2.43
+
+binutils 2.43 has stricter validation for labels[1] and results in errors
+when building ffmpeg for armv5:
+
+src/libavcodec/arm/mlpdsp_armv5te.S:232: Error: junk at end of line, first unrecognized character is `0'
+
+Remove the leading zero in the "01" label to resolve this error.
+
+[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=226749d5a6ff0d5c607d6428d6c81e1e7e7a994b
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+---
+ libavcodec/arm/mlpdsp_armv5te.S | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/libavcodec/arm/mlpdsp_armv5te.S b/libavcodec/arm/mlpdsp_armv5te.S
+index 4f9aa48..d315686 100644
+--- a/libavcodec/arm/mlpdsp_armv5te.S
++++ b/libavcodec/arm/mlpdsp_armv5te.S
+@@ -229,7 +229,7 @@ A .endif
+   .endif
+ 
+         // Begin loop
+-01:
++1:
+   .if TOTAL_TAPS == 0
+         // Things simplify a lot in this case
+         // In fact this could be pipelined further if it's worth it...
+@@ -241,7 +241,7 @@ A .endif
+         str     ST0, [PST, #-4]!
+         str     ST0, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)]
+         str     ST0, [PSAMP], #4 * MAX_CHANNELS
+-        bne     01b
++        bne     1b
+   .else
+     .if \fir_taps & 1
+       .set LOAD_REG, 1
+@@ -333,7 +333,7 @@ T       orr     AC0, AC0, AC1
+         str     ST3, [PST, #-4]!
+         str     ST2, [PST, #4 * (MAX_BLOCKSIZE + MAX_FIR_ORDER)]
+         str     ST3, [PSAMP], #4 * MAX_CHANNELS
+-        bne     01b
++        bne     1b
+   .endif
+         b       99f
+ 
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb
index dea1f545804..fe34b87ccf5 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb
@@ -27,6 +27,7 @@  SRC_URI = " \
     file://av1_ordering_info.patch \
     file://vulkan_av1_stable_API.patch \
     file://vulkan_fix_gcc14.patch \
+    file://0001-libavcodec-arm-mlpdsp_armv5te-fix-label-format-to-wo.patch \
 "
 
 SRC_URI[sha256sum] = "8684f4b00f94b85461884c3719382f1261f0d9eb3d59640a1f4ac0873616f968"