changeset 767:8367e022762a cacao

2008-03-17 Gary Benson <gbenson@redhat.com> * platform_zero.in: New file. * ports/hotspot/build/linux/makefiles/zero.make: Likewise. * acinclude.m4 (SET_ARCH_DIRS): Added special case for arm. (ENABLE_ZERO_BUILD): Added new substitutions (ZERO_LIBARCH, ZERO_BITSPERWORD, ZERO_ENDIANNESS, ZERO_ARCHDEF and ZERO_ARCHFLAG) and new generated file (platform_zero). (SET_CORE_BUILD): Enable whenever zero is used. * Makefile.am (ZERO_PATCHES): New variable listing all zero patches. (EXTRA_DIST): Added ZERO_PATCHES. (ZERO_PATCHES_COND): New variable listing zero patches when used. (ICEDTEA_PATCHES): Grouped all zero patches into ZERO_PATCHES_COND, added icedtea-zero-build.patch and icedtea-static-libstdc++.patch, and removed icedtea-always-zero.patch. (stamps/ports.stamp, stamps/ports-ecj.stamp): Use platform_zero. (ICEDTEA_ENV, ICEDTEA_ENV_ECJ): Pass ZERO_* variables through. * Makefile.in, configure: Regenerated. * patches/icedtea-zero.patch: Split build system bits into... * patches/icedtea-zero-build.patch: New file. * patches/icedtea-hotspot7-ports.patch: Merged into icedtea-zero.patch. * patches/icedtea-ports.patch: Moved hotspot-specific bits into icedtea-zero.patch. * patches/icedtea-signature-iterator.patch: Rebased. * patches/icedtea-test-atomic-operations.patch: Likewise. * patches/icedtea-signed-types.patch: Likewise, and missing hunk reinstated. * patches/icedtea-text-relocations.patch: Base conditional on ZERO_LIBARCH rather than BUILDARCH. * patches/icedtea-always-zero.patch: Removed. * ports/hotspot/build/linux/makefiles/arm.make: Removed. * ports/hotspot/build/linux/makefiles/ia64.make: Likewise. * ports/hotspot/build/linux/makefiles/ppc.make: Likewise. * ports/hotspot/build/linux/makefiles/ppc64.make: Likewise. * ports/hotspot/build/linux/makefiles/s390.make: Likewise. * ports/hotspot/build/linux/makefiles/s390x.make: Likewise. * ports/hotspot/build/linux/platform_arm: Likewise. * ports/hotspot/build/linux/platform_ia64: Likewise. * ports/hotspot/build/linux/platform_ppc: Likewise. * ports/hotspot/build/linux/platform_ppc64: Likewise. * ports/hotspot/build/linux/platform_s390: Likewise. * ports/hotspot/build/linux/platform_s390x: Likewise. * .hgignore: Added platform_zero.
author Gary Benson <gbenson@redhat.com>
date Mon, 17 Mar 2008 07:03:05 -0400
parents 1c9616007376
children b96db45c4913
files .hgignore ChangeLog Makefile.am Makefile.in acinclude.m4 configure patches/icedtea-always-zero.patch patches/icedtea-hotspot7-ports.patch patches/icedtea-ports.patch patches/icedtea-signature-iterator.patch patches/icedtea-signed-types.patch patches/icedtea-test-atomic-operations.patch patches/icedtea-text-relocations.patch patches/icedtea-zero-build.patch patches/icedtea-zero.patch platform_zero.in ports/hotspot/build/linux/makefiles/arm.make ports/hotspot/build/linux/makefiles/ia64.make ports/hotspot/build/linux/makefiles/ppc.make ports/hotspot/build/linux/makefiles/ppc64.make ports/hotspot/build/linux/makefiles/s390.make ports/hotspot/build/linux/makefiles/s390x.make ports/hotspot/build/linux/makefiles/zero.make ports/hotspot/build/linux/platform_arm ports/hotspot/build/linux/platform_ia64 ports/hotspot/build/linux/platform_ppc ports/hotspot/build/linux/platform_ppc64 ports/hotspot/build/linux/platform_s390 ports/hotspot/build/linux/platform_s390x
diffstat 29 files changed, 1221 insertions(+), 911 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Fri Mar 14 09:47:37 2008 -0400
+++ b/.hgignore	Mon Mar 17 07:03:05 2008 -0400
@@ -19,6 +19,7 @@
 rt-source-files.txt
 hotspot-tools-source-files.txt
 tools-source-files.txt
+platform_zero
 rt/com/sun/jdi/AbsentInformationException.java
 rt/com/sun/jdi/Accessible.java
 rt/com/sun/jdi/ArrayReference.java
--- a/ChangeLog	Fri Mar 14 09:47:37 2008 -0400
+++ b/ChangeLog	Mon Mar 17 07:03:05 2008 -0400
@@ -1,3 +1,53 @@
+2008-03-17  Gary Benson  <gbenson@redhat.com>
+
+	* platform_zero.in: New file.
+	* ports/hotspot/build/linux/makefiles/zero.make: Likewise.
+
+	* acinclude.m4
+	(SET_ARCH_DIRS): Added special case for arm.
+	(ENABLE_ZERO_BUILD): Added new substitutions (ZERO_LIBARCH,
+	ZERO_BITSPERWORD, ZERO_ENDIANNESS, ZERO_ARCHDEF and ZERO_ARCHFLAG)
+	and new generated file (platform_zero).
+	(SET_CORE_BUILD): Enable whenever zero is used.
+	* Makefile.am
+	(ZERO_PATCHES): New variable listing all zero patches.
+	(EXTRA_DIST): Added ZERO_PATCHES.
+	(ZERO_PATCHES_COND): New variable listing zero patches when used.
+	(ICEDTEA_PATCHES): Grouped all zero patches into ZERO_PATCHES_COND,
+	added icedtea-zero-build.patch and icedtea-static-libstdc++.patch,
+	and removed icedtea-always-zero.patch.
+	(stamps/ports.stamp, stamps/ports-ecj.stamp): Use platform_zero.
+	(ICEDTEA_ENV, ICEDTEA_ENV_ECJ): Pass ZERO_* variables through.
+	* Makefile.in, configure: Regenerated.
+
+	* patches/icedtea-zero.patch: Split build system bits into...
+	* patches/icedtea-zero-build.patch: New file.
+	* patches/icedtea-hotspot7-ports.patch: Merged into icedtea-zero.patch.
+	* patches/icedtea-ports.patch: Moved hotspot-specific bits into
+	icedtea-zero.patch.
+	* patches/icedtea-signature-iterator.patch: Rebased.
+	* patches/icedtea-test-atomic-operations.patch: Likewise.
+	* patches/icedtea-signed-types.patch: Likewise, and missing
+	hunk reinstated.
+	* patches/icedtea-text-relocations.patch: Base conditional
+	on ZERO_LIBARCH rather than BUILDARCH.
+	* patches/icedtea-always-zero.patch: Removed.
+
+	* ports/hotspot/build/linux/makefiles/arm.make: Removed.
+	* ports/hotspot/build/linux/makefiles/ia64.make: Likewise.
+	* ports/hotspot/build/linux/makefiles/ppc.make: Likewise.
+	* ports/hotspot/build/linux/makefiles/ppc64.make: Likewise.
+	* ports/hotspot/build/linux/makefiles/s390.make: Likewise.
+	* ports/hotspot/build/linux/makefiles/s390x.make: Likewise.
+	* ports/hotspot/build/linux/platform_arm: Likewise.
+	* ports/hotspot/build/linux/platform_ia64: Likewise.
+	* ports/hotspot/build/linux/platform_ppc: Likewise.
+	* ports/hotspot/build/linux/platform_ppc64: Likewise.
+	* ports/hotspot/build/linux/platform_s390: Likewise.
+	* ports/hotspot/build/linux/platform_s390x: Likewise.
+
+	* .hgignore: Added platform_zero.
+	
 2008-03-14  Lillian Angel  <langel@redhat.com>
 
 	* .hgignore: Updated.
--- a/Makefile.am	Fri Mar 14 09:47:37 2008 -0400
+++ b/Makefile.am	Mon Mar 17 07:03:05 2008 -0400
@@ -40,12 +40,7 @@
 
 EXTRA_DIST = rt generated $(ICEDTEA_PATCHES) $(ICEDTEA_ECJ_PATCH) \
 	gcjwebplugin.cc patches/icedtea-speed.patch tools-copy contrib ports \
-	patches/icedtea-gcc-4.3.patch patches/icedtea-always-zero.patch extra \
-	patches/icedtea-hotspot-6b06-7b24.patch \
-        patches/icedtea-hotspot7-build-fixes.patch \
-        patches/icedtea-hotspot7-ports.patch \
-        patches/icedtea-bytecodeInterpreter.patch \
-        patches/icedtea-bytecodeInterpreterWithChecks.patch
+	patches/icedtea-gcc-4.3.patch extra $(ZERO_PATCHES)
 
 # The Binary plugs directory is called jdk1.7.0 for historical reasons. The
 # name is completely irrelevant; only contains the plugs to build IcedTea.
@@ -68,6 +63,11 @@
 else
   ICEDTEA_CORE_BUILD =
 endif
+if ZERO_BUILD
+  ICEDTEA_ZERO_BUILD = yes
+else
+  ICEDTEA_ZERO_BUILD =
+endif
 ICEDTEA_ENV = \
 	"ALT_JDK_IMPORT_PATH=$(ICEDTEA_BOOT_DIR)" \
 	"ANT_HOME=$(SYSTEM_ANT_DIR)" \
@@ -87,6 +87,12 @@
 	"CLASSPATH=" \
 	"LD_LIBRARY_PATH=" \
 	"ICEDTEA_CORE_BUILD=$(ICEDTEA_CORE_BUILD)" \
+	"ICEDTEA_ZERO_BUILD=$(ICEDTEA_ZERO_BUILD)" \
+	"ZERO_LIBARCH=$(ZERO_LIBARCH)" \
+	"ZERO_BITSPERWORD=$(ZERO_BITSPERWORD)" \
+	"ZERO_ENDIANNESS=$(ZERO_ENDIANNESS)" \
+	"ZERO_ARCHDEF=$(ZERO_ARCHDEF)" \
+	"ZERO_ARCHFLAG=$(ZERO_ARCHFLAG)" \
 	"LIBFFI_CFLAGS=$(LIBFFI_CFLAGS)" \
 	"LIBFFI_LIBS=$(LIBFFI_LIBS)" \
 	"FREETYPE2_HEADERS=$(FREETYPE2_CFLAGS)" \
@@ -131,6 +137,12 @@
 	"LD_LIBRARY_PATH=" \
 	"GENSRCDIR=$(abs_top_srcdir)/generated" \
 	"ICEDTEA_CORE_BUILD=$(ICEDTEA_CORE_BUILD)" \
