Bug 462427 - Stop requiring CROSS_COMPILE being set. r=ted
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 11 Feb 2014 10:37:46 +0900
changeset 185191 01de43f70bed3fcacab20fb1a95ce65574c49d83
parent 185190 b362e45c17cbf784c59eb09ce875eee4387c4517
child 185192 6e75f48dd0cf4a41068ee356f5727234961cec8e
push id3503
push userraliiev@mozilla.com
push dateMon, 28 Apr 2014 18:51:11 +0000
treeherdermozilla-beta@c95ac01e332e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs462427
milestone30.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 462427 - Stop requiring CROSS_COMPILE being set. r=ted
build/autoconf/android.m4
build/autoconf/toolchain.m4
build/macosx/universal/mozconfig.common
build/unix/mozconfig.linux32
configure.in
js/src/configure.in
--- a/build/autoconf/android.m4
+++ b/build/autoconf/android.m4
@@ -186,17 +186,16 @@ case "$target" in
         HOST_LDFLAGS=" "
     fi
 
     ANDROID_NDK="${android_ndk}"
     ANDROID_TOOLCHAIN="${android_toolchain}"
     ANDROID_PLATFORM="${android_platform}"
 
     AC_DEFINE(ANDROID)
-    CROSS_COMPILE=1
     AC_SUBST(ANDROID_NDK)
     AC_SUBST(ANDROID_TOOLCHAIN)
     AC_SUBST(ANDROID_PLATFORM)
 
     ;;
 esac
 
 ])
--- a/build/autoconf/toolchain.m4
+++ b/build/autoconf/toolchain.m4
@@ -129,16 +129,17 @@ AC_PROG_CXX
 
 AC_CHECK_PROGS(RANLIB, "${target_alias}-ranlib" "${target}-ranlib", :)
 AC_CHECK_PROGS(AR, "${target_alias}-ar" "${target}-ar", :)
 MOZ_PATH_PROGS(AS, "${target_alias}-as" "${target}-as", :)
 AC_CHECK_PROGS(LD, "${target_alias}-ld" "${target}-ld", :)
 AC_CHECK_PROGS(STRIP, "${target_alias}-strip" "${target}-strip", :)
 AC_CHECK_PROGS(WINDRES, "${target_alias}-windres" "${target}-windres", :)
 AC_DEFINE(CROSS_COMPILE)
+CROSS_COMPILE=1
 
 dnl If we cross compile for ppc on Mac OS X x86, cross_compiling will
 dnl dnl have erroneously been set to "no", because the x86 build host is
 dnl dnl able to run ppc code in a translated environment, making a cross
 dnl dnl compiler appear native.  So we override that here.
 cross_compiling=yes
 ])
 
--- a/build/macosx/universal/mozconfig.common
+++ b/build/macosx/universal/mozconfig.common
@@ -38,21 +38,16 @@ if test "$MOZ_BUILD_APP" = "i386" -o "$M
 
   # These must be set for cross builds, and don't hurt straight builds.
   RANLIB=ranlib
   AR=ar
   AS=$CC
   LD=ld
   STRIP="strip"
 
-  # Let configure know that we mean business.
-  if test "$NATIVE_CPU" != "$TARGET_CPU" ; then
-    CROSS_COMPILE=1
-  fi
-
   # Each per-CPU build should be entirely oblivious to the fact that a
   # universal binary will be produced.  The exception is packager.mk, which
   # needs to know to look for universal bits when building the .dmg.
   UNIVERSAL_BINARY=1
 
   export CC CXX HOST_CC HOST_CXX RANLIB AR AS LD STRIP
 fi
 fi
--- a/build/unix/mozconfig.linux32
+++ b/build/unix/mozconfig.linux32
@@ -1,10 +1,11 @@
 . "$topsrcdir/build/unix/mozconfig.linux"
 
 if test `uname -m` = "x86_64"; then
   # -march=pentiumpro is what our 32-bit native toolchain defaults to
   CC="$CC -m32 -march=pentiumpro"
   CXX="$CXX -m32 -march=pentiumpro"
   ac_add_options --target=i686-pc-linux
+  ac_add_options --host=i686-pc-linux
   ac_add_options --x-libraries=/usr/lib
   export PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig:/usr/share/pkgconfig
 fi
