From 8ec8ebfa22126082b8405e6eeec70a7fde4cb9c8 Mon Sep 17 00:00:00 2001 From: clanger Date: Sat, 25 Jan 2020 06:34:42 +0000 Subject: [PATCH] 8233995: java.vm.vendor (and potentially other properties/fields) not correctly set in Windows/Hotspot build of OpenJDK8 Reviewed-by: andrew --- make/windows/build.make | 2 +- make/windows/makefiles/compile.make | 2 +- make/windows/makefiles/defs.make | 9 +++++++++ make/windows/makefiles/vm.make | 12 ++++++++---- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/make/windows/build.make b/make/windows/build.make index 725dccf10..b80b30e2d 100644 --- a/make/windows/build.make +++ b/make/windows/build.make @@ -280,7 +280,7 @@ $(variantDir)\local.make: checks @ echo HS_COMPANY=$(COMPANY_NAME) >> $@ @ echo HS_FILEDESC=$(HS_FILEDESC) >> $@ @ echo HOTSPOT_VM_DISTRO=$(HOTSPOT_VM_DISTRO) >> $@ - @ echo VENDOR=$(VENDOR) >> $@ + @ echo VENDOR=$(COMPANY_NAME) >> $@ @ echo VENDOR_URL=$(VENDOR_URL) >> $@ @ echo VENDOR_URL_BUG=$(VENDOR_URL_BUG) >> $@ @ echo VENDOR_URL_VM_BUG=$(VENDOR_URL_VM_BUG) >> $@ diff --git a/make/windows/makefiles/compile.make b/make/windows/makefiles/compile.make index f91d36827..80311a724 100644 --- a/make/windows/makefiles/compile.make +++ b/make/windows/makefiles/compile.make @@ -346,7 +346,7 @@ RC_FLAGS=/D "HS_VER=$(HS_VER)" \ /D "HS_BUILD_ID=$(HS_BUILD_ID)" \ /D "JDK_VER=$(JDK_VER)" \ /D "JDK_DOTVER=$(JDK_DOTVER)" \ - /D "HS_COMPANY=$(HS_COMPANY)" \ + /D "HS_COMPANY=$(COMPANY_NAME)" \ /D "HS_FILEDESC=$(HS_FILEDESC)" \ /D "HS_COPYRIGHT=$(HS_COPYRIGHT)" \ /D "HS_FNAME=$(HS_FNAME)" \ diff --git a/make/windows/makefiles/defs.make b/make/windows/makefiles/defs.make index fe4b6c72f..186d6e155 100644 --- a/make/windows/makefiles/defs.make +++ b/make/windows/makefiles/defs.make @@ -157,6 +157,15 @@ endif MAKE_ARGS += RM="$(RM)" MAKE_ARGS += ZIPEXE=$(ZIPEXE) +MAKE_ARGS += COMPANY_NAME="$(COMPANY_NAME)" +MAKE_ARGS += VENDOR_URL=$(VENDOR_URL) +MAKE_ARGS += VENDOR_URL_BUG=$(VENDOR_URL_BUG) +MAKE_ARGS += VENDOR_URL_VM_BUG=$(VENDOR_URL_VM_BUG) +ifneq ($(VERSION_CFLAGS),) + # transform syntax from -DProp='"Value"' to /D "Prop=\"Value\"" for Windows build + MAKE_ARGS += VERSION_CFLAGS="$(subst -D,/D \",$(subst ',,$(subst '$() $(),\"$() $(),$(subst ",\\\",$(VERSION_CFLAGS)))))\"" +endif + # On 32 bit windows we build server and client, on 64 bit just server. ifeq ($(JVM_VARIANTS),) ifeq ($(ARCH_DATA_MODEL), 32) diff --git a/make/windows/makefiles/vm.make b/make/windows/makefiles/vm.make index 142843481..be84d984e 100644 --- a/make/windows/makefiles/vm.make +++ b/make/windows/makefiles/vm.make @@ -62,10 +62,6 @@ CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_LIB_ARCH=\"$(HOTSPOT_LIB_ARCH)\"" CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_BUILD_TARGET=\"$(BUILD_FLAVOR)\"" CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_BUILD_USER=\"$(BuildUser)\"" CXX_FLAGS=$(CXX_FLAGS) /D "HOTSPOT_VM_DISTRO=\"$(HOTSPOT_VM_DISTRO)\"" -CXX_FLAGS=$(CXX_FLAGS) /D "VENDOR=\"$(COMPANY_NAME)\"" -CXX_FLAGS=$(CXX_FLAGS) /D "VENDOR_URL=\"$(VENDOR_URL)\"" -CXX_FLAGS=$(CXX_FLAGS) /D "VENDOR_URL_BUG=\"$(VENDOR_URL_BUG)\"" -CXX_FLAGS=$(CXX_FLAGS) /D "VENDOR_URL_VM_BUG=\"$(VENDOR_URL_VM_BUG)\"" CXX_FLAGS=$(CXX_FLAGS) $(CXX_INCLUDE_DIRS) @@ -209,6 +205,14 @@ bytecodeInterpreter.obj: $(WorkSpace)\src\share\vm\interpreter\bytecodeInterpret bytecodeInterpreterWithChecks.obj: ..\generated\jvmtifiles\bytecodeInterpreterWithChecks.cpp $(CXX) $(CXX_FLAGS) $(CXX_DONT_USE_PCH) /c ..\generated\jvmtifiles\bytecodeInterpreterWithChecks.cpp +#files compiled with version flags + +vm_version.obj: $(WorkSpace)\src\share\vm\runtime\vm_version.cpp + $(CXX) $(CXX_FLAGS) $(VERSION_CFLAGS) $(CXX_USE_PCH) /c $(WorkSpace)\src\share\vm\runtime\vm_version.cpp + +arguments.obj: $(WorkSpace)\src\share\vm\runtime\arguments.cpp + $(CXX) $(CXX_FLAGS) $(VERSION_CFLAGS) $(CXX_USE_PCH) /c $(WorkSpace)\src\share\vm\runtime\arguments.cpp + # Default rules for the Virtual Machine {$(COMMONSRC)\share\vm\c1}.cpp.obj:: $(CXX) $(CXX_FLAGS) $(CXX_USE_PCH) /c $< -- GitLab