Source: x265
Version: 1.7-3
Severity: important
Tags: patch
Hi,
x265 is required for libav these days (and probably ffmpeg later).
The attached patch makes it recognise x32 and handles it as a faux
non-x86 processor architecture, which is not strictly correct, but
achieves the goal to make x265 not use assembly code for it, as it
fails there currently.
We’ll eventually want to port all those asm-using packages to x32
proper, but for now, disabling asm is the way to go to get them
compiling (and thus usable in the dependency chain – no idea if
it’s actually usable as in, can decode a video in time, but we’ll
see that later).
-- System Information:
Debian Release: stretch/sid
APT prefers unreleased
APT policy: (500, 'unreleased'), (500, 'buildd-unstable'), (500, 'unstable')
Architecture: x32 (x86_64)
Foreign Architectures: i386, amd64
Kernel: Linux 4.0.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/lksh
Init: sysvinit (via /sbin/init)
diff -Nru x265-1.7/debian/changelog x265-1.7/debian/changelog
--- x265-1.7/debian/changelog 2015-06-19 15:36:05.0 +0200
+++ x265-1.7/debian/changelog 2015-07-13 14:49:21.0 +0200
@@ -1,3 +1,10 @@
+x265 (1.7-3+x32.1) unreleased; urgency=low
+
+ * Non-maintainer upload.
+ * Fix building on x32 (without asm, for now)
+
+ -- Thorsten Glaser Mon, 13 Jul 2015 14:49:06 +0200
+
x265 (1.7-3) unstable; urgency=medium
* debian/rules: Filter -Wl,-Bsymbolic-functions. (Closes: #789111)
diff -Nru x265-1.7/debian/patches/fix_x32.patch x265-1.7/debian/patches/fix_x32.patch
--- x265-1.7/debian/patches/fix_x32.patch 1970-01-01 01:00:00.0 +0100
+++ x265-1.7/debian/patches/fix_x32.patch 2015-07-13 14:48:58.0 +0200
@@ -0,0 +1,32 @@
+# DP: detect x32, handle as non-x86 and no-ASM for now, but enable PIC
+
+--- a/source/CMakeLists.txt
b/source/CMakeLists.txt
+@@ -43,6 +43,10 @@ string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR
+ set(X86_ALIASES x86 i386 i686 x86_64 amd64)
+ list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
+ if("${SYSPROC}" STREQUAL "" OR X86MATCH GREATER "-1")
++ if(CMAKE_LIBRARY_ARCHITECTURE STREQUAL "x86_64-linux-gnux32")
++message(STATUS "Detected x32 target system")
++set(X32 1)
++ else()
+ message(STATUS "Detected x86 target processor")
+ set(X86 1)
+ add_definitions(-DX265_ARCH_X86=1)
+@@ -50,6 +54,7 @@ if("${SYSPROC}" STREQUAL "" OR X86MATCH
+ set(X64 1)
+ add_definitions(-DX86_64=1)
+ endif()
++ endif()
+ elseif(${SYSPROC} STREQUAL "armv6l")
+ message(STATUS "Detected ARM target processor")
+ set(ARM 1)
+@@ -86,6 +91,8 @@ endif(UNIX)
+
+ if(X64 AND NOT WIN32)
+ option(ENABLE_PIC "Enable Position Independent Code" ON)
++elseif(X32)
++option(ENABLE_PIC "Enable Position Independent Code" ON)
+ else()
+ option(ENABLE_PIC "Enable Position Independent Code" OFF)
+ endif(X64 AND NOT WIN32)
diff -Nru x265-1.7/debian/patches/series x265-1.7/debian/patches/series
--- x265-1.7/debian/patches/series 2015-06-18 18:59:27.0 +0200
+++ x265-1.7/debian/patches/series 2015-07-13 14:46:22.0 +0200
@@ -1,3 +1,4 @@
compile-flags.patch
highbit-depth-path.patch
gcc-check.patch
+fix_x32.patch