[x264-devel] configure: Increase x86 stack alignment on clang

Henrik Gramner git at videolan.org
Mon Dec 25 20:39:31 CET 2017


x264 | branch: master | Henrik Gramner <henrik at gramner.com> | Fri Aug  4 23:09:00 2017 +0200| [1e27313c12154dd3922ef7ab9508a4320e83c2ac] | committer: Anton Mitrofanov

configure: Increase x86 stack alignment on clang

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=1e27313c12154dd3922ef7ab9508a4320e83c2ac
---

 configure | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index f7b14d9d..f72ccc79 100755
--- a/configure
+++ b/configure
@@ -866,12 +866,17 @@ if [ $compiler = GNU -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then
     if cc_check '' -mpreferred-stack-boundary=6 ; then
         CFLAGS="$CFLAGS -mpreferred-stack-boundary=6"
         stack_alignment=64
-    elif cc_check '' -mpreferred-stack-boundary=5 ; then
-        CFLAGS="$CFLAGS -mpreferred-stack-boundary=5"
-        stack_alignment=32
-    elif [ $stack_alignment -lt 16 ] && cc_check '' -mpreferred-stack-boundary=4 ; then
-        CFLAGS="$CFLAGS -mpreferred-stack-boundary=4"
-        stack_alignment=16
+    elif cc_check '' -mstack-alignment=64 ; then
+        CFLAGS="$CFLAGS -mstack-alignment=64"
+        stack_alignment=64
+    elif [ $stack_alignment -lt 16 ] ; then
+        if cc_check '' -mpreferred-stack-boundary=4 ; then
+            CFLAGS="$CFLAGS -mpreferred-stack-boundary=4"
+            stack_alignment=16
+        elif cc_check '' -mstack-alignment=16 ; then
+            CFLAGS="$CFLAGS -mstack-alignment=16"
+            stack_alignment=16
+        fi
     fi
 elif [ $compiler = ICC -a $ARCH = X86 ]; then
     # icc on linux has various degrees of mod16 stack support



More information about the x264-devel mailing list