Bug 614264 - Fix build problem after tracemonkey merge. r=ted.mielczarek
authorPaul Biggar <pbiggar>
Tue, 23 Nov 2010 09:16:00 -0800
changeset 58085 29323301bb1717bff13fc9d0e8eb159dad8107b3
parent 58084 0ffa6f6ee041894fce664586beebb4d7b622a4b5
child 58086 5f38f9a553453f24946f8457f1203aad66ff81d3
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersted
bugs614264
milestone2.0b8pre
Bug 614264 - Fix build problem after tracemonkey merge. r=ted.mielczarek a=bustage
js/src/configure.in
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -359,17 +359,16 @@ if test "$COMPILE_ENVIRONMENT"; then
 #     - When we say $target, we mean $host, that is, the system on which
 #       Mozilla will be run.
 #     - When we say $host, we mean $build, that is, the system on which Mozilla
 #       is built.
 #     - $target (in its correct usage) is for compilers who generate code for a
 #       different platform than $host, so it would not be used by Mozilla.
 if test "$target" != "$host"; then
     echo "cross compiling from $host to $target"
-    CROSS_COMPILE=1
 
     _SAVE_CC="$CC"
     _SAVE_CFLAGS="$CFLAGS"
     _SAVE_LDFLAGS="$LDFLAGS"
 
     AC_MSG_CHECKING([for host c compiler])
     AC_CHECK_PROGS(HOST_CC, $HOST_CC gcc cc /usr/ucb/cc cl icc, "")
     if test -z "$HOST_CC"; then
@@ -485,16 +484,22 @@ if test "$target" != "$host"; then
 
     AC_CHECK_PROGS(RANLIB, $RANLIB "${target_alias}-ranlib" "${target}-ranlib", :)
     AC_CHECK_PROGS(AR, $AR "${target_alias}-ar" "${target}-ar", :)
     MOZ_PATH_PROGS(AS, $AS "${target_alias}-as" "${target}-as", :)
     AC_CHECK_PROGS(LD, $LD "${target_alias}-ld" "${target}-ld", :)
     AC_CHECK_PROGS(STRIP, $STRIP "${target_alias}-strip" "${target}-strip", :)
     AC_CHECK_PROGS(WINDRES, $WINDRES "${target_alias}-windres" "${target}-windres", :)
     AC_DEFINE(CROSS_COMPILE)
+
+    dnl If we cross compile for ppc on Mac OS X x86, cross_compiling will
+    dnl have erroneously been set to "no", because the x86 build host is
+    dnl able to run ppc code in a translated environment, making a cross
+    dnl compiler appear native.  So we override that here.
+    cross_compiling=yes
 else
     AC_PROG_CC
     AC_PROG_CXX
     AC_PROG_RANLIB
     MOZ_PATH_PROGS(AS, $AS as, $CC)
     AC_CHECK_PROGS(AR, ar, :)
     AC_CHECK_PROGS(LD, ld, :)
     AC_CHECK_PROGS(STRIP, strip, :)