+	"ICEDTEA_ZERO_BUILD=$(ICEDTEA_ZERO_BUILD)" \
+	"ZERO_LIBARCH=$(ZERO_LIBARCH)" \
+	"ZERO_BITSPERWORD=$(ZERO_BITSPERWORD)" \
+	"ZERO_ENDIANNESS=$(ZERO_ENDIANNESS)" \
+	"ZERO_ARCHDEF=$(ZERO_ARCHDEF)" \
+	"ZERO_ARCHFLAG=$(ZERO_ARCHFLAG)" \
 	"LIBFFI_CFLAGS=$(LIBFFI_CFLAGS)" \
 	"LIBFFI_LIBS=$(LIBFFI_LIBS)" \
 	"FREETYPE2_HEADERS=$(FREETYPE2_CFLAGS)" \
@@ -180,13 +192,13 @@
 
 # Link ports sources into tree
 stamps/ports.stamp: stamps/extract.stamp
-	for target in ports/hotspot/build/*/platform_* \
-		      ports/hotspot/build/*/makefiles/* \
+	for target in ports/hotspot/build/*/makefiles/* \
 		      ports/hotspot/src/*/* \
 		      ports/jdk/src/*/bin/*; do \
 	  link=$$(dirname $$target | sed 's/^ports/openjdk/'); \
 	  ln -sf $$PWD/$$target $$link; \
 	done
+	ln -sf $$PWD/platform_zero openjdk/hotspot/build/linux
 	mkdir -p stamps
 	touch stamps/ports.stamp
 
@@ -197,13 +209,6 @@
   FAST_BUILD_PATCH =
 endif
 
-# If --enable-zero was passed then patch the build files
-if ZERO_BUILD
-  ZERO_BUILD_PATCH = patches/icedtea-always-zero.patch
-else
-  ZERO_BUILD_PATCH =
-endif
-
 # If new gcc is installed, apply 4.3 patch
 if GCC_OLD
   GCC_PATCH =
@@ -211,21 +216,26 @@
   GCC_PATCH = patches/icedtea-gcc-4.3.patch
 endif
 
-# If CORE_BUILD is set then we are building zero and need
+# If ZERO_BUILD is set then we are building zero and need
 # to patch up to OpenJDK 7 HotSpot for the C++ interpreter.
-if CORE_BUILD
-  HOTSPOT_7_PATCHES = \
+ZERO_PATCHES = \
 	patches/icedtea-hotspot-6b06-7b24.patch \
 	patches/icedtea-hotspot7-build-fixes.patch \
-	patches/icedtea-hotspot7-ports.patch \
 	patches/icedtea-bytecodeInterpreter.patch \
-	patches/icedtea-bytecodeInterpreterWithChecks.patch
+	patches/icedtea-bytecodeInterpreterWithChecks.patch \
+	patches/icedtea-signature-iterator.patch \
+	patches/icedtea-signed-types.patch \
+	patches/icedtea-test-atomic-operations.patch \
+	patches/icedtea-zero.patch
+
+if ZERO_BUILD
+  ZERO_PATCHES_COND = $(ZERO_PATCHES)
 else
-  HOTSPOT_7_PATCHES = 
+  ZERO_PATCHES_COND = 
 endif
 
 ICEDTEA_PATCHES = \
-	$(HOTSPOT_7_PATCHES) \
+	$(ZERO_PATCHES_COND) \
 	patches/icedtea-copy-plugs.patch \
 	patches/icedtea-version.patch \
 	patches/icedtea-text-relocations.patch \
@@ -251,22 +261,19 @@
 	patches/icedtea-libraries.patch \
 	patches/icedtea-javafiles.patch \
 	patches/icedtea-corba.patch \
-	patches/icedtea-signature-iterator.patch \
-	patches/icedtea-signed-types.patch \
-	patches/icedtea-test-atomic-operations.patch \
 	patches/icedtea-core-build.patch \
 	patches/icedtea-linker-options.patch \
 	patches/icedtea-ports.patch \
+	patches/icedtea-static-libstdc++.patch \
 	patches/icedtea-lcms-leak.patch \
 	patches/icedtea-timerqueue.patch \
 	patches/icedtea-lesstif-64.patch \
 	patches/icedtea-generated.patch \
 	patches/icedtea-lib64.patch \
-	patches/icedtea-zero.patch \
+	patches/icedtea-zero-build.patch \
 	patches/icedtea-print-lsb-release.patch \
 	$(GCC_PATCH) \
 	$(FAST_BUILD_PATCH) \
-	$(ZERO_BUILD_PATCH) \
 	$(DISTRIBUTION_PATCHES)
 
 if WITH_CACAO
@@ -345,13 +352,13 @@
 
 # Link ports sources into tree
 stamps/ports-ecj.stamp: stamps/extract-ecj.stamp
-	for target in ports/hotspot/build/*/platform_* \
-		      ports/hotspot/build/*/makefiles/* \
+	for target in ports/hotspot/build/*/makefiles/* \
 		      ports/hotspot/src/*/* \
 		      ports/jdk/src/*/bin/*; do \
 	  link=$$(dirname $$target | sed 's/^ports/openjdk-ecj/'); \
 	  ln -sf $$PWD/$$target $$link; \
 	done
+	ln -sf $$PWD/platform_zero openjdk-ecj/hotspot/build/linux
 	mkdir -p stamps
 	touch stamps/ports-ecj.stamp
 
--- a/Makefile.in	Fri Mar 14 09:47:37 2008 -0400
+++ b/Makefile.in	Mon Mar 17 07:03:05 2008 -0400
@@ -43,8 +43,9 @@
 subdir = .
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in $(srcdir)/javac.in $(srcdir)/javap.in \
-	$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
-	config.guess config.sub install-sh missing
+	$(srcdir)/platform_zero.in $(top_srcdir)/configure AUTHORS \
+	COPYING ChangeLog INSTALL NEWS config.guess config.sub \
+	install-sh missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
 	$(top_srcdir)/configure.ac
@@ -53,7 +54,7 @@
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(install_sh) -d
-CONFIG_CLEAN_FILES = javac javap
+CONFIG_CLEAN_FILES = javac javap platform_zero
 SOURCES =
 DIST_SOURCES =
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -170,6 +171,11 @@
 XTST_LIBS = @XTST_LIBS@
 XT_CFLAGS = @XT_CFLAGS@
 XT_LIBS = @XT_LIBS@
+ZERO_ARCHDEF = @ZERO_ARCHDEF@
+ZERO_ARCHFLAG = @ZERO_ARCHFLAG@
+ZERO_BITSPERWORD = @ZERO_BITSPERWORD@
+ZERO_ENDIANNESS = @ZERO_ENDIANNESS@
+ZERO_LIBARCH = @ZERO_LIBARCH@
 ZIP = @ZIP@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
@@ -229,12 +235,7 @@
 @NETX_PLUGIN_TRUE@NETX_PATCH = patches/icedtea-netx-plugin.patch
 EXTRA_DIST = rt generated $(ICEDTEA_PATCHES) $(ICEDTEA_ECJ_PATCH) \
 	gcjwebplugin.cc patches/icedtea-speed.patch tools-copy contrib ports \
-	patches/icedtea-gcc-4.3.patch patches/icedtea-always-zero.patch extra \
-	patches/icedtea-hotspot-6b06-7b24.patch \
-        patches/icedtea-hotspot7-build-fixes.patch \
-        patches/icedtea-hotspot7-ports.patch \
-        patches/icedtea-bytecodeInterpreter.patch \
-        patches/icedtea-bytecodeInterpreterWithChecks.patch
+	patches/icedtea-gcc-4.3.patch extra $(ZERO_PATCHES)
 
 
 # The Binary plugs directory is called jdk1.7.0 for historical reasons. The
@@ -425,6 +426,8 @@
 	cd $(top_builddir) && $(SHELL) ./config.status $@
 javap: $(top_builddir)/config.status $(srcdir)/javap.in
 	cd $(top_builddir) && $(SHELL) ./config.status $@
+platform_zero: $(top_builddir)/config.status $(srcdir)/platform_zero.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
 tags: TAGS
 TAGS:
 
@@ -716,13 +719,13 @@
 
 # Link ports sources into tree
 stamps/ports.stamp: stamps/extract.stamp
-	for target in ports/hotspot/build/*/platform_* \
-		      ports/hotspot/build/*/makefiles/* \
+	for target in ports/hotspot/build/*/makefiles/* \
 		      ports/hotspot/src/*/* \
 		      ports/jdk/src/*/bin/*; do \
 	  link=$$(dirname $$target | sed 's/^ports/openjdk/'); \
 	  ln -sf $$PWD/$$target $$link; \
 	done
+	ln -sf $$PWD/platform_zero openjdk/hotspot/build/linux
 	mkdir -p stamps
 	touch stamps/ports.stamp
 
@@ -796,13 +799,13 @@
 
 # Link ports sources into tree
 stamps/ports-ecj.stamp: stamps/extract-ecj.stamp
-	for target in ports/hotspot/build/*/platform_* \
-		      ports/hotspot/build/*/makefiles/* \
+	for target in ports/hotspot/build/*/makefiles/* \
 		      ports/hotspot/src/*/* \
 		      ports/jdk/src/*/bin/*; do \
 	  link=$$(dirname $$target | sed 's/^ports/openjdk-ecj/'); \
 	  ln -sf $$PWD/$$target $$link; \
 	done
+	ln -sf $$PWD/platform_zero openjdk-ecj/hotspot/build/linux
 	mkdir -p stamps
 	touch stamps/ports-ecj.stamp
 
--- a/acinclude.m4	Fri Mar 14 09:47:37 2008 -0400
+++ b/acinclude.m4	Mon Mar 17 07:03:05 2008 -0400
@@ -9,6 +9,10 @@
       BUILD_ARCH_DIR=i586
       INSTALL_ARCH_DIR=i386
       ;;
+    arm*-*-*)
+      BUILD_ARCH_DIR=arm
+      INSTALL_ARCH_DIR=arm
+      ;;
     *)
       BUILD_ARCH_DIR=`uname -m`
       INSTALL_ARCH_DIR=$BUILD_ARCH_DIR
@@ -511,31 +515,82 @@
 
 AC_DEFUN([ENABLE_ZERO_BUILD],
 [
+  AC_MSG_CHECKING(whether to use the zero-assembler port)
+  use_zero=no
   AC_ARG_ENABLE([zero],
-                [AS_HELP_STRING(--enable-zero,use zero-assembler port on non-zero platforms)],
+                [AS_HELP_STRING(--enable-zero,
+                               use zero-assembler port on non-zero platforms)],
   [
-    AC_MSG_CHECKING(zero-assembler port)
-    AC_MSG_RESULT(will apply patches/icedtea-always-zero.patch)
-    AM_CONDITIONAL(ZERO_BUILD, test x = x)
+    use_zero=yes
   ],
   [
-    AM_CONDITIONAL(ZERO_BUILD, test x != x)
+    case "${host}" in
+      i?86-*-*) ;;
+      x86_64-*-*) ;;
+      *)
+        use_zero=yes
+    esac
   ])
+  AC_MSG_RESULT($use_zero)
+  AM_CONDITIONAL(ZERO_BUILD, test "x${use_zero}" = xyes)
+
+  ZERO_LIBARCH=
+  ZERO_BITSPERWORD=
+  ZERO_ENDIANNESS=
+  ZERO_ARCHDEF=
+  ZERO_ARCHFLAG=
+  if test "x${use_zero}" = xyes; then
+    ZERO_LIBARCH="${INSTALL_ARCH_DIR}"
+    dnl can't use AC_CHECK_SIZEOF on multilib
+    case "${ZERO_LIBARCH}" in
+      i386|ppc|s390)
+        ZERO_BITSPERWORD=32
+        ;;
+      amd64|ppc64|s390x)
+        ZERO_BITSPERWORD=64
+        ;;
+      *)
+        AC_CHECK_SIZEOF(void *)
+        ZERO_BITSPERWORD=`expr "${ac_cv_sizeof_void_p}" "*" 8`
+    esac
+    AC_C_BIGENDIAN([ZERO_ENDIANNESS="big"], [ZERO_ENDIANNESS="little"])
+    case "${ZERO_LIBARCH}" in
+      i386)
+        ZERO_ARCHDEF="IA32"
+        ;;
+      ppc*)
+        ZERO_ARCHDEF="PPC"
+        ;;
+      s390*)
+        ZERO_ARCHDEF="S390"
+        ;;
+      *)
+        ZERO_ARCHDEF=`echo ${ZERO_LIBARCH} | tr a-z A-Z`
+    esac
+    dnl multilib machines need telling which mode to build for
+    case "${ZERO_LIBARCH}" in
+      i386|ppc)
+        ZERO_ARCHFLAG="-m32"
+        ;;
+      s390)
+        ZERO_ARCHFLAG="-m31"
+        ;;
+      amd64|ppc64|s390x)
+        ZERO_ARCHFLAG="-m64"
+        ;;
+    esac
+    AC_CONFIG_FILES([platform_zero])
+  fi
+  AC_SUBST(ZERO_LIBARCH)
+  AC_SUBST(ZERO_BITSPERWORD)
+  AC_SUBST(ZERO_ENDIANNESS)
+  AC_SUBST(ZERO_ARCHDEF)
+  AC_SUBST(ZERO_ARCHFLAG)
 ])
 
 AC_DEFUN([SET_CORE_BUILD],
 [
-  if test "x${ZERO_BUILD_TRUE}" = x; then
-    AM_CONDITIONAL(CORE_BUILD, test x = x)
-  else
-    if test -f "ports/hotspot/build/linux/platform_${BUILD_ARCH_DIR}" && \
-       grep -q "arch.*=.*zero" "ports/hotspot/build/linux/platform_${BUILD_ARCH_DIR}"
-    then
-      AM_CONDITIONAL(CORE_BUILD, test x = x)
-    else
-      AM_CONDITIONAL(CORE_BUILD, test x != x)
-    fi
-  fi
+  AM_CONDITIONAL(CORE_BUILD, test "x${ZERO_BUILD_TRUE}" = x)
 ])
 
 AC_DEFUN([ENABLE_NETX_PLUGIN],
--- a/configure	Fri Mar 14 09:47:37 2008 -0400
+++ b/configure	Mon Mar 17 07:03:05 2008 -0400
@@ -752,13 +752,18 @@
 FAST_BUILD_FALSE
 ZERO_BUILD_TRUE
 ZERO_BUILD_FALSE
+CPP
+GREP
+EGREP
+ZERO_LIBARCH
+ZERO_BITSPERWORD
+ZERO_ENDIANNESS
+ZERO_ARCHDEF
+ZERO_ARCHFLAG
 NETX_PLUGIN_TRUE
 NETX_PLUGIN_FALSE
 CORE_BUILD_TRUE
 CORE_BUILD_FALSE
-CPP
-GREP
-EGREP
 PKG_CONFIG
 XPROTO_CFLAGS
 XPROTO_LIBS
@@ -5376,6 +5381,10 @@
       BUILD_ARCH_DIR=i586
       INSTALL_ARCH_DIR=i386
       ;;
+    arm*-*-*)
+      BUILD_ARCH_DIR=arm
+      INSTALL_ARCH_DIR=arm
+      ;;
     *)
       BUILD_ARCH_DIR=`uname -m`
       INSTALL_ARCH_DIR=$BUILD_ARCH_DIR
@@ -7402,103 +7411,6 @@
 
 
 
-  # Check whether --enable-zero was given.
-if test "${enable_zero+set}" = set; then
-  enableval=$enable_zero;
-    { echo "$as_me:$LINENO: checking zero-assembler port" >&5
-echo $ECHO_N "checking zero-assembler port... $ECHO_C" >&6; }
-    { echo "$as_me:$LINENO: result: will apply patches/icedtea-always-zero.patch" >&5
-echo "${ECHO_T}will apply patches/icedtea-always-zero.patch" >&6; }
-     if test x = x; then
-  ZERO_BUILD_TRUE=
-  ZERO_BUILD_FALSE='#'
-else
-  ZERO_BUILD_TRUE='#'
-  ZERO_BUILD_FALSE=
-fi
-
-
-else
-
-     if test x != x; then
-  ZERO_BUILD_TRUE=
-  ZERO_BUILD_FALSE='#'
-else
-  ZERO_BUILD_TRUE='#'
-  ZERO_BUILD_FALSE=
-fi
-
-
-fi
-
-
-
-  # Check whether --enable-netx-plugin was given.
-if test "${enable_netx_plugin+set}" = set; then
-  enableval=$enable_netx_plugin;
-    { echo "$as_me:$LINENO: checking netx plugin" >&5
-echo $ECHO_N "checking netx plugin... $ECHO_C" >&6; }
-    { echo "$as_me:$LINENO: result: will enable netx plugin" >&5
-echo "${ECHO_T}will enable netx plugin" >&6; }
-     if test x = x; then
-  NETX_PLUGIN_TRUE=
-  NETX_PLUGIN_FALSE='#'
-else
-  NETX_PLUGIN_TRUE='#'
-  NETX_PLUGIN_FALSE=
-fi
-
-
-else
-
-     if test x != x; then
-  NETX_PLUGIN_TRUE=
-  NETX_PLUGIN_FALSE='#'
-else
-  NETX_PLUGIN_TRUE='#'
-  NETX_PLUGIN_FALSE=
-fi
-
-
-fi
-
-
-
-  if test "x${ZERO_BUILD_TRUE}" = x; then
-     if test x = x; then
-  CORE_BUILD_TRUE=
-  CORE_BUILD_FALSE='#'
-else
-  CORE_BUILD_TRUE='#'
-  CORE_BUILD_FALSE=
-fi
-
-  else
-    if test -f "ports/hotspot/build/linux/platform_${BUILD_ARCH_DIR}" && \
-       grep -q "arch.*=.*zero" "ports/hotspot/build/linux/platform_${BUILD_ARCH_DIR}"
-    then
-       if test x = x; then
-  CORE_BUILD_TRUE=
-  CORE_BUILD_FALSE='#'
-else
-  CORE_BUILD_TRUE='#'
-  CORE_BUILD_FALSE=
-fi
-
-    else
-       if test x != x; then
-  CORE_BUILD_TRUE=
-  CORE_BUILD_FALSE='#'
-else
-  CORE_BUILD_TRUE='#'
-  CORE_BUILD_FALSE=
-fi
-
-    fi
-  fi
-
-
-
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -8136,6 +8048,766 @@
 
 
 
+  { echo "$as_me:$LINENO: checking whether to use the zero-assembler port" >&5
+echo $ECHO_N "checking whether to use the zero-assembler port... $ECHO_C" >&6; }
+  use_zero=no
+  # Check whether --enable-zero was given.
+if test "${enable_zero+set}" = set; then
+  enableval=$enable_zero;
+    use_zero=yes
+
+else
+
+    case "${host}" in
+      i?86-*-*) ;;
+      x86_64-*-*) ;;
+      *)
+        use_zero=yes
+    esac
+
+fi
+
+  { echo "$as_me:$LINENO: result: $use_zero" >&5
+echo "${ECHO_T}$use_zero" >&6; }
+   if test "x${use_zero}" = xyes; then
+  ZERO_BUILD_TRUE=
+  ZERO_BUILD_FALSE='#'
+else
+  ZERO_BUILD_TRUE='#'
+  ZERO_BUILD_FALSE=
+fi
+
+
+  ZERO_LIBARCH=
+  ZERO_BITSPERWORD=
+  ZERO_ENDIANNESS=
+  ZERO_ARCHDEF=
+  ZERO_ARCHFLAG=
+  if test "x${use_zero}" = xyes; then
+    ZERO_LIBARCH="${INSTALL_ARCH_DIR}"
+        case "${ZERO_LIBARCH}" in
+      i386|ppc|s390)
+        ZERO_BITSPERWORD=32
+        ;;
+      amd64|ppc64|s390x)
+        ZERO_BITSPERWORD=64
+        ;;
+      *)
+        { echo "$as_me:$LINENO: checking for void *" >&5
+echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
+if test "${ac_cv_type_void_p+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+typedef void * ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+  return 0;
+if (sizeof (ac__type_new_))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_type_void_p=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_type_void_p=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
+echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ echo "$as_me:$LINENO: checking size of void *" >&5
+echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
+if test "${ac_cv_sizeof_void_p+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef void * ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef void * ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_lo=`expr $ac_mid + 1`
+			if test $ac_lo -le $ac_mid; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef void * ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef void * ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_hi=`expr '(' $ac_mid ')' - 1`
+			if test $ac_mid -le $ac_hi; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef void * ac__type_sizeof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_void_p=$ac_lo;;
+'') if test "$ac_cv_type_void_p" = yes; then
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (void *)
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+   else
+     ac_cv_sizeof_void_p=0
+   fi ;;
+esac
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+   typedef void * ac__type_sizeof_;
+static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
+static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if (((long int) (sizeof (ac__type_sizeof_))) < 0)
+    {
+      long int i = longval ();
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
+	return 1;
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != ((long int) (sizeof (ac__type_sizeof_))))
+	return 1;
+      fprintf (f, "%lu\n", i);
+    }
+  return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sizeof_void_p=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+if test "$ac_cv_type_void_p" = yes; then
+     { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (void *)
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+   else
+     ac_cv_sizeof_void_p=0
+   fi
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
+echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
+_ACEOF
+
+
+        ZERO_BITSPERWORD=`expr "${ac_cv_sizeof_void_p}" "*" 8`
+    esac
+    { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
+if test "${ac_cv_c_bigendian+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # See if sys/param.h defines the BYTE_ORDER macro.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if  ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
+	&& BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
+ bogus endian macros
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_c_bigendian=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_c_bigendian=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	# It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+  # try to guess the endianness by grepping values into an object file
+  ac_cv_c_bigendian=unknown
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+  ac_cv_c_bigendian=yes
+fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+  if test "$ac_cv_c_bigendian" = unknown; then
+    ac_cv_c_bigendian=no
+  else
+    # finding both strings is unlikely to happen, but who knows?
+    ac_cv_c_bigendian=unknown
+  fi
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+
+  /* Are we little or big endian?  From Harbison&Steele.  */
+  union
+  {
+    long int l;
+    char c[sizeof (long int)];
+  } u;
+  u.l = 1;
+  return u.c[sizeof (long int) - 1] == 1;
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_bigendian=no
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
+case $ac_cv_c_bigendian in
+  yes)
+    ZERO_ENDIANNESS="big" ;;
+  no)
+    ZERO_ENDIANNESS="little" ;;
+  *)
+    { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+
+    case "${ZERO_LIBARCH}" in
+      i386)
+        ZERO_ARCHDEF="IA32"
+        ;;
+      ppc*)
+        ZERO_ARCHDEF="PPC"
+        ;;
+      s390*)
+        ZERO_ARCHDEF="S390"
+        ;;
+      *)
+        ZERO_ARCHDEF=`echo ${ZERO_LIBARCH} | tr a-z A-Z`
+    esac
+        case "${ZERO_LIBARCH}" in
+      i386|ppc)
+        ZERO_ARCHFLAG="-m32"
+        ;;
+      s390)
+        ZERO_ARCHFLAG="-m31"
+        ;;
+      amd64|ppc64|s390x)
+        ZERO_ARCHFLAG="-m64"
+        ;;
+    esac
+    ac_config_files="$ac_config_files platform_zero"
+
+  fi
+
+
+
+
+
+
+
+  # Check whether --enable-netx-plugin was given.
+if test "${enable_netx_plugin+set}" = set; then
+  enableval=$enable_netx_plugin;
+    { echo "$as_me:$LINENO: checking netx plugin" >&5
+echo $ECHO_N "checking netx plugin... $ECHO_C" >&6; }
+    { echo "$as_me:$LINENO: result: will enable netx plugin" >&5
+echo "${ECHO_T}will enable netx plugin" >&6; }
+     if test x = x; then
+  NETX_PLUGIN_TRUE=
+  NETX_PLUGIN_FALSE='#'
+else
+  NETX_PLUGIN_TRUE='#'
+  NETX_PLUGIN_FALSE=
+fi
+
+
+else
+
+     if test x != x; then
+  NETX_PLUGIN_TRUE=
+  NETX_PLUGIN_FALSE='#'
+else
+  NETX_PLUGIN_TRUE='#'
+  NETX_PLUGIN_FALSE=
+fi
+
+
+fi
+
+
+
+   if test "x${ZERO_BUILD_TRUE}" = x; then
+  CORE_BUILD_TRUE=
+  CORE_BUILD_FALSE='#'
+else
+  CORE_BUILD_TRUE='#'
+  CORE_BUILD_FALSE=
+fi
+
+
+
+
 
 for ac_header in cups/cups.h cups/ppd.h
 do
