Bug 684150 - Abort configuring when targeting a platform different to the platform building on with crashreporter turned on; r=ted
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 02 Sep 2011 10:59:11 -0400
changeset 76795 78e81382db7f7c33f116ffff0bd521bca2513ece
parent 76794 01dcbca466f30431b08727f6d75e64798af15381
child 76796 58d026601240cec8a26acc78a7cfdb6dc0bb55ae
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersted
bugs684150
milestone9.0a1
Bug 684150 - Abort configuring when targeting a platform different to the platform building on with crashreporter turned on; r=ted Google breakpad tools do not support building on platforms other than the target platform, so it's best for us to abort the configure stage with an appropriate message, because the build will fail later on anyways.
configure.in
--- a/configure.in
+++ b/configure.in
@@ -5827,16 +5827,20 @@ if test -n "$MOZ_CRASHREPORTER"; then
   if (test "$OS_TARGET" = "Linux" -o "$OS_ARCH" = "SunOS") && \
     test -z "$SKIP_LIBRARY_CHECKS"; then
     PKG_CHECK_MODULES(MOZ_GTHREAD, gthread-2.0)
     AC_SUBST(MOZ_GTHREAD_CFLAGS)
     AC_SUBST(MOZ_GTHREAD_LIBS)
 
     MOZ_CHECK_HEADERS([curl/curl.h], [], [AC_MSG_ERROR([Couldn't find curl/curl.h which is required for the crash reporter.  Use --disable-crashreporter to disable the crash reporter.])])
   fi
+
+  if (test "$OS_ARCH" != "$HOST_OS_ARCH"); then
+    AC_MSG_ERROR([Breakpad tools do not support compiling on $HOST_OS_ARCH while targeting $OS_ARCH.  Use --disable-crashreporter.])
+  fi
 fi
 
 MOZ_ARG_WITH_STRING(crashreporter-enable-percent,
 [  --with-crashreporter-enable-percent=NN
                           Enable sending crash reports by default on NN% of users. (default=100)],
 [ val=`echo $withval | sed 's/[^0-9]//g'`
     MOZ_CRASHREPORTER_ENABLE_PERCENT="$val"])