changeset 1838:ea63ce8e8819

Fix Nimbus and Zero build issues and cleanup configure output. 2009-05-27 Andrew John Hughes <ahughes@redhat.com> * Makefile.am: Replace !ENABLE_OPTIMIZATIONS with DISABLE_OPTIMIZATIONS for clarity, only apply the Nimbus generation patch when ENABLE_NIMBUS is on but ENABLE_NIMBUS_GENERATION is off. * acinclude.m4: (DISABLE_OPTIMIZATIONS): Renamed from ENABLE_OPTIMIZATIONS for clarity, and added result message on all paths. (AC_CHECK_ENABLE_NIMBUS_GENERATION): Correct message to represent current default of no. (IT_CHECK_ADDITIONAL_VMS): Refactored to provide output on all paths and moved from configure.ac. * configure.ac: Replace additional-vms code with call to IT_CHECK_ADDITIONAL_VMS macro. * ports/hotspot/src/cpu/zero/vm/globals_zero.hpp: Remove InlineSmallCode and... * ports/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp: ...add it here, only needed for Shark builds.
author Andrew John Hughes <ahughes@redhat.com>
date Wed, 27 May 2009 17:57:45 +0100
parents ecb875f82ef5
children 31e361735a0c
files ChangeLog Makefile.am acinclude.m4 configure.ac ports/hotspot/src/cpu/zero/vm/globals_zero.hpp ports/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp
diffstat 6 files changed, 82 insertions(+), 50 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue May 26 23:54:58 2009 +0200
+++ b/ChangeLog	Wed May 27 17:57:45 2009 +0100
@@ -1,3 +1,24 @@
+2009-05-27  Andrew John Hughes  <ahughes@redhat.com>
+
+	* Makefile.am:
+	Replace !ENABLE_OPTIMIZATIONS with DISABLE_OPTIMIZATIONS
+	for clarity, only apply the Nimbus generation patch when
+	ENABLE_NIMBUS is on but ENABLE_NIMBUS_GENERATION is off.
+	* acinclude.m4:
+	(DISABLE_OPTIMIZATIONS): Renamed from ENABLE_OPTIMIZATIONS
+	for clarity, and added result message on all paths.
+	(AC_CHECK_ENABLE_NIMBUS_GENERATION): Correct message to
+	represent current default of no.
+	(IT_CHECK_ADDITIONAL_VMS): Refactored to provide output on
+	all paths and moved from configure.ac.
+	* configure.ac:
+	Replace additional-vms code with call to IT_CHECK_ADDITIONAL_VMS
+	macro.
+	* ports/hotspot/src/cpu/zero/vm/globals_zero.hpp:
+	Remove InlineSmallCode and...
+	* ports/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp:
+	...add it here, only needed for Shark builds.
+
 2009-05-26  Matthias Klose  <doko@ubuntu.com>
 
 	* patches/cacao/launcher.patch: Update for OpenJDK 7.
--- a/Makefile.am	Tue May 26 23:54:58 2009 +0200
+++ b/Makefile.am	Wed May 27 17:57:45 2009 +0100
@@ -59,7 +59,7 @@
 PULSE_JAVA_CLASS_DIR =
 endif
 
-if ENABLE_NIMBUS
+if ENABLE_NIMBUS_GENERATION
 JIBX_DEPS_DIR=$(abs_top_builddir)/jibx
 endif
 
@@ -1568,7 +1568,7 @@
 	"DISABLE_NIMBUS=true"
 endif
 
-if !ENABLE_OPTIMIZATIONS
+if DISABLE_OPTIMIZATIONS
 ICEDTEA_ENV += \
 	"NO_OPTIMIZATIONS=true" \
 	"CC_NO_OPT=-O0 -g"
@@ -1646,7 +1646,7 @@
 	"ALT_HOTSPOT_IMPORT_PATH=$(CACAO_IMPORT_PATH)"
 endif
 
-if !ENABLE_OPTIMIZATIONS
+if DISABLE_OPTIMIZATIONS
 ICEDTEA_ENV_ECJ += \
 	"NO_OPTIMIZATIONS=true" \
 	"CC_NO_OPT=-O0 -g"
@@ -2098,9 +2098,11 @@
 ICEDTEA_PATCHES += patches/icedtea-systemtap.patch
 endif
 
+if ENABLE_NIMBUS
 if !ENABLE_NIMBUS_GENERATION
 ICEDTEA_PATCHES += patches/icedtea-pregenerated-nimbus.patch
 endif
+endif
 
 stamps/extract.stamp: stamps/download.stamp
 if OPENJDK_SRC_DIR_FOUND
