8043541: 'fastdebug' is printed twice in java -version
authoramurillo
Tue, 24 Jun 2014 12:27:51 -0700
changeset 25337 31eeda0060a9
parent 25336 d35d298197f9
child 25349 7247a4c76872
child 25354 f6762819b488
child 25368 506eef1dc714
child 25369 3a81a26b7038
8043541: 'fastdebug' is printed twice in java -version Reviewed-by: dholmes, dcubed, jcoomes
hotspot/make/aix/makefiles/vm.make
hotspot/make/bsd/makefiles/vm.make
hotspot/make/defs.make
hotspot/make/linux/makefiles/vm.make
hotspot/make/solaris/makefiles/vm.make
hotspot/make/windows/projectfiles/common/Makefile
hotspot/src/share/vm/runtime/vm_version.cpp
--- a/hotspot/make/aix/makefiles/vm.make	Tue Jun 24 07:10:06 2014 -0700
+++ b/hotspot/make/aix/makefiles/vm.make	Tue Jun 24 12:27:51 2014 -0700
@@ -82,14 +82,12 @@
 		-DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""  \
 		$(JDK_VER_DEFS)
 HS_LIB_ARCH   = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
-BUILD_TARGET  = -DHOTSPOT_BUILD_TARGET="\"$(TARGET)\""
 BUILD_USER    = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
 VM_DISTRO     = -DHOTSPOT_VM_DISTRO="\"$(HOTSPOT_VM_DISTRO)\""
 
 CXXFLAGS =           \
   ${SYSDEFS}         \
   ${INCLUDES}        \
-  ${BUILD_TARGET}    \
   ${BUILD_USER}      \
   ${HS_LIB_ARCH}     \
   ${VM_DISTRO}
--- a/hotspot/make/bsd/makefiles/vm.make	Tue Jun 24 07:10:06 2014 -0700
+++ b/hotspot/make/bsd/makefiles/vm.make	Tue Jun 24 12:27:51 2014 -0700
@@ -81,14 +81,12 @@
 		-DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""  \
 		$(JDK_VER_DEFS)
 HS_LIB_ARCH   = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
-BUILD_TARGET  = -DHOTSPOT_BUILD_TARGET="\"$(TARGET)\""
 BUILD_USER    = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
 VM_DISTRO     = -DHOTSPOT_VM_DISTRO="\"$(HOTSPOT_VM_DISTRO)\""
 
 CXXFLAGS =           \
   ${SYSDEFS}         \
   ${INCLUDES}        \
-  ${BUILD_TARGET}    \
   ${BUILD_USER}      \
   ${HS_LIB_ARCH}     \
   ${VM_DISTRO}
--- a/hotspot/make/defs.make	Tue Jun 24 07:10:06 2014 -0700
+++ b/hotspot/make/defs.make	Tue Jun 24 12:27:51 2014 -0700
@@ -135,8 +135,12 @@
 ifeq ($(JDK_MKTG_VERSION),)
   JDK_MKTG_VERSION=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
 endif
