Bug 992471: Do not check for CROSS_COMPILE in the environment. r=glandium.
authorWan-Teh Chang <wtc@google.com>
Sat, 26 Apr 2014 06:25:56 -0700
changeset 4556 9accf627e294da19fc2a8be5024ffd10ccb67949
parent 4555 0cde8ea80d9bfd4c15f1653b4db6098c5ab42b3f
child 4557 b033da9a671ef5e521cc5c842597862d8084b018
push id101
push userwtc@google.com
push dateSat, 26 Apr 2014 13:26:32 +0000
reviewersglandium
bugs992471
Bug 992471: Do not check for CROSS_COMPILE in the environment. r=glandium.
configure
configure.in
--- a/configure
+++ b/configure
@@ -3123,18 +3123,17 @@ if test -n "$MOZ_DEBUG"; then
     esac
 else
     $as_echo "#define NDEBUG 1" >>confdefs.h
 
     DEFINES="$DEFINES -UDEBUG"
 fi
 
 if test -z "$SKIP_COMPILER_CHECKS"; then
-
-if test "$target" != "$host" -o -n "$CROSS_COMPILE"; then
+if test "$target" != "$host"; then
     echo "cross compiling from $host to $target"
     cross_compiling=yes
 
     case "$build:$target" in
       powerpc-apple-darwin8*:i?86-apple-darwin*)
                                                 _SAVE_CFLAGS=$CFLAGS
         _SAVE_CXXFLAGS=$CXXFLAGS
         CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk $CFLAGS"
@@ -3979,17 +3978,17 @@ fi
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-if test "$target" != "$host" -o -n "$CROSS_COMPILE"; then
+if test "$target" != "$host"; then
     if test -n "$USE_CPLUS"; then
         for ac_prog in $CXX "${target_alias}-g++" "${target}-g++"
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
 if ${ac_cv_prog_CXX+:} false; then :
--- a/configure.in
+++ b/configure.in
@@ -565,21 +565,17 @@ else
     AC_DEFINE(NDEBUG)
     DEFINES="$DEFINES -UDEBUG"
 fi
 
 if test -z "$SKIP_COMPILER_CHECKS"; then
 dnl ========================================================
 dnl Checks for compilers.
 dnl ========================================================
-
-dnl Explicitly honor $CROSS_COMPILE to allow cross-compiling
-dnl between toolkits on the same architecture, as when
-dnl targeting the iOS Simulator from OS X.
-if test "$target" != "$host" -o -n "$CROSS_COMPILE"; then
+if test "$target" != "$host"; then
     echo "cross compiling from $host to $target"
     cross_compiling=yes
 
     case "$build:$target" in
       powerpc-apple-darwin8*:i?86-apple-darwin*)
         dnl The Darwin cross compiler doesn't necessarily point itself at a
         dnl root that has libraries for the proper architecture, it defaults
         dnl to the system root.  The libraries in the system root on current
@@ -608,17 +604,17 @@ fi
 
 dnl In the latest versions of autoconf, AC_PROG_CC is a one-shot macro,
 dnl declared with AC_DEFUN_ONCE. So it must not be expanded inside a
 dnl conditional block. Invoke AC_PROG_CC outside any conditional block
 dnl and before invoking AC_TRY_COMPILE (which requires AC_PROG_CC).
 AC_PROG_CC
 
 dnl Reenter the conditional blocks after invoking AC_PROG_CC.
-if test "$target" != "$host" -o -n "$CROSS_COMPILE"; then
+if test "$target" != "$host"; then
     if test -n "$USE_CPLUS"; then
         AC_CHECK_PROGS(CXX, $CXX "${target_alias}-g++" "${target}-g++", echo)
         unset ac_cv_prog_CXX
         AC_PROG_CXX
     fi
 
     case "$build:$target" in
       powerpc-apple-darwin8*:i?86-apple-darwin*|*:arm*-apple-darwin*)