properly_detect_x32
authorDebian Multimedia Maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>
Fri, 19 Jan 2018 11:36:28 +0000 (11:36 +0000)
committerSebastian Ramacher <sramacher@debian.org>
Fri, 19 Jan 2018 11:36:28 +0000 (11:36 +0000)
Gbp-Pq: Name properly_detect_x32.patch

common/common.h
configure

index 867b2073c0c7968d5a5410e1faf6b67273221b21..90a9f73a100526dcad177e4a0dea014fba5123bc 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 4f5fdb4a46a443ef55eb0e9a5b37db79a0ed98dc..7ebf4df09404196ad3544da1a073730c4d826aae 100755 (executable)
--- a/configure
+++ b/configure
@@ -684,6 +684,10 @@ esac
 
 LDFLAGS="$LDFLAGS $libm"
 
+case `$CC -dumpmachine` in
+    *gnux32) host_cpu=x32
+esac
+
 stack_alignment=4
 case $host_cpu in
     i*86)
@@ -740,6 +744,10 @@ case $host_cpu in
             ASFLAGS="$ASFLAGS -f elf64"
         fi
         ;;
+    x32)
+        ARCH="X32"
+        CFLAGS="$CFLAGS -fPIC"
+        ;;
     powerpc*)
         ARCH="PPC"
         if [ $asm = auto ] ; then