[x264-devel] configure: force select -mXX gcc option for i386/x86-64

Alexander Prikhodko git at videolan.org
Wed Apr 25 00:17:09 CEST 2012


x264 | branch: master | Alexander Prikhodko <komisar666 at gmail.com> | Sat Mar 31 12:06:21 2012 +0300| [3691332c0b33a68f9d6f519edaa2b848ed34a38c] | committer: Jason Garrett-Glaser

configure: force select -mXX gcc option for i386/x86-64
Makes multilib compilation more convenient.

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

 configure |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index e1476d1..086b399 100755
--- a/configure
+++ b/configure
@@ -537,6 +537,8 @@ case $host_cpu in
             if [[ "$asm" == auto && "$CFLAGS" != *-mfpmath* ]]; then
                 CFLAGS="$CFLAGS -mfpmath=sse -msse"
             fi
+            CFLAGS="-m32 $CFLAGS"
+            LDFLAGS="-m32 $LDFLAGS"
         else
             # icc on linux has various degrees of mod16 stack support
             if [ $SYS = LINUX ]; then
@@ -565,6 +567,7 @@ case $host_cpu in
     x86_64)
         ARCH="X86_64"
         AS="yasm"
+        [ $compiler = GNU ] && CFLAGS="-m64 $CFLAGS" && LDFLAGS="-m64 $LDFLAGS"
         if [ "$SYS" = MACOSX ]; then
             ASFLAGS="$ASFLAGS -f macho64 -m amd64 -DPIC -DPREFIX"
             if cc_check '' "-arch x86_64"; then



More information about the x264-devel mailing list