changeset 812:fcd571c1fa19 cacao

2008-02-14 Gary Benson <gbenson@redhat.com> * patches/icedtea-always-zero.patch: New file. * acinclude.m4 (ENABLE_ZERO_BUILD): New macro. (SET_CORE_BUILD): Rewritten to accomodate the above. * configure.ac: Call ENABLE_ZERO_BUILD, and move the call to SET_CORE_BUILD so it's after it. * Makefile.am (ICEDTEA_CORE_BUILD): Rearrange slightly. (ICEDTEA_PATCHES): Conditionally add zero build patch. * Makefile.in, configure: Regenerate.
author Gary Benson <gbenson@redhat.com>
date Thu, 14 Feb 2008 10:24:53 -0500
parents 9a290f38ae0d
children 47d2687b6116
files ChangeLog Makefile.am Makefile.in acinclude.m4 configure configure.ac patches/icedtea-always-zero.patch
diffstat 7 files changed, 309 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Feb 13 12:21:10 2008 -0500
+++ b/ChangeLog	Thu Feb 14 10:24:53 2008 -0500
@@ -1,3 +1,16 @@
+2008-02-14  Gary Benson  <gbenson@redhat.com>
+
+	* patches/icedtea-always-zero.patch: New file.
+	* acinclude.m4
+	(ENABLE_ZERO_BUILD): New macro.
+	(SET_CORE_BUILD): Rewritten to accomodate the above.
+	* configure.ac: Call ENABLE_ZERO_BUILD, and move the
+	call to SET_CORE_BUILD so it's after it.
+	* Makefile.am
+	(ICEDTEA_CORE_BUILD): Rearrange slightly.
+	(ICEDTEA_PATCHES): Conditionally add zero build patch.
+	* Makefile.in, configure: Regenerate.
+
 2008-02-13  Lillian Angel <langel@redhat.com>
 
 	* configure.ac: Updated IcedTea version.
--- a/Makefile.am	Wed Feb 13 12:21:10 2008 -0500
+++ b/Makefile.am	Thu Feb 14 10:24:53 2008 -0500
@@ -45,6 +45,11 @@
 	$(abs_top_srcdir)/bootstrap/jdk1.6.0
 ICEDTEA_ENDORSED_DIR = \
 	$(ICEDTEA_BOOT_DIR)/lib/endorsed
+if CORE_BUILD
+  ICEDTEA_CORE_BUILD = yes
+else
+  ICEDTEA_CORE_BUILD =
+endif
 ICEDTEA_ENV = \
 	"ALT_JDK_IMPORT_PATH=$(ICEDTEA_BOOT_DIR)" \
 	"ANT_HOME=$(SYSTEM_ANT_DIR)" \
@@ -193,6 +198,13 @@
   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 =
@@ -242,6 +254,7 @@
 	patches/icedtea-zero.patch \
 	$(GCC_PATCH) \
 	$(FAST_BUILD_PATCH) \
+	$(ZERO_BUILD_PATCH) \
 	$(DISTRIBUTION_PATCHES)
 
 if WITH_CACAO
--- a/Makefile.in	Wed Feb 13 12:21:10 2008 -0500
+++ b/Makefile.in	Thu Feb 14 10:24:53 2008 -0500
@@ -108,7 +108,6 @@
 GREP = @GREP@
 GTK_CFLAGS = @GTK_CFLAGS@
 GTK_LIBS = @GTK_LIBS@
-ICEDTEA_CORE_BUILD = @ICEDTEA_CORE_BUILD@
 INSTALL = @INSTALL@
 INSTALL_ARCH_DIR = @INSTALL_ARCH_DIR@
 INSTALL_DATA = @INSTALL_DATA@
--- a/acinclude.m4	Wed Feb 13 12:21:10 2008 -0500
+++ b/acinclude.m4	Thu Feb 14 10:24:53 2008 -0500
@@ -18,18 +18,6 @@
   AC_SUBST(INSTALL_ARCH_DIR)
 ])
 
