]> granicus.if.org Git - libx264/commitdiff
configure: force select -mXX gcc option for i386/x86-64
authorAlexander Prikhodko <komisar666@gmail.com>
Sat, 31 Mar 2012 09:06:21 +0000 (12:06 +0300)
committerFiona Glaser <fiona@x264.com>
Mon, 23 Apr 2012 20:28:42 +0000 (13:28 -0700)
Makes multilib compilation more convenient.

configure

index e1476d1b6f7cb4a8f73834bd94b45ec85a229343..086b399ccd05fe24492a574ac54e835689483192 100755 (executable)
--- 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