Bug 550527 - QEMU segfaults when processing imacro_asm.js. Disabling js shell on versions of sbox that are known to fail. r=jimb
authorDoug Turner <dougt@dougt.org>
Mon, 08 Mar 2010 15:21:38 -0800
changeset 39135 b44b60d703d11646cf4c0e3b67afa9b7c948912a
parent 39134 8ce70abd77773670461db881eeaa5560cc2aa8b2
child 39136 1beaf3d5335f67244788d2c70af235b16a075cfa
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimb
bugs550527
milestone1.9.3a3pre
Bug 550527 - QEMU segfaults when processing imacro_asm.js. Disabling js shell on versions of sbox that are known to fail. r=jimb
js/src/Makefile.in
js/src/config/autoconf.mk.in
js/src/configure.in
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -645,16 +645,17 @@ ifdef HAVE_DTRACE
 
 # We can't automatically generate dependencies on auto-generated headers;
 # we have to list them explicitly.
 $(addsuffix .$(OBJ_SUFFIX),jsdtracef jsinterp jsobj): $(CURDIR)/javascript-trace.h
 endif
 
 ifdef GNU_CC
 ifndef CROSS_COMPILE
+ifndef QEMU_CANT_RUN_JS_SHELL
 # If we don't have run-mozilla.sh *and* we're linking against NSPR, we don't
 # know how to run the JS binary. Oh well
 
 imacro_asm.js: imacro_asm.js.in jsopcode.tbl
 	$(CC) -c -x c -E -P -I$(srcdir) $< > $@
 
 GARBAGE += imacros.c.tmp imacro_asm.js
 
@@ -694,8 +695,9 @@ update-nanojit:
 	(cd $(srcdir) && hg up)
 	(cd $(NANOJIT_CENTRAL_LOCAL) && hg log -r tip --template "{node}\n") >$(srcdir)/nanojit-import-rev
 	(cd $(srcdir) && hg commit --message="Update nanojit-import-rev stamp." nanojit-import-rev)
 
 .PHONY: update-imacros update-nanojit
 endif
 endif
 endif
+endif
--- a/js/src/config/autoconf.mk.in
+++ b/js/src/config/autoconf.mk.in
@@ -324,16 +324,18 @@ WIN32_REDIST_DIR = @WIN32_REDIST_DIR@
 MOZ_MEMORY_LDFLAGS = @MOZ_MEMORY_LDFLAGS@
 
 # Codesighs tools option, enables win32 mapfiles.
 MOZ_MAPINFO	= @MOZ_MAPINFO@
 
 WINCE		= @WINCE@
 WINCE_WINDOWS_MOBILE = @WINCE_WINDOWS_MOBILE@
 
+QEMU_CANT_RUN_JS_SHELL = @QEMU_CANT_RUN_JS_SHELL@
+
 MACOS_SDK_DIR	= @MACOS_SDK_DIR@
 NEXT_ROOT	= @NEXT_ROOT@
 GCC_VERSION	= @GCC_VERSION@
 XCODEBUILD_VERSION= @XCODEBUILD_VERSION@
 HAS_XCODE_2_1	= @HAS_XCODE_2_1@
 UNIVERSAL_BINARY= @UNIVERSAL_BINARY@
 HAVE_DTRACE= @HAVE_DTRACE@
 
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -639,16 +639,30 @@ 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.`
+    if test $_sb_version_major -eq 1 && test $_sb_version_minor -eq 0 && test $_sb_version_point -le 16; then
+        QEMU_CANT_RUN_JS_SHELL=1
+    fi
+fi
+AC_SUBST(QEMU_CANT_RUN_JS_SHELL)
+
 AC_SUBST(_MSC_VER)
 
 AC_SUBST(GNU_AS)
 AC_SUBST(GNU_LD)
 AC_SUBST(GNU_CC)
 AC_SUBST(GNU_CXX)
 AC_SUBST(INTEL_CC)
 AC_SUBST(INTEL_CXX)