shithub: libvpx

Download patch

ref: 8bf4c43defe8352b6093c18c33ee2ea329a2ac8a
parent: 715b8d3befdd24b81a564b819fc18f95296b24f1
author: James Zern <[email protected]>
date: Fri Jun 27 11:33:39 EDT 2014

configure: defer x32 check until post toolchain setup

x32 would never be detected unless an explicit CC= was used
fixes:
...: -E: command not found

Change-Id: I465fd7b0979f782053bdda240ad68edbca5658e5

--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -1048,14 +1048,6 @@
         esac
     ;;
     x86*)
-        bits=32
-        enabled x86_64 && bits=64
-        check_cpp <<EOF && bits=x32
-#ifndef __ILP32__
-#error "not x32"
-#endif
-EOF
-
         case  ${tgt_os} in
             win*)
                 enabled gcc && add_cflags -fno-common
@@ -1094,8 +1086,6 @@
                 esac
             ;;
             gcc*)
-                add_cflags -m${bits}
-                add_ldflags -m${bits}
                 link_with_cc=gcc
                 tune_cflags="-march="
                 setup_gnu_toolchain
@@ -1117,6 +1107,20 @@
                          soft_disable avx2
                     ;;
                 esac
+            ;;
+        esac
+
+        bits=32
+        enabled x86_64 && bits=64
+        check_cpp <<EOF && bits=x32
+#ifndef __ILP32__
+#error "not x32"
+#endif
+EOF
+        case ${tgt_cc} in
+            gcc*)
+                add_cflags -m${bits}
+                add_ldflags -m${bits}
             ;;
         esac