properly_detect_x32
authorDebian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Thu, 27 Sep 2018 20:03:40 +0000 (21:03 +0100)
committerSebastian Ramacher <sramacher@debian.org>
Thu, 27 Sep 2018 20:03:40 +0000 (21:03 +0100)
Gbp-Pq: Name properly_detect_x32.patch

common/common.h
configure

index b1f83efbb6562a13cfaa3ea7fdd7f10e4949584d..23662128b885b630fb7bf0d112f79216c5af9296 100644 (file)
@@ -800,7 +800,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 f71e3e26d612eec5851628220d0ec6018c907c0c..0e44b0bff95c0d9bc11a93fb2ba3944ba6631c6e 100755 (executable)
--- a/configure
+++ b/configure
@@ -702,6 +702,10 @@ esac
 
 LDFLAGS="$LDFLAGS $libm"
 
+case `$CC -dumpmachine` in
+    *gnux32) host_cpu=x32
+esac
+
 stack_alignment=4
 case $host_cpu in
     i*86)
@@ -758,6 +762,10 @@ case $host_cpu in
             ASFLAGS="$ASFLAGS -f elf64"
         fi
         ;;
+    x32)
+        ARCH="X32"
+        CFLAGS="$CFLAGS -fPIC"
+        ;;
     powerpc*)
         ARCH="PPC"
         if [ $asm = auto ] ; then