From d6937f6ae7b9e1f2e5f50e6020e5b4db864d7691 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Sun, 17 May 2026 15:26:51 -0700 Subject: [PATCH] x265: fix i686 build --- pkgs/by-name/x2/x265/fix-plt-rel.patch | 11 +++++++++++ pkgs/by-name/x2/x265/package.nix | 3 +++ 2 files changed, 14 insertions(+) create mode 100644 pkgs/by-name/x2/x265/fix-plt-rel.patch diff --git a/pkgs/by-name/x2/x265/fix-plt-rel.patch b/pkgs/by-name/x2/x265/fix-plt-rel.patch new file mode 100644 index 000000000000..23b5472bea4f --- /dev/null +++ b/pkgs/by-name/x2/x265/fix-plt-rel.patch @@ -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 diff --git a/pkgs/by-name/x2/x265/package.nix b/pkgs/by-name/x2/x265/package.nix index c51679eca4e7..e55d07e6ae4d 100644 --- a/pkgs/by-name/x2/x265/package.nix +++ b/pkgs/by-name/x2/x265/package.nix @@ -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) [