Bug 462215 - javascript autoconf busted on windows mobile. r=ted
authorDoug Turner <dougt@meer.net>
Thu, 30 Oct 2008 14:41:21 -0700
changeset 21122 56e84df2b796149eebc23b7101db43d916b8ffc1
parent 21111 720743ba578f33e7376559acd39278e07b3b0064
child 21123 316376732261849097266d9716ce80209ad888f5
push id3332
push userdougt@mozilla.com
push dateThu, 30 Oct 2008 21:43:36 +0000
treeherdermozilla-central@316376732261 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs462215
milestone1.9.1b2pre
Bug 462215 - javascript autoconf busted on windows mobile. r=ted
js/src/Makefile.in
js/src/configure.in
--- a/js/src/Makefile.in
+++ b/js/src/Makefile.in
@@ -70,19 +70,25 @@ MODULE_OPTIMIZE_FLAGS = -Os -fstrict-ali
 # Special optimization flags for jsinterp.c
 INTERP_OPTIMIZER = -O3 -fstrict-aliasing
 endif
 else
 ifeq ($(OS_ARCH),SunOS)
 MODULE_OPTIMIZE_FLAGS = -xO4
 endif
 ifeq ($(OS_ARCH),WINNT)
+ifdef WINCE
+# -GL is not supported on windows mobile while we are using the arm-wince-link command
+MODULE_OPTIMIZE_FLAGS = -O2
+else
 MODULE_OPTIMIZE_FLAGS = -O2 -GL
 endif
 endif
+endif
+
 
 ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
 LIBRARY_NAME	= js$(MOZ_BITS)$(VERSION_NUMBER)
 RESFILE		= js$(MOZ_BITS)40.res
 endif
 
 PACKAGE_FILE = js.pkg
 
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -189,32 +189,16 @@ 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 ========================================================
 
 if test "$COMPILE_ENVIRONMENT"; then
 
-dnl Do some special WinCE toolchain stuff
-case "$target" in
-*wince)
-    echo -----------------------------------------------------------------------------
-    echo Building Windows CE Shunt Library and Tool Chain
-    echo -----------------------------------------------------------------------------
-
-    ac_exeext=.exe
-
-    echo -n "#define TOPSRCDIR \"" > $srcdir/build/wince/tools/topsrcdir.h
-    echo `cd "$_topsrcdir" && pwd -W | tr '\n' '\"'` >> $srcdir/build/wince/tools/topsrcdir.h
-    make -C $srcdir/build/wince/tools
-    echo -----------------------------------------------------------------------------
-    ;;
-esac
-
 if test -n "$CROSS_COMPILE" && test "$target" != "$host"; then
     echo "cross compiling from $host to $target"
     cross_compiling=yes
 
     _SAVE_CC="$CC"
     _SAVE_CFLAGS="$CFLAGS"
     _SAVE_LDFLAGS="$LDFLAGS"
 
@@ -596,16 +580,22 @@ AC_PROG_CXXCPP
 if test -n "$_WIN32_MSVC"; then
     SKIP_PATH_CHECKS=1
     SKIP_COMPILER_CHECKS=1
     SKIP_LIBRARY_CHECKS=1
 fi
 
 fi # COMPILE_ENVIRONMENT
 
+if test "$cross_compiling"  = "yes"; then
+    CROSS_COMPILE=1
+else
+    CROSS_COMPILE=
+fi
+
 AC_SUBST(MIDL_FLAGS)
 AC_SUBST(_MSC_VER)
 
 AC_SUBST(GNU_AS)
 AC_SUBST(GNU_LD)
 AC_SUBST(GNU_CC)
 AC_SUBST(GNU_CXX)
 AC_SUBST(INTEL_CC)
@@ -1163,16 +1153,17 @@ SINIX-N | SINIX-Y | SINIX-Z |ReliantUNIX
     OS_ARCH=SINIX
     OS_TEST=`uname -p`
     ;;
 UnixWare)
     OS_ARCH=UNIXWARE
     OS_RELEASE=`uname -v`
     ;;
 WINCE)
+    WINCE=1
     OS_ARCH=WINCE
     OS_TARGET=WINCE
     ;;
 Darwin)
     case "${target_cpu}" in
     powerpc*)
         OS_TEST=ppc
         ;;
@@ -1861,16 +1852,17 @@ case "$target" in
     RANLIB='echo not_ranlib'
     STRIP='echo not_strip'
     TARGET_NSPR_MDCPUCFG='\"md/_wince.cfg\"'
     UNZIP=unzip
     XARGS=xargs
     XPCOM_FROZEN_LDOPTS='$(LIBXUL_DIST)/lib/xpcom.lib'
     ZIP=zip
 
+    AC_DEFINE(WINCE)
     AC_DEFINE(HAVE_SNPRINTF)
     AC_DEFINE(_WINDOWS)
     AC_DEFINE(_WIN32)
     AC_DEFINE(WIN32)
     AC_DEFINE(XP_WIN)
     AC_DEFINE(XP_WIN32)
     AC_DEFINE(HW_THREADS)
     AC_DEFINE(STDC_HEADERS)