summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-12-04 12:01:51 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-12-09 15:23:28 +0000
commitc742295dffdd98d94e1a4d0553e27e291efe0d63 (patch)
treea503a3ea86b4b896bf5dc06921d6b2b10802f7ea
parent6074281e43f57aa4654eed311559a73b65a94a45 (diff)
downloadpoky-c742295dffdd98d94e1a4d0553e27e291efe0d63.tar.gz
ffmpeg: Fix RISCV build
Issue found with LLD linker | riscv64-yoe-linux-ld.lld: error: relocation R_RISCV_64 cannot be used against symbol ' ↪ ff_h264_weight_pixels16_8_rvv'; recompile with -fPIC | >>> defined in libavcodec/riscv/h264dsp_rvv.o | >>> referenced by libavcodec/riscv/h264dsp_rvv.o:(ff_h264_weight_funcs_8_rvv) (From OE-Core rev: 09b6536fcc5dcd5e8e419c7a2e8c4f3da0cfa38f) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg/0001-lavc-h264dsp-move-RISC-V-fn-pointers-to-.data.rel.ro.patch26
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg_7.1.bb1
2 files changed, 27 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-lavc-h264dsp-move-RISC-V-fn-pointers-to-.data.rel.ro.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-lavc-h264dsp-move-RISC-V-fn-pointers-to-.data.rel.ro.patch
new file mode 100644
index 0000000000..9dc10f1219
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/0001-lavc-h264dsp-move-RISC-V-fn-pointers-to-.data.rel.ro.patch
@@ -0,0 +1,26 @@
1From 93f277f05cc71f69930bd680ac6eae5457b963f3 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
3Date: Sat, 16 Nov 2024 08:57:54 +0200
4Subject: [PATCH] lavc/h264dsp: move RISC-V fn pointers to .data.rel.ro
5
6This should fix PIC builds.
7
8Upstream-Status: Backport [https://github.com/FFmpeg/FFmpeg/commit/c3051d94a7939de93acd647d3a1719ce56c0c4f5]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 libavcodec/riscv/h264dsp_rvv.S | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/libavcodec/riscv/h264dsp_rvv.S b/libavcodec/riscv/h264dsp_rvv.S
15index 422ac02..97c6708 100644
16--- a/libavcodec/riscv/h264dsp_rvv.S
17+++ b/libavcodec/riscv/h264dsp_rvv.S
18@@ -176,7 +176,7 @@ endfunc
19
20 .global ff_h264_weight_funcs_8_rvv
21 .hidden ff_h264_weight_funcs_8_rvv
22-const ff_h264_weight_funcs_8_rvv
23+const ff_h264_weight_funcs_8_rvv, relocate=1
24 .irp w, 16, 8, 4, 2
25 #if __riscv_xlen == 32
26 .word ff_h264_weight_pixels\w\()_8_rvv
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_7.1.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_7.1.bb
index 35dbda8c3d..1c72d503d3 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_7.1.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_7.1.bb
@@ -23,6 +23,7 @@ LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
23 file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02" 23 file://COPYING.LGPLv3;md5=e6a600fd5e1d9cbde2d983680233ad02"
24 24
25SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \ 25SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
26 file://0001-lavc-h264dsp-move-RISC-V-fn-pointers-to-.data.rel.ro.patch \
26 " 27 "
27 28
28SRC_URI[sha256sum] = "40973d44970dbc83ef302b0609f2e74982be2d85916dd2ee7472d30678a7abe6" 29SRC_URI[sha256sum] = "40973d44970dbc83ef302b0609f2e74982be2d85916dd2ee7472d30678a7abe6"