Bug 1043108: Remove -arch:IA32 from non-x86 builds. r=dmajor.
authorWan-Teh Chang <wtc@google.com>
Tue, 05 Aug 2014 16:24:32 -0700
changeset 4586 42d9fa709ca260cc295fed6847c9008ecb759b73
parent 4585 358519578867afbba1bd9f88513ad1d2cb39e157
child 4587 1a9eb31b1e6f4533fb36a9e32db3d7c15a0d2d41
push id130
push userwtc@google.com
push dateTue, 05 Aug 2014 23:25:03 +0000
reviewersdmajor
bugs1043108
Bug 1043108: Remove -arch:IA32 from non-x86 builds. r=dmajor.
configure.in
--- a/configure.in
+++ b/configure.in
@@ -1983,22 +1983,16 @@ tools are selected during the Xcode/Deve
         _DEBUG_FLAGS=-Zi
         _OPTIMIZE_FLAGS=-O2
 
         PROFILE_GEN_CFLAGS="-GL"
         PROFILE_GEN_LDFLAGS="-LTCG:PGINSTRUMENT"
         PROFILE_USE_CFLAGS="-GL -wd4624 -wd4952"
         PROFILE_USE_LDFLAGS="-LTCG:PGUPDATE"
 
-        if test "$MSC_VER" -ge "1700"; then
-            dnl Visual C++ 2012 defaults to -arch:SSE2. Use -arch:IA32 to
-            dnl avoid requiring SSE2.
-            CFLAGS="$CFLAGS -arch:IA32"
-        fi
-
         if test "$MSC_VER" -ge "1800"; then
             dnl Visual C++ 2013 requires -FS when parallel building with
             dnl make -jN. If not specified, compiler sometimes emits C1041
             dnl error.
             CFLAGS="$CFLAGS -FS"
             dnl -Gw can benefit when using linker optimization on PGO.
             dnl http://blogs.msdn.com/b/vcblog/archive/2013/09/11/introducing-gw-compiler-switch.aspx
             PROFILE_GEN_CFLAGS="$PROFILE_GEN_CFLAGS -Gw"
@@ -2082,16 +2076,21 @@ tools are selected during the Xcode/Deve
     esac
 
     case "$target_cpu" in
     i*86)
 	if test -n "$USE_64"; then
 	    AC_DEFINE(_AMD64_)
 	else		
 	    AC_DEFINE(_X86_)
+            if test -z "$GNU_CC" -a "$MSC_VER" -ge "1700"; then
+                dnl Visual C++ 2012 defaults to -arch:SSE2. Use -arch:IA32
+                dnl to avoid requiring SSE2.
+                CFLAGS="$CFLAGS -arch:IA32"
+            fi
 	fi
         ;;
     x86_64)
 	    AC_DEFINE(_AMD64_)
 	    USE_64=1
 	    ;;
     ia64)
 	    AC_DEFINE(_IA64_)