--- a/acinclude.m4	Tue May 26 23:54:58 2009 +0200
+++ b/acinclude.m4	Wed May 27 17:57:45 2009 +0100
@@ -665,27 +665,26 @@
   AC_SUBST(PULSEAUDIO_BIN)
 ])
 
-AC_DEFUN([ENABLE_OPTIMIZATIONS],
+AC_DEFUN([DISABLE_OPTIMIZATIONS],
 [
-  AC_MSG_CHECKING(whether to disable optimizations)
+  AC_MSG_CHECKING([whether to disable optimizations and build with -O0 -g])
   AC_ARG_ENABLE([optimizations],
                 [AS_HELP_STRING(--disable-optimizations,build with -O0 -g [[default=no]])],
   [
     case "${enableval}" in
       no)
-        AC_MSG_RESULT([yes, building with -O0 -g])
-        enable_optimizations=no
+        disable_optimizations=yes
         ;;
       *)
-        AC_MSG_RESULT([no])
-        enable_optimizations=yes
+        disable_optimizations=no
         ;;
     esac
   ],
   [
-    enable_optimizations=yes
+    disable_optimizations=no
   ])
-  AM_CONDITIONAL([ENABLE_OPTIMIZATIONS], test x"${enable_optimizations}" = "xyes")
+  AC_MSG_RESULT([$disable_optimizations])
+  AM_CONDITIONAL([DISABLE_OPTIMIZATIONS], test x"${disable_optimizations}" = "xyes")
 ])
 
 AC_DEFUN([FIND_TOOL],
@@ -1506,7 +1505,7 @@
 [
   AC_MSG_CHECKING(whether to generate the Nimbus source files using JIBX)
   AC_ARG_ENABLE([nimbus-generation],
-	      [AS_HELP_STRING(--enable-nimbus-generation,generate the Nimbus source with JIBX [[default=yes]])],
+	      [AS_HELP_STRING(--enable-nimbus-generation,generate the Nimbus source with JIBX [[default=no]])],
   [
     ENABLE_NIMBUS_GENERATION="${enableval}"
   ],
@@ -1518,3 +1517,46 @@
   AM_CONDITIONAL(ENABLE_NIMBUS_GENERATION, test x"${ENABLE_NIMBUS_GENERATION}" = "xyes")
   AC_SUBST(ENABLE_NIMBUS_GENERATION)
 ])
+
+AC_DEFUN([IT_CHECK_ADDITIONAL_VMS],
+[
+AC_MSG_CHECKING([for additional virtual machines to build])
+AC_ARG_WITH(additional-vms,
+            AC_HELP_STRING([--with-additional-vms=vm-list],
+	    [build additional virtual machines. Valid value is a comma separated string with the backend names `cacao', `zero' and `shark'.]),
+[
+if test "x${withval}" != x ; then
+  with_additional_vms=${withval}
+  for vm in `echo ${with_additional_vms} | sed 's/,/ /g'`; do
+    case "x$vm" in
+      xcacao) add_vm_cacao=yes;;
+      xzero)  add_vm_zero=yes;;
+      xshark) add_vm_shark=yes;;
+      *) AC_MSG_ERROR([proper usage is --with-additional-vms=vm1,vm2,...])
+    esac
+  done
+fi])
+
+if test "x${with_additional_vms}" = x; then
+   with_additional_vms="none";
+fi
+AC_MSG_RESULT($with_additional_vms)
+
+AM_CONDITIONAL(ADD_CACAO_BUILD, test x$add_vm_cacao != x)
+AM_CONDITIONAL(ADD_ZERO_BUILD,  test x$add_vm_zero  != x || test x$add_vm_shark != x)
+AM_CONDITIONAL(ADD_SHARK_BUILD, test x$add_vm_shark != x)
+AM_CONDITIONAL(BUILD_CACAO, test x$add_vm_cacao != x || test "x${WITH_CACAO}" = xyes)
+
+if test "x${WITH_CACAO}" = xyes && test "x${ADD_CACAO_BUILD_TRUE}" = x; then
+  AC_MSG_ERROR([additional vm is the default vm])
+fi
+if test "x${ZERO_BUILD_TRUE}" = x && test "x${ADD_ZERO_BUILD_TRUE}" = x; then
+  AC_MSG_ERROR([additional vm is the default vm])
+fi
+if test "x${USE_SYSTEM_CACAO_TRUE}" = x; then
+  AC_MSG_ERROR([cannot build with system cacao as additional vm])
+fi
+if test "x${ADD_ZERO_BUILD_TRUE}" = x && test "x${abs_top_builddir}" = "x${abs_top_srcdir}"; then
+  AC_MSG_ERROR([build of additional zero/shark VM requires build with srcdir != builddir])
+fi
+])
--- a/configure.ac	Tue May 26 23:54:58 2009 +0200
+++ b/configure.ac	Wed May 27 17:57:45 2009 +0100
@@ -313,12 +313,13 @@
 AC_CHECK_WITH_CACAO_SRC_ZIP
 AC_CHECK_ENABLE_NIMBUS
 AC_CHECK_ENABLE_NIMBUS_GENERATION