-ifeq ($(JDK_VERSION),)
-  JDK_VERSION=$(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
+ifeq ($(JDK_VERSION),)  
+  ifeq ($(BUILD_FLAVOR), product)
+    JDK_VERSION=$(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
+  else
+    JDK_VERSION=$(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)-$(BUILD_FLAVOR)
+  endif
 endif
 ifeq ($(FULL_VERSION),)
   FULL_VERSION="$(JDK_VERSION)"
--- a/hotspot/make/linux/makefiles/vm.make	Tue Jun 24 07:10:06 2014 -0700
+++ b/hotspot/make/linux/makefiles/vm.make	Tue Jun 24 12:27:51 2014 -0700
@@ -82,14 +82,12 @@
 		-DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""  \
 		$(JDK_VER_DEFS)
 HS_LIB_ARCH   = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
-BUILD_TARGET  = -DHOTSPOT_BUILD_TARGET="\"$(TARGET)\""
 BUILD_USER    = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
 VM_DISTRO     = -DHOTSPOT_VM_DISTRO="\"$(HOTSPOT_VM_DISTRO)\""
 
 CXXFLAGS =           \
   ${SYSDEFS}         \
   ${INCLUDES}        \
-  ${BUILD_TARGET}    \
   ${BUILD_USER}      \
   ${HS_LIB_ARCH}     \
   ${VM_DISTRO}
--- a/hotspot/make/solaris/makefiles/vm.make	Tue Jun 24 07:10:06 2014 -0700
+++ b/hotspot/make/solaris/makefiles/vm.make	Tue Jun 24 12:27:51 2014 -0700
@@ -77,14 +77,12 @@
 		-DJRE_RELEASE_VERSION="\"$(JRE_RELEASE_VER)\""  \
 		$(JDK_VER_DEFS)
 HS_LIB_ARCH   = -DHOTSPOT_LIB_ARCH=\"$(LIBARCH)\"
-BUILD_TARGET  = -DHOTSPOT_BUILD_TARGET="\"$(TARGET)\""
 BUILD_USER    = -DHOTSPOT_BUILD_USER="\"$(HOTSPOT_BUILD_USER)\""
 VM_DISTRO     = -DHOTSPOT_VM_DISTRO="\"$(HOTSPOT_VM_DISTRO)\""
 
 CXXFLAGS =           \
   ${SYSDEFS}         \
   ${INCLUDES}        \
-  ${BUILD_TARGET}    \
   ${BUILD_USER}      \
   ${HS_LIB_ARCH}     \
   ${VM_DISTRO}
--- a/hotspot/make/windows/projectfiles/common/Makefile	Tue Jun 24 07:10:06 2014 -0700
+++ b/hotspot/make/windows/projectfiles/common/Makefile	Tue Jun 24 12:27:51 2014 -0700
@@ -116,7 +116,7 @@
 JDK_MINOR_VERSION="\\\"$(JDK_MINOR_VER)\\\""
 JDK_MICRO_VERSION="\\\"$(JDK_MICRO_VER)\\\""
 
-ReleaseOptions = -define HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) -define JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) -define HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO) -define JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION) -define JDK_MINOR_VERSION=$(JDK_MINOR_VERSION) -define JDK_MICRO_VERSION=$(JDK_MICRO_VERSION) -define JDK_BUILD_NUMBER=$(JDK_BUILD_NUMBER)
+ReleaseOptions = -define HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) -define JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) -define HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO) -define JDK_MAJOR_VERSION=$(JDK_MAJOR_VERSION) -define JDK_MINOR_VERSION=$(JDK_MINOR_VERSION) -define JDK_MICRO_VERSION=$(JDK_MICRO_VERSION) -define JDK_BUILD_NUMBER=$(JDK_BUILD_NUMBER) -define VISUAL_STUDIO_BUILD=true
 ProjectCreatorIDEOptions = $(ProjectCreatorIDEOptions) $(ReleaseOptions)
 
 $(HOTSPOTBUILDSPACE)/$(ProjectFile): $(HOTSPOTBUILDSPACE)/classes/ProjectCreator.class
--- a/hotspot/src/share/vm/runtime/vm_version.cpp	Tue Jun 24 07:10:06 2014 -0700
+++ b/hotspot/src/share/vm/runtime/vm_version.cpp	Tue Jun 24 12:27:51 2014 -0700
@@ -72,14 +72,16 @@
 #ifndef JRE_RELEASE_VERSION
   #error JRE_RELEASE_VERSION must be defined
 #endif
-#ifndef HOTSPOT_BUILD_TARGET
-  #error HOTSPOT_BUILD_TARGET must be defined
-#endif
 
-#ifdef PRODUCT
+// NOTE: Builds within Visual Studio do not define the build target in
+//       HOTSPOT_RELEASE_VERSION, so it must be done here
+#if defined(VISUAL_STUDIO_BUILD) && !defined(PRODUCT)
+  #ifndef HOTSPOT_BUILD_TARGET
+    #error HOTSPOT_BUILD_TARGET must be defined
+  #endif
+  #define VM_RELEASE HOTSPOT_RELEASE_VERSION "-" HOTSPOT_BUILD_TARGET
+#else
   #define VM_RELEASE HOTSPOT_RELEASE_VERSION
-#else
-  #define VM_RELEASE HOTSPOT_RELEASE_VERSION "-" HOTSPOT_BUILD_TARGET
 #endif
 
 // HOTSPOT_RELEASE_VERSION follows the JDK release version naming convention