--- a/configure.in
+++ b/configure.in
@@ -282,17 +282,16 @@ if test -n "$gonkdir" ; then
         HOST_LDFLAGS=" "
     fi
 
     AC_DEFINE(ANDROID)
     AC_DEFINE_UNQUOTED(ANDROID_VERSION, $ANDROID_VERSION)
     AC_SUBST(ANDROID_VERSION)
     AC_DEFINE(HAVE_SYS_UIO_H)
     AC_DEFINE(HAVE_PTHREADS)
-    CROSS_COMPILE=1
     MOZ_CHROME_FILE_FORMAT=omni
     direct_nspr_config=1
 else
     MOZ_ANDROID_NDK
 
     case "$target" in
     *-android*|*-linuxandroid*)
         if test -z "$ANDROID_PACKAGE_NAME" ; then
@@ -309,26 +308,23 @@ fi
 
 AC_SUBST(ANDROID_SOURCE)
 AC_SUBST(ANDROID_PACKAGE_NAME)
 AC_SUBST(OBJCOPY)
 
 dnl ========================================================
 dnl Checks for compilers.
 dnl ========================================================
-dnl Set CROSS_COMPILE in the environment when running configure
-dnl to use the cross-compile setup for now
-dnl ========================================================
 
 dnl AR_FLAGS set here so HOST_AR_FLAGS can be set correctly (see bug 538269)
 AR_FLAGS='crs $@'
 
 if test "$COMPILE_ENVIRONMENT"; then
 
-if test -n "$CROSS_COMPILE" -a "$target" != "$host"; then
+if test "$target" != "$host"; then
     MOZ_CROSS_COMPILER
 else
     AC_PROG_CC
     case "$target" in
     *-mingw*)
       # Work around the conftest.exe access problem on Windows
       sleep 2
     esac
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -223,17 +223,16 @@ if test -n "$gonkdir" ; then
         HOST_CXXFLAGS=" "
     fi
     if test -z "$HOST_LDFLAGS" ; then
         HOST_LDFLAGS=" "
     fi
 
     AC_DEFINE(ANDROID)
     AC_DEFINE(GONK)
-    CROSS_COMPILE=1
 else
     MOZ_ANDROID_NDK
 fi
 
 dnl ==============================================================
 dnl Get mozilla version from central milestone file
 dnl ==============================================================
 MOZILLA_VERSION=`$PERL $srcdir/config/milestone.pl -topsrcdir $srcdir`
@@ -276,19 +275,16 @@ AC_SUBST(JS_CONFIG_NAME)
 AC_SUBST(MOZJS_MAJOR_VERSION)
 AC_SUBST(MOZJS_MINOR_VERSION)
 AC_SUBST(MOZJS_PATCH_VERSION)
 AC_SUBST(MOZJS_ALPHA)
 
 dnl ========================================================
 dnl Checks for compilers.
 dnl ========================================================
-dnl Set CROSS_COMPILE in the environment when running configure
-dnl to use the cross-compile setup for now
-dnl ========================================================
 
 dnl AR_FLAGS set here so HOST_AR_FLAGS can be set correctly (see bug 538269)
 AR_FLAGS='crs $@'
 
 if test "$COMPILE_ENVIRONMENT"; then
 
 # Note:
 #   In Mozilla, we use the names $target, $host and $build incorrectly, but are
@@ -549,22 +545,16 @@ if test -n "$_WIN32_MSVC"; then
     # Common to all MSVC environments:
 
     AC_DEFINE(HAVE_LOCALECONV)
     AC_DEFINE(HAVE_HYPOT)
 fi
 
 fi # COMPILE_ENVIRONMENT
 
-if test "$cross_compiling"  = "yes"; then
-    CROSS_COMPILE=1
-else
-    CROSS_COMPILE=
-fi
-
 # Check to see if we are running in a broken QEMU scratchbox.
 # We know that anything below 1.0.16 is broken.
 AC_CHECK_PROGS(SBCONF, sb-conf ve, "")
 if test -n "$SBCONF"; then
     _sb_version=`$SBCONF ve`
     _sb_version_major=`echo $_sb_version | cut -f1 -d.`
     _sb_version_minor=`echo $_sb_version | cut -f2 -d.`
     _sb_version_point=`echo $_sb_version | cut -f3 -d.`