properly_detect_x32
authorDebian Multimedia Maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>
Wed, 25 Jan 2017 09:40:48 +0000 (09:40 +0000)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 25 Jan 2017 09:40:48 +0000 (09:40 +0000)
Gbp-Pq: Name properly_detect_x32.patch

common/common.h
configure

index 3f71fbc6a93a395131c6d9b27df493bc5c02091b..778abd4e89361f4c54f6bed90c360e50cba7a3b7 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 28385dcb60dc7241e0acd9d4c37dd850aa600185..8758fc9b9962e6b462a774eb744014767436f902 100755 (executable)
--- a/configure
+++ b/configure
@@ -673,6 +673,10 @@ esac
 
 LDFLAGS="$LDFLAGS $libm"
 
+case `$CC -dumpmachine` in
+    *gnux32) host_cpu=x32
+esac
+
 stack_alignment=4
 case $host_cpu in
     i*86)
@@ -729,6 +733,10 @@ case $host_cpu in
             ASFLAGS="$ASFLAGS -f elf64"
         fi
         ;;
+    x32)
+        ARCH="X32"
+        CFLAGS="$CFLAGS -fPIC"
+        ;;
     powerpc*)
         ARCH="PPC"
         if [ $asm = auto ] ; then