properly_detect_x32
authorDebian Multimedia Maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>
Wed, 21 Sep 2016 20:59:37 +0000 (20:59 +0000)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 21 Sep 2016 20:59:37 +0000 (20:59 +0000)
Gbp-Pq: Name properly_detect_x32.patch

common/common.h
configure

index 3a74c9e7bb60d09208ff46c9b2603f0aee804342..110627da141f8ea0a287fe6243c9b6bb895b6498 100644 (file)
@@ -1015,7 +1015,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 77f132d13b661f78444fed9d72279d8c4f8e144a..7d271d5112fa3195059c2cdae802582f15ebfec8 100755 (executable)
--- a/configure
+++ b/configure
@@ -669,6 +669,10 @@ esac
 
 LDFLAGS="$LDFLAGS $libm"
 
+case `$CC -dumpmachine` in
+    *gnux32) host_cpu=x32
+esac
+
 stack_alignment=4
 case $host_cpu in
     i*86)
@@ -725,6 +729,10 @@ case $host_cpu in
             ASFLAGS="$ASFLAGS -f elf64"
         fi
         ;;
+    x32)
+        ARCH="X32"
+        CFLAGS="$CFLAGS -fPIC"
+        ;;
     powerpc*)
         ARCH="PPC"
         if [ $asm = auto ] ; then