properly_detect_x32
authorDebian Multimedia Maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>
Wed, 28 Jun 2017 06:31:44 +0000 (07:31 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 28 Jun 2017 06:31:44 +0000 (07:31 +0100)
Gbp-Pq: Name properly_detect_x32.patch

common/common.h
configure

index 8cc1dc1e69f2dc9ae9054c59fd5c4176c68ae959..86831e001c91f4fb07e4a76d3eba6603a83d00cf 100644 (file)
@@ -1012,7 +1012,7 @@ static int ALWAYS_INLINE x264_predictor_clip( int16_t (*dst)[2], int16_t (*mvc)[
     return cnt;
 }
 
-#if ARCH_X86 || ARCH_X86_64
+#if ARCH_X86 || ARCH_X86_64 || ARCH_X32
 #include "x86/util.h"
 #endif
 
index f826a7de5d35264e1bb8e886253486f602aad4c3..1a29a7f37caf26a87ea4de2af3bfc225b68f4594 100755 (executable)
--- a/configure
+++ b/configure
@@ -674,6 +674,10 @@ esac
 
 LDFLAGS="$LDFLAGS $libm"
 
+case `$CC -dumpmachine` in
+    *gnux32) host_cpu=x32
+esac
+
 stack_alignment=4
 case $host_cpu in
     i*86)
@@ -730,6 +734,10 @@ case $host_cpu in
             ASFLAGS="$ASFLAGS -f elf64"
         fi
         ;;
+    x32)
+        ARCH="X32"
+        CFLAGS="$CFLAGS -fPIC"
+        ;;
     powerpc*)
         ARCH="PPC"
         if [ $asm = auto ] ; then