@@ -10966,13 +11638,6 @@
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
-if test -z "${ZERO_BUILD_TRUE}" && test -z "${ZERO_BUILD_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"ZERO_BUILD\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"ZERO_BUILD\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
 if test -z "${NETX_PLUGIN_TRUE}" && test -z "${NETX_PLUGIN_FALSE}"; then
   { { echo "$as_me:$LINENO: error: conditional \"NETX_PLUGIN\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
@@ -11478,6 +12143,7 @@
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
     "javac") CONFIG_FILES="$CONFIG_FILES javac" ;;
     "javap") CONFIG_FILES="$CONFIG_FILES javap" ;;
+    "platform_zero") CONFIG_FILES="$CONFIG_FILES platform_zero" ;;
 
   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@@ -11717,13 +12383,18 @@
 FAST_BUILD_FALSE!$FAST_BUILD_FALSE$ac_delim
 ZERO_BUILD_TRUE!$ZERO_BUILD_TRUE$ac_delim
 ZERO_BUILD_FALSE!$ZERO_BUILD_FALSE$ac_delim
+CPP!$CPP$ac_delim
+GREP!$GREP$ac_delim
+EGREP!$EGREP$ac_delim
+ZERO_LIBARCH!$ZERO_LIBARCH$ac_delim
+ZERO_BITSPERWORD!$ZERO_BITSPERWORD$ac_delim
+ZERO_ENDIANNESS!$ZERO_ENDIANNESS$ac_delim
+ZERO_ARCHDEF!$ZERO_ARCHDEF$ac_delim
+ZERO_ARCHFLAG!$ZERO_ARCHFLAG$ac_delim
 NETX_PLUGIN_TRUE!$NETX_PLUGIN_TRUE$ac_delim
 NETX_PLUGIN_FALSE!$NETX_PLUGIN_FALSE$ac_delim
 CORE_BUILD_TRUE!$CORE_BUILD_TRUE$ac_delim
 CORE_BUILD_FALSE!$CORE_BUILD_FALSE$ac_delim
