diff --git a/meta-multimedia/recipes-multimedia/x265/x265/0003-riscv64-Fix-case-of-STRIDE_SHIFT-macro-invocation.patch b/meta-multimedia/recipes-multimedia/x265/x265/0003-riscv64-Fix-case-of-STRIDE_SHIFT-macro-invocation.patch new file mode 100644 index 0000000000..2bc9d0d436 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/x265/x265/0003-riscv64-Fix-case-of-STRIDE_SHIFT-macro-invocation.patch @@ -0,0 +1,37 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 19 Oct 2026 19:50:54 -0700 +Subject: [PATCH] riscv64: Fix case of STRIDE_SHIFT macro invocation + +The ADDPTR macro invokes "stride_shift", but the macro is defined as +STRIDE_SHIFT. GNU as matches macro names case-insensitively, so this +works with GCC, but the LLVM integrated assembler is case-sensitive +and fails to build the high bit depth SAD functions with clang: + + :1:1: error: unrecognized instruction mnemonic + stride_shift a6, a7, t5, t5, 1, 1 + ^ + common/riscv64/sad-a.S:666:1: note: while in macro instantiation + SAD_FUNC_COMMON 24, 32, 1 , 2 + +Use the name the macro is defined with. + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + source/common/riscv64/asm.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/source/common/riscv64/asm.S b/source/common/riscv64/asm.S +index 39953af..09eab48 100644 +--- a/source/common/riscv64/asm.S ++++ b/source/common/riscv64/asm.S +@@ -332,7 +332,7 @@ ELF .size \name, . - \name + .endm + + .macro ADDPTR t0, t1, s0, s1, stride0, stride1, shift0, shift1 +- stride_shift \t0, \t1, \stride0, \stride1, \shift0, \shift1 ++ STRIDE_SHIFT \t0, \t1, \stride0, \stride1, \shift0, \shift1 + add \s0, \s0, \t0 + add \s1, \s1, \t1 + .endm diff --git a/meta-multimedia/recipes-multimedia/x265/x265_4.3.bb b/meta-multimedia/recipes-multimedia/x265/x265_4.3.bb index 01edc1dc42..c657421783 100644 --- a/meta-multimedia/recipes-multimedia/x265/x265_4.3.bb +++ b/meta-multimedia/recipes-multimedia/x265/x265_4.3.bb @@ -12,6 +12,7 @@ SRC_URI = " \ git://github.com/Multicorewareinc/x265.git;protocol=https;branch=master;tag=${PV} \ file://0001-fix-dynamicHDR10-undefined-uint8_t.patch;patchdir=.. \ file://0002-x265-fix-build-with-cmake-4.patch;patchdir=.. \ + file://0003-riscv64-Fix-case-of-STRIDE_SHIFT-macro-invocation.patch;patchdir=.. \ " SRCREV = "e9b88125dc21393b3fd8d68e98083bdfb89778a8" S = "${UNPACKDIR}/x265-${PV}/source"