-ENABLE_OPTIMIZATIONS
+DISABLE_OPTIMIZATIONS
 SET_SHARK_BUILD
 ENABLE_ZERO_BUILD
 WITH_VERSION_SUFFIX
 WITH_PROJECT
 ENABLE_HG
+IT_CHECK_ADDITIONAL_VMS
 
 AC_PATH_TOOL([HG],[hg])
 if test "x${enable_hg}" = "xyes"; then
@@ -538,42 +539,6 @@
   AC_SUBST(GTK_LIBS)
 fi
 
-
-AC_MSG_CHECKING(for --with-additional-vms)
-AC_ARG_WITH(additional-vms,
-            AC_HELP_STRING([--with-additional-vms=vm-list], [build additional virtual machines. Valid value is a comma separated string with the backend names `cacao', `zero' and `shark'.]),
-[
-if test x$with_additional_vms != x
-then
-  for vm in `echo $with_additional_vms | sed 's/,/ /g'`; do
-    case "x$vm" in
-      xcacao) add_vm_cacao=yes;;
-      xzero)  add_vm_zero=yes;;
-      xshark) add_vm_shark=yes;;
-      *) AC_MSG_ERROR([proper usage is --with-additional-vms=vm1,vm2,...])
-    esac
-  done
-fi])
-AC_MSG_RESULT($with_additional_vms)
-
-AM_CONDITIONAL(ADD_CACAO_BUILD, test x$add_vm_cacao != x)
-AM_CONDITIONAL(ADD_ZERO_BUILD,  test x$add_vm_zero  != x || test x$add_vm_shark != x)
-AM_CONDITIONAL(ADD_SHARK_BUILD, test x$add_vm_shark != x)
-AM_CONDITIONAL(BUILD_CACAO, test x$add_vm_cacao != x || test "x${WITH_CACAO}" = xyes)
-
-if test "x${WITH_CACAO}" = xyes && test "x${ADD_CACAO_BUILD_TRUE}" = x; then
-  AC_MSG_ERROR([additional vm is the default vm])
-fi
-if test "x${ZERO_BUILD_TRUE}" = x && test "x${ADD_ZERO_BUILD_TRUE}" = x; then
-  AC_MSG_ERROR([additional vm is the default vm])
-fi
-if test "x${USE_SYSTEM_CACAO_TRUE}" = x; then
-  AC_MSG_ERROR([cannot build with system cacao as additional vm])
-fi
-if test "x${ADD_ZERO_BUILD_TRUE}" = x && test "x${abs_top_builddir}" = "x${abs_top_srcdir}"; then
-  AC_MSG_ERROR([build of additional zero/shark VM requires build with srcdir != builddir])
-fi
-
 if test "x${ZERO_BUILD_TRUE}" = x || test "x${ADD_ZERO_BUILD_TRUE}" = x; then
   dnl Check for libffi headers and libraries.
   PKG_CHECK_MODULES(LIBFFI, libffi,[LIBFFI_FOUND=yes],[LIBFFI_FOUND=no])
--- a/ports/hotspot/src/cpu/zero/vm/globals_zero.hpp	Tue May 26 23:54:58 2009 +0200
+++ b/ports/hotspot/src/cpu/zero/vm/globals_zero.hpp	Wed May 27 17:57:45 2009 +0100
@@ -44,7 +44,6 @@
 define_pd_global(uintx, NewSize,              ScaleForWordSize(1024 * K));
 #endif // _LP64
 define_pd_global(intx,  InlineFrequencyCount, 100);
-define_pd_global(intx,  InlineSmallCode,      1000);
 define_pd_global(intx,  PreInflateSpin,       10);
 
 define_pd_global(intx,  StackYellowPages,     2);
--- a/ports/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp	Tue May 26 23:54:58 2009 +0200
+++ b/ports/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp	Wed May 27 17:57:45 2009 +0100
@@ -61,3 +61,6 @@
 define_pd_global(bool,  NeverActAsServerClassMachine, true );
 define_pd_global(uintx, DefaultMaxRAM,                1*G  );
 define_pd_global(bool,  CICompileOSR,                 true );
+
+/* Required for Shark on OpenJDK7 */
+define_pd_global(intx,  InlineSmallCode,      1000);