-CPP!$CPP$ac_delim
-GREP!$GREP$ac_delim
-EGREP!$EGREP$ac_delim
 PKG_CONFIG!$PKG_CONFIG$ac_delim
 XPROTO_CFLAGS!$XPROTO_CFLAGS$ac_delim
 XPROTO_LIBS!$XPROTO_LIBS$ac_delim
@@ -11755,7 +12426,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 73; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 78; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -12077,7 +12748,7 @@
   # each Makefile.in and add a new line on top of each file to say so.
   # Grep'ing the whole file is not good either: AIX grep has a line
   # limit of 2048, but all sed's we know have understand at least 4000.
-  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+  if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
     dirpart=`$as_dirname -- "$mf" ||
 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
 	 X"$mf" : 'X\(//\)[^/]' \| \
--- a/patches/icedtea-always-zero.patch	Fri Mar 14 09:47:37 2008 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
---- defs.make	2008-02-17 16:25:58.000000000 -0500
-+++ openjdk/hotspot/make/defs.make	2008-02-17 16:27:04.000000000 -0500
-@@ -213,6 +213,7 @@
-       SRCARCH = amd64
-     endif
-   endif
-+SCARCH = zero
- 
-   # BUILDARCH is usually the same as SRCARCH, except for sparcv9 and zero
-   BUILDARCH = $(SRCARCH)
---- oldopenjdk6/hotspot/build/linux/platform_amd64	2008-02-12 04:14:13.000000000 -0500
-+++ openjdk/hotspot/build/linux/platform_amd64	2008-02-17 16:28:12.000000000 -0500
-@@ -1,8 +1,8 @@
- os_family = linux
- 
--arch = amd64
-+arch = zero
- 
--os_arch = linux_amd64
-+os_arch = linux_zero
- 
- lib_arch = amd64
- 
-@@ -10,4 +10,4 @@
- 
- gnu_dis_arch = amd64
- 
--sysdefs = -DLINUX -D_GNU_SOURCE -DAMD64
-+sysdefs = -DLINUX -D_GNU_SOURCE -DAMD64 -DCC_INTERP -DZERO
---- oldopenjdk6/hotspot/build/linux/platform_i486	2008-02-12 04:14:13.000000000 -0500
-+++ openjdk/hotspot/build/linux/platform_i486	2008-02-17 16:29:59.000000000 -0500
-@@ -1,8 +1,8 @@
- os_family = linux
- 
--arch = i486
-+arch = zero
- 
--os_arch = linux_i486
-+os_arch = linux_zero
- 
- lib_arch = i386
- 
-@@ -10,4 +10,4 @@
- 
- gnu_dis_arch = i386
- 
--sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
-+sysdefs = -DLINUX -D_GNU_SOURCE -DIA32 -DCC_INTERP -DZERO
---- defs.make	2008-02-17 16:30:44.000000000 -0500
-+++ openjdk/hotspot/build/linux/makefiles/defs.make	2008-02-17 16:31:36.000000000 -0500
-@@ -68,12 +68,12 @@
-     MAKE_ARGS       += LP64=1
-     PLATFORM        = linux-amd64
-     VM_PLATFORM     = linux_amd64
--    HS_ARCH         = amd64
-+    HS_ARCH         = zero
-   else
-     ARCH_DATA_MODEL = 32
-     PLATFORM        = linux-i586
-     VM_PLATFORM     = linux_i486
--    HS_ARCH         = i486
-+    HS_ARCH         = zero
-     # We have to reset ARCH to i686 since SRCARCH relies on it
-     ARCH            = i686   
-   endif
-@@ -84,7 +84,7 @@
-   ARCH_DATA_MODEL  = 32
-   PLATFORM         = linux-i586
-   VM_PLATFORM      = linux_i486
--  HS_ARCH          = i486
-+  HS_ARCH          = zero
- endif
- 
- # ppc
---- amd64.make	2008-02-17 16:32:11.000000000 -0500
-+++ openjdk/hotspot/build/linux/makefiles/amd64.make	2008-02-17 16:32:16.000000000 -0500
-@@ -22,9 +22,6 @@
- #  
- #
- 
--# Not included in includeDB because it has no dependencies
--Obj_Files += linux_amd64.o
--
- # The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
- OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
- # The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
---- i486.make	2008-02-17 16:32:53.000000000 -0500
-+++ openjdk/hotspot/build/linux/makefiles/i486.make	2008-02-17 16:32:58.000000000 -0500
-@@ -22,9 +22,6 @@
- #  
- #
- 
--# TLS helper, assembled from .s file
--# Not included in includeDB because it has no dependencies
--Obj_Files += linux_i486.o
- 
- # The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
- OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
---- jvm.cfg	2008-02-17 16:34:15.000000000 -0500
-+++ openjdk/jdk/src/solaris/bin/amd64/jvm.cfg	2008-02-17 16:34:47.000000000 -0500
-@@ -31,8 +31,9 @@
- # "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
- # and may not be available in a future release.
- #
---server KNOWN
-+-core KNOWN
- -client IGNORE
-+-server IGNORE
- -hotspot ERROR
- -classic WARN
- -native ERROR
---- oldopenjdk6/jdk/src/solaris/bin/i586/jvm.cfg	2008-02-12 04:08:27.000000000 -0500
-+++ openjdk/jdk/src/solaris/bin/i586/jvm.cfg	2008-02-17 16:35:54.000000000 -0500
-@@ -30,9 +30,10 @@
- # "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
- # and may not be available in a future release.
- #
---client IF_SERVER_CLASS -server
---server KNOWN
---hotspot ALIASED_TO -client
-+-core KNOWN
-+-client IGNORE
-+-server IGNORE
-+-hotspot ERROR
- -classic WARN
- -native ERROR
- -green ERROR
--- a/patches/icedtea-hotspot7-ports.patch	Fri Mar 14 09:47:37 2008 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-diff -ru openjdk.orig/hotspot/src/share/vm/runtime/mutex.hpp openjdk/hotspot/src/share/vm/runtime/mutex.hpp
---- openjdk.orig/hotspot/src/share/vm/runtime/mutex.hpp	2007-11-08 11:34:54.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/mutex.hpp	2007-11-08 11:36:15.000000000 +0000
-@@ -61,18 +61,10 @@ union SplitWord {   // full-word with se
- } ;
- 
- // Endian-ness ... index of least-significant byte in SplitWord.Bytes[]
--#ifdef AMD64        // little
-+#ifdef VM_LITTLE_ENDIAN
-  #define _LSBINDEX 0
- #else
--#if IA32            // little
-- #define _LSBINDEX 0
--#else
--#ifdef SPARC        // big
-  #define _LSBINDEX (sizeof(intptr_t)-1)
--#else
-- #error "unknown architecture"
--#endif
--#endif
- #endif
- 
- class ParkEvent ;
--- a/patches/icedtea-ports.patch	Fri Mar 14 09:47:37 2008 -0400
+++ b/patches/icedtea-ports.patch	Mon Mar 17 07:03:05 2008 -0400
@@ -1,225 +1,3 @@
-diff -ru openjdk.orig/hotspot/build/linux/makefiles/buildtree.make openjdk/hotspot/build/linux/makefiles/buildtree.make
---- openjdk.orig/hotspot/build/linux/makefiles/buildtree.make	2007-11-08 11:34:54.000000000 +0000
-+++ openjdk/hotspot/build/linux/makefiles/buildtree.make	2007-11-08 11:36:15.000000000 +0000
-@@ -277,6 +277,8 @@
- DATA_MODE/sparcv9 = 64
- DATA_MODE/amd64   = 64
- DATA_MODE/ia64    = 64
-+DATA_MODE/ppc     = 32
-+DATA_MODE/ppc64   = 64
- 
- JAVA_FLAG/32 = -d32
- JAVA_FLAG/64 = -d64
-diff -ru openjdk.orig/hotspot/build/linux/makefiles/defs.make openjdk/hotspot/build/linux/makefiles/defs.make
---- openjdk.orig/hotspot/build/linux/makefiles/defs.make	2007-11-08 11:34:54.000000000 +0000
-+++ openjdk/hotspot/build/linux/makefiles/defs.make	2007-11-08 11:36:15.000000000 +0000
-@@ -87,6 +87,23 @@
-   HS_ARCH          = i486
- endif
- 
-+# ppc
-+ifeq ($(ARCH), ppc)
-+  ARCH_DATA_MODEL  = 32
-+  PLATFORM         = linux-ppc
-+  VM_PLATFORM      = linux_ppc
-+  HS_ARCH          = zero
-+endif
-+
-+# ppc64
-+ifeq ($(ARCH), ppc64)
-+  ARCH_DATA_MODEL  = 64
-+  MAKE_ARGS        += LP64=1
-+  PLATFORM         = linux-ppc64
-+  VM_PLATFORM      = linux_ppc64
-+  HS_ARCH          = zero
-+endif
-+
- JDK_INCLUDE_SUBDIR=linux
- 
- # FIXUP: The subdirectory for a debug build is NOT the same on all platforms
-diff -ru openjdk.orig/hotspot/build/linux/makefiles/gcc.make openjdk/hotspot/build/linux/makefiles/gcc.make
---- openjdk.orig/hotspot/build/linux/makefiles/gcc.make	2007-11-08 11:34:54.000000000 +0000
-+++ openjdk/hotspot/build/linux/makefiles/gcc.make	2007-11-08 11:36:15.000000000 +0000
-@@ -73,6 +73,8 @@
- ARCHFLAG/ia64    =
- ARCHFLAG/sparc   = -m32 -mcpu=v9
- ARCHFLAG/sparcv9 = -m64 -mcpu=v9
-+ARCHFLAG/ppc     = -m32
-+ARCHFLAG/ppc64   = -m64
- 
- CFLAGS     += $(ARCHFLAG)
- AOUT_FLAGS += $(ARCHFLAG)
-diff -ru openjdk.orig/hotspot/build/linux/makefiles/sa.make openjdk/hotspot/build/linux/makefiles/sa.make
---- openjdk.orig/hotspot/build/linux/makefiles/sa.make	2007-11-08 11:34:54.000000000 +0000
-+++ openjdk/hotspot/build/linux/makefiles/sa.make	2007-11-08 11:36:15.000000000 +0000
-@@ -51,10 +51,10 @@
- SA_PROPERTIES = $(SA_CLASSDIR)/sa.properties
- 
- # if $(AGENT_DIR) does not exist, we don't build SA
--# also, we don't build SA on Itanium.
-+# also, we don't build SA on zero.
- 
- all: 
--	if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" ] ; then \
-+	if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "zero" ] ; then \
- 	   $(MAKE) -f sa.make $(GENERATED)/sa-jdi.jar; \
- 	fi
- 
-diff -ru openjdk.orig/hotspot/build/linux/makefiles/saproc.make openjdk/hotspot/build/linux/makefiles/saproc.make
---- openjdk.orig/hotspot/build/linux/makefiles/saproc.make	2007-11-08 11:34:54.000000000 +0000
-+++ openjdk/hotspot/build/linux/makefiles/saproc.make	2007-11-08 11:36:15.000000000 +0000
-@@ -44,10 +44,10 @@
- DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC)
- 
- # if $(AGENT_DIR) does not exist, we don't build SA
--# also, we don't build SA on Itanium.
-+# also, we don't build SA on zero.
- 
- checkAndBuildSA:
--	$(QUIETLY) if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" ] ; then \
-+	$(QUIETLY) if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "zero" ] ; then \
- 	   $(MAKE) -f vm.make $(LIBSAPROC); \
- 	fi
- 
-diff -ru openjdk.orig/hotspot/make/defs.make openjdk/hotspot/make/defs.make
---- openjdk.orig/hotspot/make/defs.make	2007-11-08 11:34:54.000000000 +0000
-+++ openjdk/hotspot/make/defs.make	2007-11-08 11:36:15.000000000 +0000
-@@ -199,26 +199,31 @@
-   # Use uname output for SRCARCH, but deal with platform differences. If ARCH
-   # is not explicitly listed below, it is treated as i486. Also note amd64 is
-   # a separate src arch, so LP64 && i486 ==> amd64.
--  SRCARCH     = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64,$(ARCH)))
-+  SRCARCH     = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 ppc ppc64,$(ARCH)))
-   ARCH/       = i486
-   ARCH/sparc  = sparc
-   ARCH/sparc64= sparc
-   ARCH/ia64   = ia64
-   ARCH/amd64  = amd64
-   ARCH/x86_64 = amd64
-+  ARCH/ppc    = zero
-+  ARCH/ppc64  = zero
-   ifdef LP64
-     ifeq ($(SRCARCH), i486)
-       SRCARCH = amd64
-     endif
-   endif
- 
--  # BUILDARCH is usually the same as SRCARCH, except for sparcv9
-+  # BUILDARCH is usually the same as SRCARCH, except for sparcv9 and zero
-   BUILDARCH = $(SRCARCH)
-   ifdef LP64
-     ifeq ($(BUILDARCH), sparc)
-       BUILDARCH = sparcv9
-     endif
-   endif
-+  ifeq ($(BUILDARCH), zero)
-+    BUILDARCH = $(ARCH)
-+  endif
- 
-   # LIBARCH is 1:1 mapping from BUILDARCH
-   LIBARCH         = $(LIBARCH/$(BUILDARCH))
-@@ -227,8 +232,10 @@
-   LIBARCH/sparc   = sparc
-   LIBARCH/sparcv9 = sparcv9
-   LIBARCH/ia64    = ia64
-+  LIBARCH/ppc     = ppc
-+  LIBARCH/ppc64   = ppc64
- 
--  LP64_ARCH = sparcv9 amd64 ia64
-+  LP64_ARCH = sparcv9 amd64 ia64 ppc64
- endif
- 
- # Required make macro settings for all platforms
-diff -r e95eb2395f60 openjdk-ecj/hotspot/build/linux/makefiles/vm.make
---- openjdk/hotspot/build/linux/makefiles/vm.make	Fri Nov 09 16:35:08 2007 +0000
-+++ openjdk/hotspot/build/linux/makefiles/vm.make	Mon Nov 12 09:09:28 2007 +0000
-@@ -149,6 +149,12 @@
- 	rm -f $@
- 	cat $^ > $@
- 
-+ifeq ($(BUILDARCH), ppc64)
-+  STATIC_CXX = false
-+else
-+  STATIC_CXX = true
-+endif
-+
- ifeq ($(LINK_INTO),AOUT)
-   LIBJVM.o                 =
-   LIBJVM_MAPFILE           =
-@@ -162,8 +168,14 @@
-   # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
-   # get around library dependency and compatibility issues. Must use gcc not
-   # g++ to link.
--  LFLAGS_VM                += $(STATIC_LIBGCC)
--  LIBS_VM                  += $(STATIC_STDCXX) $(LIBS)
-+  ifeq ($(STATIC_CXX), true)
-+    LFLAGS_VM              += $(STATIC_LIBGCC)
-+    LIBS_VM                += $(STATIC_STDCXX)
-+  else
-+    LIBS_VM                += -lstdc++
-+  endif
-+
-+  LIBS_VM                  += $(LIBS)
- endif
- 
- LINK_VM = $(LINK_LIB.c)
-diff -ru openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
---- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp	2007-11-08 11:34:54.000000000 +0000
-+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp	2007-11-08 11:36:15.000000000 +0000
-@@ -174,6 +174,12 @@
- #  else
- static char cpu_arch[] = "sparc";
- #  endif
-+#elif defined(PPC)
-+#  ifdef _LP64
-+static char cpu_arch[] = "ppc64";
-+#  else
-+static char cpu_arch[] = "ppc";
-+#  endif
- #else
- #error Add appropriate cpu_arch setting
- #endif
-@@ -2370,7 +2376,8 @@
-     // format has been changed), we'll use the largest page size supported by
-     // the processor.
- 
--    _large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M) SPARC_ONLY(4 * M);
-+    _large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M)
-+      SPARC_ONLY(4 * M) PPC_ONLY(16 * M);
- 
-     FILE *fp = fopen("/proc/meminfo", "r");
-     if (fp) {
-diff -ru openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp openjdk/hotspot/src/share/vm/runtime/vm_version.cpp
---- openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp	2007-11-08 11:34:54.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp	2007-11-08 11:36:15.000000000 +0000
-@@ -146,7 +146,8 @@
- #define CPU      IA32_ONLY("x86")                \
-                  IA64_ONLY("ia64")               \
-                  AMD64_ONLY("amd64")             \
--                 SPARC_ONLY("sparc")
-+                 SPARC_ONLY("sparc")             \
-+                 PPC_ONLY("ppc")
- 
- const char *Abstract_VM_Version::vm_platform_string() {
-   return OS "-" CPU;
-diff -ru openjdk.orig/hotspot/src/share/vm/utilities/macros.hpp openjdk/hotspot/src/share/vm/utilities/macros.hpp
---- openjdk.orig/hotspot/src/share/vm/utilities/macros.hpp	2007-11-08 11:34:54.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/utilities/macros.hpp	2007-11-08 11:36:15.000000000 +0000
-@@ -156,6 +156,14 @@
- #define NOT_SPARC(code) code
- #endif
- 
-+#ifdef PPC
-+#define PPC_ONLY(code) code
-+#define NOT_PPC(code)
-+#else
-+#define PPC_ONLY(code)
-+#define NOT_PPC(code) code
-+#endif
-+
- #define FIX_THIS(code) report_assertion_failure("FIX_THIS",__FILE__, __LINE__, "")
- 
- #define define_pd_global(type, name, value) const type pd_##name = value;
 diff -ru openjdk.orig/jdk/make/common/Defs-linux.gmk openjdk/jdk/make/common/Defs-linux.gmk
 --- openjdk.orig/jdk/make/common/Defs-linux.gmk	2007-11-08 11:35:35.000000000 +0000
 +++ openjdk/jdk/make/common/Defs-linux.gmk	2007-11-08 11:36:15.000000000 +0000
--- a/patches/icedtea-signature-iterator.patch	Fri Mar 14 09:47:37 2008 -0400
+++ b/patches/icedtea-signature-iterator.patch	Mon Mar 17 07:03:05 2008 -0400
@@ -1,23 +1,23 @@
 diff -r ee6af95bc459 openjdk/hotspot/src/share/vm/interpreter/oopMapCache.cpp
 --- openjdk/hotspot/src/share/vm/interpreter/oopMapCache.cpp	Fri Nov 02 09:42:25 2007 +0000
 +++ openjdk/hotspot/src/share/vm/interpreter/oopMapCache.cpp	Fri Nov 02 09:44:37 2007 +0000
-@@ -284,7 +284,7 @@ class MaskFillerForNative: public Native
+@@ -281,7 +281,7 @@ class MaskFillerForNative: public Native
   public:
    void pass_int()                                { /* ignore */ }
    void pass_long()                               { /* ignore */ }
 -#ifdef _LP64
-+#if defined(_LP64) || defined(PPC) || defined(ZERO)
++#if defined(_LP64) || defined(ZERO)
    void pass_float()                              { /* ignore */ }
  #endif
    void pass_double()                             { /* ignore */ }
 diff -r ee6af95bc459 openjdk/hotspot/src/share/vm/runtime/signature.hpp
 --- openjdk/hotspot/src/share/vm/runtime/signature.hpp	Fri Nov 02 09:42:25 2007 +0000
 +++ openjdk/hotspot/src/share/vm/runtime/signature.hpp	Fri Nov 02 09:48:28 2007 +0000
-@@ -278,11 +278,14 @@ class NativeSignatureIterator: public Si
+@@ -275,11 +275,14 @@ class NativeSignatureIterator: public Si
  
    void do_bool  ()                     { pass_int();    _jni_offset++; _offset++;       }
    void do_char  ()                     { pass_int();    _jni_offset++; _offset++;       }
-+#if defined(_LP64) || defined(PPC) || defined(ZERO)
++#if defined(_LP64) || defined(ZERO)
 +  void do_float ()                     { pass_float();  _jni_offset++; _offset++;       }
 +#else
 +  void do_float ()                     { pass_int();    _jni_offset++; _offset++;       }
@@ -30,11 +30,11 @@
    void do_double()                     { pass_double(); _jni_offset += 2; _offset += 2; }
  #endif
    void do_byte  ()                     { pass_int();    _jni_offset++; _offset++;       }
-@@ -306,8 +309,10 @@ class NativeSignatureIterator: public Si
+@@ -303,8 +306,10 @@ class NativeSignatureIterator: public Si
    virtual void pass_int()              = 0;
    virtual void pass_long()             = 0;
    virtual void pass_object()           = 0;
-+#if defined(_LP64) || defined(PPC) || defined(ZERO)
++#if defined(_LP64) || defined(ZERO)
 +  virtual void pass_float()            = 0;
 +#endif
  #ifdef _LP64
--- a/patches/icedtea-signed-types.patch	Fri Mar 14 09:47:37 2008 -0400
+++ b/patches/icedtea-signed-types.patch	Mon Mar 17 07:03:05 2008 -0400
@@ -1,7 +1,7 @@
 diff -r 9523b5ae0184 openjdk/hotspot/src/share/vm/asm/codeBuffer.hpp
 --- openjdk/hotspot/src/share/vm/asm/codeBuffer.hpp	Fri Nov 02 09:26:45 2007 +0000
 +++ openjdk/hotspot/src/share/vm/asm/codeBuffer.hpp	Fri Nov 02 09:39:12 2007 +0000
-@@ -84,7 +84,7 @@ class CodeSection VALUE_OBJ_CLASS_SPEC {
+@@ -81,7 +81,7 @@ class CodeSection VALUE_OBJ_CLASS_SPEC {
    address     _locs_point;      // last relocated position (grows upward)
    bool        _locs_own;        // did I allocate the locs myself?
    bool        _frozen;          // no more expansion of this section
@@ -10,3 +10,15 @@
    CodeBuffer* _outer;           // enclosing CodeBuffer
  
    // (Note:  _locs_point used to be called _last_reloc_offset.)
+diff -r 9523b5ae0184 openjdk/hotspot/src/share/vm/utilities/ostream.cpp
+--- openjdk/hotspot/src/share/vm/utilities/ostream.cpp	Fri Nov 02 09:26:45 2007 +0000
++++ openjdk/hotspot/src/share/vm/utilities/ostream.cpp	Fri Nov 02 09:37:53 2007 +0000
+@@ -829,7 +829,7 @@ bool networkStream::connect(const char *
+   server.sin_port = htons(port);
+ 
+   server.sin_addr.s_addr = inet_addr(ip);
+-  if (server.sin_addr.s_addr == (unsigned long)-1) {
++  if (server.sin_addr.s_addr == (in_addr_t)-1) {
+ #ifdef _WINDOWS
+     struct hostent* host = hpi::get_host_by_name((char*)ip);
+ #else
--- a/patches/icedtea-test-atomic-operations.patch	Fri Mar 14 09:47:37 2008 -0400
+++ b/patches/icedtea-test-atomic-operations.patch	Mon Mar 17 07:03:05 2008 -0400
@@ -1,11 +1,11 @@
 diff -r d384f5a5bd0c hotspot/src/share/vm/prims/jni.cpp
 --- openjdk/hotspot/src/share/vm/prims/jni.cpp	Mon Aug 06 13:11:51 2007 +0100
 +++ openjdk/hotspot/src/share/vm/prims/jni.cpp	Fri Sep 14 09:58:33 2007 +0100
-@@ -3206,6 +3206,21 @@ _JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_
+@@ -3209,6 +3209,21 @@ _JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_
    jint result = JNI_ERR;
    DT_RETURN_MARK(CreateJavaVM, jint, (const jint&)result);
  
-+  // We're about to use Atomic::xchg for locking.  On Aztec platforms
++  // We're about to use Atomic::xchg for locking.  On zero platforms
 +  // this is implemented using the GCC builtin __sync_lock_test_and_set
 +  // which is not guaranteed to do what we're using it for on all
 +  // platforms.  So we check it works before doing anything else.
--- a/patches/icedtea-text-relocations.patch	Fri Mar 14 09:47:37 2008 -0400
+++ b/patches/icedtea-text-relocations.patch	Mon Mar 17 07:03:05 2008 -0400
@@ -4,7 +4,7 @@
  # Compiler flags
  
  # position-independent code
-+ifneq ($(filter ppc ppc64,$(BUILDARCH)),)
++ifneq ($(filter ppc ppc64,$(ZERO_LIBARCH)),)
  PICFLAG = -fPIC
 +else
 +PICFLAG = -fpic
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-zero-build.patch	Mon Mar 17 07:03:05 2008 -0400
@@ -0,0 +1,132 @@
+diff -ru openjdk/hotspot/build/linux/makefiles/defs.make openjdk/hotspot/build/linux/makefiles/defs.make
+--- openjdk/hotspot/build/linux/makefiles/defs.make	2008-03-13 13:57:48.000000000 +0000
++++ openjdk/hotspot/build/linux/makefiles/defs.make	2008-03-13 13:37:14.000000000 +0000
+@@ -37,6 +37,18 @@
+   ARCH_DATA_MODEL ?= 32
+ endif
+ 
++# zero
++ifdef ICEDTEA_ZERO_BUILD
++  ARCH_DATA_MODEL  = $(ZERO_BITSPERWORD)
++  ifeq ($(ARCH_DATA_MODEL), 64)
++    MAKE_ARGS      += LP64=1
++  endif
++  PLATFORM         = linux-zero
++  VM_PLATFORM      = linux_zero
++  HS_ARCH          = zero
++  ARCH             = zero
++endif
++
+ # ia64
+ ifeq ($(ARCH), ia64)
+   ARCH_DATA_MODEL = 64
+diff -ru openjdk/hotspot/make/defs.make openjdk/hotspot/make/defs.make
+--- openjdk/hotspot/make/defs.make	2008-02-28 10:02:25.000000000 +0000
++++ openjdk/hotspot/make/defs.make	2008-03-13 13:37:14.000000000 +0000
+@@ -199,13 +199,14 @@
+   # Use uname output for SRCARCH, but deal with platform differences. If ARCH
+   # is not explicitly listed below, it is treated as i486. Also note amd64 is
+   # a separate src arch, so LP64 && i486 ==> amd64.
+-  SRCARCH     = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64,$(ARCH)))
++  SRCARCH     = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 zero,$(ARCH)))
+   ARCH/       = i486
+   ARCH/sparc  = sparc
+   ARCH/sparc64= sparc
+   ARCH/ia64   = ia64
+   ARCH/amd64  = amd64
+   ARCH/x86_64 = amd64
++  ARCH/zero   = zero
+   ifdef LP64
+     ifeq ($(SRCARCH), i486)
+       SRCARCH = amd64
+@@ -227,8 +228,9 @@
+   LIBARCH/sparc   = sparc
+   LIBARCH/sparcv9 = sparcv9
+   LIBARCH/ia64    = ia64
++  LIBARCH/zero    = $(ZERO_LIBARCH)
+ 
+-  LP64_ARCH = sparcv9 amd64 ia64
++  LP64_ARCH = sparcv9 amd64 ia64 zero
+ endif
+ 
+ # Required make macro settings for all platforms
+diff -ru openjdk/hotspot/build/linux/makefiles/buildtree.make openjdk/hotspot/build/linux/makefiles/buildtree.make
+--- openjdk/hotspot/build/linux/makefiles/buildtree.make	2008-02-28 10:02:19.000000000 +0000
++++ openjdk/hotspot/build/linux/makefiles/buildtree.make	2008-03-13 13:37:14.000000000 +0000
+@@ -277,6 +277,7 @@
+ DATA_MODE/sparcv9 = 64
+ DATA_MODE/amd64   = 64
+ DATA_MODE/ia64    = 64
++DATA_MODE/zero    = $(ZERO_BITSPERWORD)
+ 
+ JAVA_FLAG/32 = -d32
+ JAVA_FLAG/64 = -d64
+diff -ru openjdk/hotspot/build/linux/makefiles/gcc.make openjdk/hotspot/build/linux/makefiles/gcc.make
+--- openjdk/hotspot/build/linux/makefiles/gcc.make	2008-03-13 13:57:48.000000000 +0000
++++ openjdk/hotspot/build/linux/makefiles/gcc.make	2008-03-13 13:37:20.000000000 +0000
+@@ -73,6 +76,7 @@
+ ARCHFLAG/ia64    =
+ ARCHFLAG/sparc   = -m32 -mcpu=v9
+ ARCHFLAG/sparcv9 = -m64 -mcpu=v9
++ARCHFLAG/zero    = $(ZERO_ARCHFLAG)
+ 
+ CFLAGS     += $(ARCHFLAG)
+ AOUT_FLAGS += $(ARCHFLAG)
+diff -ru openjdk/hotspot/build/linux/makefiles/sa.make openjdk/hotspot/build/linux/makefiles/sa.make
+--- openjdk/hotspot/build/linux/makefiles/sa.make	2007-11-08 11:34:54.000000000 +0000
++++ openjdk/hotspot/build/linux/makefiles/sa.make	2007-11-08 11:36:15.000000000 +0000
+@@ -51,10 +51,10 @@
+ SA_PROPERTIES = $(SA_CLASSDIR)/sa.properties
+ 
+ # if $(AGENT_DIR) does not exist, we don't build SA
+-# also, we don't build SA on Itanium.
++# also, we don't build SA on Itanium or zero.
+ 
+ all: 
+-	if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" ] ; then \
++	if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" -a "$(SRCARCH)" != "zero" ] ; then \
+ 	   $(MAKE) -f sa.make $(GENERATED)/sa-jdi.jar; \
+ 	fi
+ 
+diff -ru openjdk/hotspot/build/linux/makefiles/saproc.make openjdk/hotspot/build/linux/makefiles/saproc.make
+--- openjdk/hotspot/build/linux/makefiles/saproc.make	2007-11-08 11:34:54.000000000 +0000
++++ openjdk/hotspot/build/linux/makefiles/saproc.make	2007-11-08 11:36:15.000000000 +0000
+@@ -44,10 +44,10 @@
+ DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC)
+ 
+ # if $(AGENT_DIR) does not exist, we don't build SA
+-# also, we don't build SA on Itanium.
++# also, we don't build SA on Itanium or zero.
+ 
+ checkAndBuildSA:
+-	$(QUIETLY) if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" ] ; then \
++	$(QUIETLY) if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" -a "$(SRCARCH)" != "zero" ] ; then \
+ 	   $(MAKE) -f vm.make $(LIBSAPROC); \
+ 	fi
+ 
+diff -ru openjdk/hotspot/build/linux/makefiles/gcc.make openjdk/hotspot/build/linux/makefiles/gcc.make
+--- openjdk/hotspot/build/linux/makefiles/gcc.make	2008-02-17 15:37:26.000000000 -0500
++++ openjdk/hotspot/build/linux/makefiles/gcc.make	2008-02-17 15:37:58.000000000 -0500
+@@ -57,6 +57,9 @@
+ 
+ VM_PICFLAG        = $(VM_PICFLAG/$(LINK_INTO))
+ 
++ifdef ICEDTEA_ZERO_BUILD
++CFLAGS += $(LIBFFI_CFLAGS)
++endif
+ CFLAGS += $(VM_PICFLAG)
+ CFLAGS += -fno-rtti
+ CFLAGS += -fno-exceptions
+diff -ru openjdk-ecj/hotspot/build/linux/makefiles/vm.make openjdk-ecj.new/hotspot/build/linux/makefiles/vm.make
+--- openjdk/hotspot/build/linux/makefiles/vm.make	2008-02-29 09:46:55.000000000 -0500
++++ openjdk/hotspot/build/linux/makefiles/vm.make	2008-02-29 09:47:30.000000000 -0500
+@@ -177,6 +177,9 @@
+ 
+   LIBS_VM                  += $(LIBS)
+ endif
++ifdef ICEDTEA_ZERO_BUILD
++LIBS_VM += $(LIBFFI_LIBS)
++endif
+ 
+ LINK_VM = $(LINK_LIB.c)
+ 
--- a/patches/icedtea-zero.patch	Fri Mar 14 09:47:37 2008 -0400
+++ b/patches/icedtea-zero.patch	Mon Mar 17 07:03:05 2008 -0400
@@ -1,31 +1,54 @@
-diff -ru openjdk/hotspot/build/linux/makefiles/gcc.make openjdk/hotspot/build/linux/makefiles/gcc.make
---- openjdk/hotspot/build/linux/makefiles/gcc.make	2008-02-17 15:37:26.000000000 -0500
-+++ openjdk/hotspot/build/linux/makefiles/gcc.make	2008-02-17 15:37:58.000000000 -0500
-@@ -57,6 +57,7 @@
+diff -ru openjdk.orig/hotspot/src/share/vm/runtime/mutex.hpp openjdk/hotspot/src/share/vm/runtime/mutex.hpp
+--- openjdk.orig/hotspot/src/share/vm/runtime/mutex.hpp	2007-11-08 11:34:54.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/mutex.hpp	2007-11-08 11:36:15.000000000 +0000
+@@ -61,18 +61,10 @@ union SplitWord {   // full-word with se
+ } ;
  
- VM_PICFLAG        = $(VM_PICFLAG/$(LINK_INTO))
+ // Endian-ness ... index of least-significant byte in SplitWord.Bytes[]
+-#ifdef AMD64        // little
++#ifdef VM_LITTLE_ENDIAN
+  #define _LSBINDEX 0
+ #else
+-#if IA32            // little
+- #define _LSBINDEX 0
+-#else
+-#ifdef SPARC        // big
+  #define _LSBINDEX (sizeof(intptr_t)-1)
+-#else
+- #error "unknown architecture"
+-#endif
+-#endif
+ #endif
  
-+CFLAGS += $(LIBFFI_CFLAGS)
- CFLAGS += $(VM_PICFLAG)
- CFLAGS += -fno-rtti
- CFLAGS += -fno-exceptions
-diff -ru openjdk-ecj/hotspot/build/linux/makefiles/vm.make openjdk-ecj.new/hotspot/build/linux/makefiles/vm.make
---- openjdk/hotspot/build/linux/makefiles/vm.make	2008-02-29 09:46:55.000000000 -0500
-+++ openjdk/hotspot/build/linux/makefiles/vm.make	2008-02-29 09:47:30.000000000 -0500
-@@ -177,6 +177,9 @@
+ class ParkEvent ;
+diff -ru openjdk/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp	2008-03-13 13:57:48.000000000 +0000
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp	2008-03-13 13:37:14.000000000 +0000
+@@ -159,7 +159,9 @@
+ #endif
  
-   LIBS_VM                  += $(LIBS)
- endif
-+ifeq ($(SRCARCH), zero)
-+LIBS_VM += $(LIBFFI_LIBS)
-+endif
+ // Cpu architecture string
+-#if   defined(IA64)
++#if   defined(ZERO)
++static char cpu_arch[] = ZERO_LIBARCH;
++#elif defined(IA64)
+ static char cpu_arch[] = "ia64";
+ #elif defined(IA32)
+ static char cpu_arch[] = "i386";
+@@ -2354,7 +2356,9 @@
+     // format has been changed), we'll use the largest page size supported by
+     // the processor.
  
- LINK_VM = $(LINK_LIB.c)
++#ifndef ZERO
+     _large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M) SPARC_ONLY(4 * M);
++#endif // ZERO
  
+     FILE *fp = fopen("/proc/meminfo", "r");
+     if (fp) {
 diff -ru openjdk/hotspot/src/share/vm/runtime/icache.cpp openjdk/hotspot/src/share/vm/runtime/icache.cpp
 --- openjdk/hotspot/src/share/vm/runtime/icache.cpp	2007-10-30 08:46:35.000000000 +0000
 +++ openjdk/hotspot/src/share/vm/runtime/icache.cpp	2008-01-21 15:18:48.000000000 +0000
-@@ -81,6 +81,7 @@
+@@ -78,6 +78,7 @@
  }
  
  void AbstractICache::invalidate_range(address start, int nbytes) {
@@ -33,7 +56,7 @@
    static bool firstTime = true;
    if (firstTime) {
      guarantee(start == CAST_FROM_FN_PTR(address, _flush_icache_stub),
-@@ -100,6 +101,7 @@
+@@ -97,6 +98,7 @@
    }
    call_flush_stub(start, round_to(nbytes, ICache::line_size) >>
                           ICache::log2_line_size);
@@ -44,7 +67,7 @@
 diff -ru openjdk/hotspot/src/share/vm/runtime/jniHandles.hpp openjdk/hotspot/src/share/vm/runtime/jniHandles.hpp
 --- openjdk/hotspot/src/share/vm/runtime/jniHandles.hpp	2007-10-30 08:46:35.000000000 +0000
 +++ openjdk/hotspot/src/share/vm/runtime/jniHandles.hpp	2008-01-24 13:26:36.000000000 +0000
-@@ -129,9 +129,17 @@
+@@ -126,9 +126,17 @@
    // Fill block with bad_handle values
    void zap();
  
@@ -65,19 +88,19 @@
 diff -ru openjdk/hotspot/src/share/vm/utilities/vmError.cpp openjdk/hotspot/src/share/vm/utilities/vmError.cpp
 --- openjdk/hotspot/src/share/vm/utilities/vmError.cpp	2008-01-24 13:17:27.000000000 +0000
 +++ openjdk/hotspot/src/share/vm/utilities/vmError.cpp	2008-01-24 13:21:20.000000000 +0000
-@@ -27,6 +27,11 @@
- 
+@@ -25,6 +25,11 @@
  # include "incls/_precompiled.incl"
  # include "incls/_vmError.cpp.incl"
-+
+ 
 +# ifdef ZERO
 +# include <interpreterRuntime.hpp>
 +# include <stackPrinter_zero.hpp>
 +# endif //
- 
++
  // List of environment variables that should be reported in error log file.
  const char *env_list[] = {
-@@ -395,6 +400,7 @@
+   // All platforms
+@@ -392,6 +397,7 @@
         st->cr();
       }
  
@@ -85,7 +108,7 @@
    STEP(110, "(printing stack bounds)" )
  
       if (_verbose) {
-@@ -452,11 +453,16 @@
+@@ -449,11 +455,16 @@
            st->cr();
         }
       }
@@ -102,7 +125,7 @@
         if (jt->has_last_Java_frame()) {
           st->print_cr("Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)");
           for(StackFrameStream sfs(jt); !sfs.is_done(); sfs.next()) {
-@@ -464,6 +475,7 @@
+@@ -461,6 +472,7 @@
             st->cr();
           }
         }
@@ -110,18 +133,3 @@
       }
  
    STEP(140, "(printing VM operation)" )
-diff -r 8e9761ee6dd6 openjdk/hotspot/build/linux/makefiles/buildtree.make
---- openjdk/hotspot/build/linux/makefiles/buildtree.make	Mon Feb 18 11:56:36 2008 +0000
-+++ openjdk/hotspot/build/linux/makefiles/buildtree.make	Mon Feb 18 12:03:06 2008 +0000
-@@ -60,7 +60,11 @@ QUIETLY$(MAKE_VERBOSE)	= @
- # For now, until the compiler is less wobbly:
- TESTFLAGS	= -Xbatch -showversion
- 
-+ifeq ($(ARCH), zero)
-+PLATFORM_FILE	= $(GAMMADIR)/build/$(OS_FAMILY)/platform_$(BUILDARCH)
-+else
- PLATFORM_FILE	= $(GAMMADIR)/build/$(OS_FAMILY)/platform_$(ARCH)
-+endif
- 
- ifdef FORCE_TIERED
- ifeq		($(VARIANT),tiered)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/platform_zero.in	Mon Mar 17 07:03:05 2008 -0400
@@ -0,0 +1,17 @@
+os_family = linux
+
+arch = zero
+
+arch_model = zero
+
+os_arch = linux_zero
+
+os_arch_model = linux_zero
+
+lib_arch = zero
+
+compiler = gcc
+
+gnu_dis_arch = zero
+
+sysdefs = -DLINUX -D_GNU_SOURCE -DCC_INTERP -DZERO -D@ZERO_ARCHDEF@ -DZERO_LIBARCH=\"@ZERO_LIBARCH@\"
--- a/ports/hotspot/build/linux/makefiles/arm.make	Fri Mar 14 09:47:37 2008 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-#
-# Copyright 2003-2005 Sun Microsystems, Inc.  All Rights Reserved.
-# Copyright 2008 Red Hat, Inc.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-# CA 95054 USA or visit www.sun.com if you need additional information or
-# have any questions.
-#
-#
-
-# Not included in includeDB because it has no dependencies
-Obj_Files += linux_arm.o
-
-# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
-OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
-# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
-OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
-
-# Specify that the CPU is little endian
-CFLAGS += -DVM_LITTLE_ENDIAN
-
-OPT_CFLAGS/compactingPermGenGen.o = -O1
--- a/ports/hotspot/build/linux/makefiles/ia64.make	Fri Mar 14 09:47:37 2008 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-#
-# Copyright 2003-2005 Sun Microsystems, Inc.  All Rights Reserved.
-# Copyright 2008 Red Hat, Inc.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-# CA 95054 USA or visit www.sun.com if you need additional information or
-# have any questions.
-#
-#
-
-# Not included in includeDB because it has no dependencies
-Obj_Files += linux_ia64.o
-
-# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
-OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
-# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
-OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
-
-# Specify that the CPU is little endian
-CFLAGS += -DVM_LITTLE_ENDIAN
-
-# Specify that the CPU is 64 bit
-CFLAGS += -D_LP64=1
-
-OPT_CFLAGS/compactingPermGenGen.o = -O1
--- a/ports/hotspot/build/linux/makefiles/ppc.make	Fri Mar 14 09:47:37 2008 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-#
-# Copyright 2003-2005 Sun Microsystems, Inc.  All Rights Reserved.
-# Copyright 2007, 2008 Red Hat, Inc.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-# CA 95054 USA or visit www.sun.com if you need additional information or
-# have any questions.
-#
-#
-
-# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
-OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
-# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
-OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
-
-OPT_CFLAGS/compactingPermGenGen.o = -O1
--- a/ports/hotspot/build/linux/makefiles/ppc64.make	Fri Mar 14 09:47:37 2008 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-#
-# Copyright 2003-2005 Sun Microsystems, Inc.  All Rights Reserved.
-# Copyright 2007, 2008 Red Hat, Inc.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-# CA 95054 USA or visit www.sun.com if you need additional information or
-# have any questions.
-#
-#
-
-# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
-OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
-# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
-OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
-
-# Specify that the CPU is 64 bit
-CFLAGS += -D_LP64=1
-
-OPT_CFLAGS/compactingPermGenGen.o = -O1
--- a/ports/hotspot/build/linux/makefiles/s390.make	Fri Mar 14 09:47:37 2008 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-#
-# Copyright 2003-2005 Sun Microsystems, Inc.  All Rights Reserved.
-# Copyright 2008 Red Hat, Inc.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-# CA 95054 USA or visit www.sun.com if you need additional information or
-# have any questions.
-#
-#
-
-# Not included in includeDB because it has no dependencies
-Obj_Files += linux_s390.o
-
-# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
-OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
-# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
-OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
-
-OPT_CFLAGS/compactingPermGenGen.o = -O1
--- a/ports/hotspot/build/linux/makefiles/s390x.make	Fri Mar 14 09:47:37 2008 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-#
-# Copyright 2003-2005 Sun Microsystems, Inc.  All Rights Reserved.
-# Copyright 2008 Red Hat, Inc.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
-# CA 95054 USA or visit www.sun.com if you need additional information or
-# have any questions.
-#
-#
-
-# Not included in includeDB because it has no dependencies
-Obj_Files += linux_s390x.o
-
-# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
-OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
-# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
-OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
-
-# Specify that the CPU is 64 bit
-CFLAGS += -D_LP64=1
-
-OPT_CFLAGS/compactingPermGenGen.o = -O1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ports/hotspot/build/linux/makefiles/zero.make	Mon Mar 17 07:03:05 2008 -0400
@@ -0,0 +1,41 @@
+#
+# Copyright 2003-2005 Sun Microsystems, Inc.  All Rights Reserved.
+# Copyright 2007, 2008 Red Hat, Inc.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#
+#
+
+# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
+OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
+# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized
+OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT)
+
+# Specify that the CPU is little endian, if necessary
+ifeq ($(ZERO_ENDIANNESS), little)
+  CFLAGS += -DVM_LITTLE_ENDIAN
+endif
+
+# Specify that the CPU is 64 bit, if necessary
+ifeq ($(ZERO_BITSPERWORD), 64)
+  CFLAGS += -D_LP64=1
+endif
+
+OPT_CFLAGS/compactingPermGenGen.o = -O1
--- a/ports/hotspot/build/linux/platform_arm	Fri Mar 14 09:47:37 2008 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-os_family = linux
-
-arch = zero
-
-arch_model = zero
-
-os_arch = linux_zero
-
-os_arch_model = linux_zero
-
-lib_arch = arm
-
-compiler = gcc
-
-gnu_dis_arch = arm
-
-sysdefs = -DLINUX -D_GNU_SOURCE -DARM -DCC_INTERP -DZERO
--- a/ports/hotspot/build/linux/platform_ia64	Fri Mar 14 09:47:37 2008 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-os_family = linux
-
-arch = zero
-
-arch_model = zero
-
-os_arch = linux_zero
-
-os_arch_model = linux_zero
-
-lib_arch = ia64
-
-compiler = gcc
-
-gnu_dis_arch = ia64
-
-sysdefs = -DLINUX -D_GNU_SOURCE -DIA64 -DCC_INTERP -DZERO
--- a/ports/hotspot/build/linux/platform_ppc	Fri Mar 14 09:47:37 2008 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-os_family = linux
-
-arch = zero
-
-arch_model = zero
-
-os_arch = linux_zero
-
-os_arch_model = linux_zero
-
-lib_arch = ppc
-
-compiler = gcc
-
-gnu_dis_arch = ppc
-
-sysdefs = -DLINUX -D_GNU_SOURCE -DPPC -DCC_INTERP -DZERO
--- a/ports/hotspot/build/linux/platform_ppc64	Fri Mar 14 09:47:37 2008 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-os_family = linux
-
-arch = zero
-
-arch_model = zero
-
-os_arch = linux_zero
-
-os_arch_model = linux_zero
-
-lib_arch = ppc
-
-compiler = gcc
-
-gnu_dis_arch = ppc
-
-sysdefs = -DLINUX -D_GNU_SOURCE -DPPC -DCC_INTERP -DZERO
--- a/ports/hotspot/build/linux/platform_s390	Fri Mar 14 09:47:37 2008 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-os_family = linux
-
-arch = zero
-
-arch_model = zero
-
-os_arch = linux_zero
-
-os_arch_model = linux_zero
-
-lib_arch = s390
-
-compiler = gcc
-
-gnu_dis_arch = s390
-
-sysdefs = -DLINUX -D_GNU_SOURCE -DS390 -DCC_INTERP -DZERO
--- a/ports/hotspot/build/linux/platform_s390x	Fri Mar 14 09:47:37 2008 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-os_family = linux
-
-arch = zero
-
-arch_model = zero
-
-os_arch = linux_zero
-
-os_arch_model = linux_zero
-
-lib_arch = s390
-
-compiler = gcc
-
-gnu_dis_arch = s390
-
-sysdefs = -DLINUX -D_GNU_SOURCE -DS390 -DCC_INTERP -DZERO