x265: fix i686 build

This commit is contained in:
Ryan Burns 2026-05-17 15:26:51 -07:00
commit d6937f6ae7
2 changed files with 14 additions and 0 deletions

View file

@ -0,0 +1,11 @@
--- a/common/x86/cpu-a.asm
+++ b/common/x86/cpu-a.asm
@@ -177,7 +177,7 @@ cglobal safe_intel_cpu_indicator_init
%if WIN64
lea rax, [intel_cpu_indicator_init]
call rax
-%elif FORMAT_ELF
+%elif UNIX64 && FORMAT_ELF
call [rel intel_cpu_indicator_init wrt ..plt]
%else
call intel_cpu_indicator_init

View file

@ -55,6 +55,9 @@ stdenv.mkDerivation (finalAttrs: {
# fix compilation with gcc15
# https://bitbucket.org/multicoreware/x265_git/pull-requests/36
./gcc15-fixes.patch
# fix i686-linux build
# https://bitbucket.org/multicoreware/x265_git/issues/1030
./fix-plt-rel.patch
]
# TODO: remove after update to version 4.2
++ lib.optionals (stdenv.hostPlatform.isAarch32 && stdenv.hostPlatform.isLinux) [