#1143183 x265: Please add patch to fix FTBFS on m68k, powerpc and sh4

Package:
src:x265
Source:
src:x265
Submitter:
John Paul Adrian Glaubitz
Date:
2026-07-31 13:23:02 UTC
Severity:
normal
Tags:
#1143183#5
Date:
2026-07-31 13:20:16 UTC
From:
To:
Source: x265
Version: 4.2-3
Severity: normal
Tags: ftbfs patch
X-Debbugs-Cc: debian-68k@lists.debian.org, debian-powerpc@lists.debian.org, debian-superh@lists.debian.org
User: debian-68k@lists.debian.org
Usertags: m68k
User: debian-superh@lists.debian.org
Usertags: sh4
User: debian-powerpc@lists.debian.org
Usertags: powerpc

Hi,

x265 FTBFS on m68k, powerpc and sh4 because it uses the old __sync atomic
builtins for which no 64-bit variant exists [1]:

/usr/bin/sh4-linux-gnu-ld.bfd: libx265.so.216: undefined reference to `__sync_fetch_and_add_8'
collect2: error: ld returned 1 exit status

This can be fixed by switching over to the new __atomic builtins which are
standard in GCC since version 4.7 [2].

I have also sent a pull-request upstream with a modified patch which accounts
for additional load and store macros added to threading.h [3].

Please consider including this patch for the next upload.

Thanks,
Adrian