]> granicus.if.org Git - libvpx/commitdiff
configure: defer x32 check until post toolchain setup
authorJames Zern <jzern@google.com>
Fri, 27 Jun 2014 22:33:39 +0000 (15:33 -0700)
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>
Sat, 28 Jun 2014 04:00:13 +0000 (21:00 -0700)
x32 would never be detected unless an explicit CC= was used
fixes:
...: -E: command not found

Change-Id: I465fd7b0979f782053bdda240ad68edbca5658e5

build/make/configure.sh

index bda11b7ce878ef86e81f80b1be525da1f6e0ca81..688162617d973c1e607c5279c0c74813c789f5ba 100755 (executable)
@@ -1048,14 +1048,6 @@ EOF
         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 @@ EOF
                 esac
             ;;
             gcc*)
-                add_cflags -m${bits}
-                add_ldflags -m${bits}
                 link_with_cc=gcc
                 tune_cflags="-march="
                 setup_gnu_toolchain
@@ -1120,6 +1110,20 @@ EOF
             ;;
         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
+
         soft_enable runtime_cpu_detect
         # We can't use 'check_cflags' until the compiler is configured and CC is
         # populated.