-AC_DEFUN([SET_CORE_BUILD],
-[
-  if test -f "ports/hotspot/build/linux/platform_${BUILD_ARCH_DIR}" && \
-     grep -q "arch.*=.*zero" "ports/hotspot/build/linux/platform_${BUILD_ARCH_DIR}"
-  then
-    ICEDTEA_CORE_BUILD=yes
-  else
-    ICEDTEA_CORE_BUILD=
-  fi
-  AC_SUBST(ICEDTEA_CORE_BUILD)
-])
-
 AC_DEFUN([FIND_JAVAC],
 [
   user_specified_javac=
@@ -521,6 +509,33 @@
  AC_SUBST([$1])
 ])
 
+AC_DEFUN([ENABLE_ZERO_BUILD],
+[
+  AC_ARG_ENABLE([zero],
+                [AS_HELP_STRING(--enable-zero,use zero-assembler port on non-zero platforms)],
+  [
+    AM_CONDITIONAL(ZERO_BUILD, test x = x)
+  ],
+  [
+    AM_CONDITIONAL(ZERO_BUILD, test x != x)
+  ])
+])
+
+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
+])
+
 
 AC_DEFUN([AC_CHECK_WITH_CACAO],
 [
--- a/configure	Wed Feb 13 12:21:10 2008 -0500
+++ b/configure	Thu Feb 14 10:24:53 2008 -0500
@@ -720,7 +720,6 @@
 WITH_ICEDTEA_FALSE
 BUILD_ARCH_DIR
 INSTALL_ARCH_DIR
-ICEDTEA_CORE_BUILD
 JAVA
 JAVAC
 JAVAH
@@ -745,6 +744,10 @@
 CACAO
 FAST_BUILD_TRUE
 FAST_BUILD_FALSE
+ZERO_BUILD_TRUE
+ZERO_BUILD_FALSE
+CORE_BUILD_TRUE
+CORE_BUILD_FALSE
 MERCURIAL
 CPP
 GREP
@@ -1398,6 +1401,7 @@
   --disable-gcjwebplugin  Disable compilation of browser plugin
   --enable-fast-build     optimize for quick building: use -O0 and do not
                           build documentation
+  --enable-zero           use zero-assembler port on non-zero platforms
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -4989,16 +4993,6 @@
 
 
 
-
-  if test -f "ports/hotspot/build/linux/platform_${BUILD_ARCH_DIR}" && \
-     grep -q "arch.*=.*zero" "ports/hotspot/build/linux/platform_${BUILD_ARCH_DIR}"
-  then
-    ICEDTEA_CORE_BUILD=yes
-  else
-    ICEDTEA_CORE_BUILD=
-  fi
-
-
 if test "${with_icedtea}" == true
 then
   JAVA=$SYSTEM_ICEDTEA_DIR/bin/java
@@ -6994,6 +6988,67 @@
 
 
 
+  # Check whether --enable-zero was given.
+if test "${enable_zero+set}" = set; then
+  enableval=$enable_zero;
+     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
+
+
+
+  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
+
+
 if test "$ALT_OPENJDK_SRC_ZIP" = "not specified"; then
   if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}hg", so it can be a program name with args.
@@ -10168,6 +10223,41 @@
 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 "${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 "${CORE_BUILD_TRUE}" && test -z "${CORE_BUILD_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"CORE_BUILD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"CORE_BUILD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${CORE_BUILD_TRUE}" && test -z "${CORE_BUILD_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"CORE_BUILD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"CORE_BUILD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${CORE_BUILD_TRUE}" && test -z "${CORE_BUILD_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"CORE_BUILD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"CORE_BUILD\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 if test -z "${FAST_BUILD_TRUE}" && test -z "${FAST_BUILD_FALSE}"; then
   { { echo "$as_me:$LINENO: error: conditional \"FAST_BUILD\" was never defined.
 Usually this means the macro was only invoked conditionally." >&5
@@ -10838,7 +10928,6 @@
 WITH_ICEDTEA_FALSE!$WITH_ICEDTEA_FALSE$ac_delim
 BUILD_ARCH_DIR!$BUILD_ARCH_DIR$ac_delim
 INSTALL_ARCH_DIR!$INSTALL_ARCH_DIR$ac_delim
-ICEDTEA_CORE_BUILD!$ICEDTEA_CORE_BUILD$ac_delim
 JAVA!$JAVA$ac_delim
 JAVAC!$JAVAC$ac_delim
 JAVAH!$JAVAH$ac_delim
@@ -10863,6 +10952,10 @@
 CACAO!$CACAO$ac_delim
 FAST_BUILD_TRUE!$FAST_BUILD_TRUE$ac_delim
 FAST_BUILD_FALSE!$FAST_BUILD_FALSE$ac_delim
+ZERO_BUILD_TRUE!$ZERO_BUILD_TRUE$ac_delim
+ZERO_BUILD_FALSE!$ZERO_BUILD_FALSE$ac_delim
+CORE_BUILD_TRUE!$CORE_BUILD_TRUE$ac_delim
+CORE_BUILD_FALSE!$CORE_BUILD_FALSE$ac_delim
 MERCURIAL!$MERCURIAL$ac_delim
 CPP!$CPP$ac_delim
 GREP!$GREP$ac_delim
@@ -10896,7 +10989,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 61; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 64; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
--- a/configure.ac	Wed Feb 13 12:21:10 2008 -0500
+++ b/configure.ac	Thu Feb 14 10:24:53 2008 -0500
@@ -96,7 +96,6 @@
 AM_CONDITIONAL(WITH_ICEDTEA, test "${with_icedtea}" == true)
 
 SET_ARCH_DIRS
-SET_CORE_BUILD
 if test "${with_icedtea}" == true
 then
   JAVA=$SYSTEM_ICEDTEA_DIR/bin/java
@@ -128,6 +127,8 @@
 WITH_OPENJDK_SRC_DIR
 AC_CHECK_WITH_CACAO
 ENABLE_FAST_BUILD
+ENABLE_ZERO_BUILD
+SET_CORE_BUILD
 
 if test "$ALT_OPENJDK_SRC_ZIP" = "not specified"; then
   FIND_TOOL([MERCURIAL], [hg])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-always-zero.patch	Thu Feb 14 10:24:53 2008 -0500
@@ -0,0 +1,148 @@
+diff -r b8a03891e55e openjdk/hotspot/make/defs.make
+--- openjdk/hotspot/make/defs.make	Thu Feb 14 12:46:26 2008 +0000
++++ openjdk/hotspot/make/defs.make	Thu Feb 14 13:06:37 2008 +0000
+@@ -209,6 +209,7 @@ ifneq ($(OSNAME),windows)
+     else
+       BUILDARCH = i486
+     endif
++    SRCARCH = zero
+   endif
+   ifeq ($(BUILDARCH), sparc)
+     ifdef LP64
+diff -r b8a03891e55e openjdk/hotspot/build/linux/platform_amd64
+--- openjdk/hotspot/build/linux/platform_amd64	Thu Feb 14 12:46:26 2008 +0000
++++ openjdk/hotspot/build/linux/platform_amd64	Thu Feb 14 12:57:36 2008 +0000
+@@ -1,12 +1,12 @@ os_family = linux
+ os_family = linux
+ 
+-arch = x86
++arch = zero
+ 
+-arch_model = x86_64
++arch_model = zero
+ 
+-os_arch = linux_x86
++os_arch = linux_zero
+ 
+-os_arch_model = linux_x86_64
++os_arch_model = linux_zero
+ 
+ lib_arch = amd64
+ 
+@@ -14,4 +14,4 @@ compiler = gcc
+ 
+ gnu_dis_arch = amd64
+ 
+-sysdefs = -DLINUX -D_GNU_SOURCE -DAMD64
++sysdefs = -DLINUX -D_GNU_SOURCE -DAMD64 -DCC_INTERP -DZERO
+diff -r b8a03891e55e openjdk/hotspot/build/linux/platform_i486
+--- openjdk/hotspot/build/linux/platform_i486	Thu Feb 14 12:46:26 2008 +0000
++++ openjdk/hotspot/build/linux/platform_i486	Thu Feb 14 12:57:36 2008 +0000
+@@ -1,12 +1,12 @@ os_family = linux
+ os_family = linux
+ 
+-arch = x86
++arch = zero
+ 
+-arch_model = x86_32
++arch_model = zero
+ 
+-os_arch = linux_x86
++os_arch = linux_zero
+ 
+-os_arch_model = linux_x86_32
++os_arch_model = linux_zero
+ 
+ lib_arch = i386
+ 
+@@ -14,4 +14,4 @@ compiler = gcc
+ 
+ gnu_dis_arch = i386
+ 
+-sysdefs = -DLINUX -D_GNU_SOURCE -DIA32
++sysdefs = -DLINUX -D_GNU_SOURCE -DIA32 -DCC_INTERP -DZERO
+diff -r b8a03891e55e openjdk/hotspot/build/linux/makefiles/defs.make
+--- openjdk/hotspot/build/linux/makefiles/defs.make	Thu Feb 14 12:46:26 2008 +0000
++++ openjdk/hotspot/build/linux/makefiles/defs.make	Thu Feb 14 12:58:03 2008 +0000
+@@ -68,12 +68,12 @@ ifeq ($(ARCH), x86_64)
+     MAKE_ARGS       += LP64=1
+     PLATFORM        = linux-amd64
+     VM_PLATFORM     = linux_amd64
+-    HS_ARCH         = x86
++    HS_ARCH         = zero
+   else
+     ARCH_DATA_MODEL = 32
+     PLATFORM        = linux-i586
+     VM_PLATFORM     = linux_i486
+-    HS_ARCH         = x86
++    HS_ARCH         = zero
+     # We have to reset ARCH to i686 since SRCARCH relies on it
+     ARCH            = i686   
+   endif
+@@ -84,7 +84,7 @@ ifeq ($(ARCH), i686)
+   ARCH_DATA_MODEL  = 32
+   PLATFORM         = linux-i586
+   VM_PLATFORM      = linux_i486
+-  HS_ARCH          = x86
++  HS_ARCH          = zero
+ endif
+ 
+ # ppc
+diff -r b8a03891e55e openjdk/hotspot/build/linux/makefiles/amd64.make
+--- openjdk/hotspot/build/linux/makefiles/amd64.make	Thu Feb 14 12:46:26 2008 +0000
++++ openjdk/hotspot/build/linux/makefiles/amd64.make	Thu Feb 14 12:57:36 2008 +0000
+@@ -22,9 +22,6 @@
+ #  
+ #
+ 
+-# Not included in includeDB because it has no dependencies
+-Obj_Files += linux_x86_64.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
+diff -r b8a03891e55e openjdk/hotspot/build/linux/makefiles/i486.make
+--- openjdk/hotspot/build/linux/makefiles/i486.make	Thu Feb 14 12:46:26 2008 +0000
++++ openjdk/hotspot/build/linux/makefiles/i486.make	Thu Feb 14 12:57:36 2008 +0000
+@@ -22,10 +22,6 @@
+ #  
+ #
+ 
+-# TLS helper, assembled from .s file
+-# Not included in includeDB because it has no dependencies
+-Obj_Files += linux_x86_32.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
+diff -r b8a03891e55e openjdk/jdk/src/solaris/bin/amd64/jvm.cfg
+--- openjdk/jdk/src/solaris/bin/amd64/jvm.cfg	Thu Feb 14 12:46:26 2008 +0000
++++ openjdk/jdk/src/solaris/bin/amd64/jvm.cfg	Thu Feb 14 13:07:27 2008 +0000
+@@ -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
+diff -r b8a03891e55e openjdk/jdk/src/solaris/bin/i586/jvm.cfg
+--- openjdk/jdk/src/solaris/bin/i586/jvm.cfg	Thu Feb 14 12:46:26 2008 +0000
++++ openjdk/jdk/src/solaris/bin/i586/jvm.cfg	Thu Feb 14 13:07:27 2008 +0000
+@@ -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