changeset 5108:d72dd66fdc3d ppc-aix-port-b01

Re-enable the 'gamma' test at the end of the HotSpot build, but only for HotSpot based bootstrap JDKs. The 'gamma' launcher only works with HotSpot based bootstrap JDKs because it uses the freshly build libjvm.so in the context and together with the class library of the boot JDK which was used to build it. This combination will not work for other JDKs.
author simonis
date Mon, 23 Jul 2012 14:32:08 +0200
parents 60d97665b9e5
children 0fac608b90e1
files make/linux/Makefile make/linux/makefiles/buildtree.make
diffstat 2 files changed, 14 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/make/linux/Makefile	Thu Jul 19 14:07:13 2012 +0200
+++ b/make/linux/Makefile	Mon Jul 23 14:32:08 2012 +0200
@@ -288,8 +288,7 @@
 
 $(TARGETS_C2):  $(SUBDIRS_C2)
 	cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS)
-# PPC port: skip gamma test until we get a HotSpot which has basic functionality
-#	cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && ./test_gamma
+	cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && ./test_gamma
 ifdef INSTALL
 	cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) install
 endif
@@ -310,8 +309,7 @@
 
 $(TARGETS_CORE):  $(SUBDIRS_CORE)
 	cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS)
-# PPC port: skip gamma test until we get a HotSpot which has basic functionality
-#	cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && ./test_gamma
+	cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && ./test_gamma
 ifdef INSTALL
 	cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install
 endif
--- a/make/linux/makefiles/buildtree.make	Thu Jul 19 14:07:13 2012 +0200
+++ b/make/linux/makefiles/buildtree.make	Mon Jul 23 14:32:08 2012 +0200
@@ -383,6 +383,7 @@
 DATA_MODE/sparcv9 = 64
 DATA_MODE/amd64   = 64
 DATA_MODE/ia64    = 64
+DATA_MODE/ppc64   = 64
 DATA_MODE/zero    = $(ARCH_DATA_MODEL)
 
 JAVA_FLAG/32 = -d32
@@ -391,6 +392,9 @@
 WRONG_DATA_MODE_MSG = \
 	echo "JAVA_HOME must point to a $(DATA_MODE)-bit OpenJDK."
 
+WRONG_JDK_MSG = \
+	echo "JAVA_HOME must point to a HotSpot based JDK \\\(genuine Sun/Oracle or OpenJDK\\\)."
+
 CROSS_COMPILING_MSG = \
 	echo "Cross compiling for ARCH $(CROSS_COMPILE_ARCH), skipping gamma run."
 
@@ -427,6 +431,14 @@
 	echo "  exit 0"; \
 	echo "fi"; \
 	echo ""; \
+	echo "# 'gamma' only runs with HotSpot based JDKs (genuine Sun/Oracle or OpenJDK)"; \
+	echo ""; \
+	echo "\$${JAVA_HOME}/bin/java $(JAVA_FLAG) -version 2>&1 | grep -E 'OpenJDK|HotSpot' > /dev/null"; \
+	echo "if [ \$$? -ne 0 ]; then "; \
+	echo "  $(WRONG_JDK_MSG)"; \
+	echo "  exit 0"; \
+	echo "fi"; \
+	echo ""; \
 	echo "# Use gamma_g if it exists"; \
 	echo ""; \
 	echo "GAMMA_PROG=gamma"; \