make/windows/makefiles/defs.make

Sat, 25 Jan 2020 06:34:42 +0000

author
clanger
date
Sat, 25 Jan 2020 06:34:42 +0000
changeset 9823
147dfbe6ffa1
parent 6536
8a84bedf7173
child 9852
70aa912cebe5
child 9896
1b8c45b8216a
permissions
-rw-r--r--

8233995: java.vm.vendor (and potentially other properties/fields) not correctly set in Windows/Hotspot build of OpenJDK8
Reviewed-by: andrew

duke@435 1 #
zgu@4492 2 # Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
duke@435 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 4 #
duke@435 5 # This code is free software; you can redistribute it and/or modify it
duke@435 6 # under the terms of the GNU General Public License version 2 only, as
duke@435 7 # published by the Free Software Foundation.
duke@435 8 #
duke@435 9 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 12 # version 2 for more details (a copy is included in the LICENSE file that
duke@435 13 # accompanied this code).
duke@435 14 #
duke@435 15 # You should have received a copy of the GNU General Public License version
duke@435 16 # 2 along with this work; if not, write to the Free Software Foundation,
duke@435 17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 18 #
trims@1907 19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 # or visit www.oracle.com if you need additional information or have any
trims@1907 21 # questions.
drchase@4942 22 #
duke@435 23 #
duke@435 24
duke@435 25 # The common definitions for hotspot windows builds.
duke@435 26 # Include the top level defs.make under make directory instead of this one.
duke@435 27 # This file is included into make/defs.make.
tbell@862 28 # On windows it is only used to construct parameters for
kamg@526 29 # make/windows/build.make when make/Makefile is used to build VM.
duke@435 30
duke@435 31 SLASH_JAVA ?= J:
duke@435 32 PATH_SEP = ;
duke@435 33
duke@435 34 # Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name
prr@1953 35 ifeq ($(ARCH_DATA_MODEL),32)
prr@1953 36 ARCH_DATA_MODEL=32
prr@1953 37 PLATFORM=windows-i586
prr@1953 38 VM_PLATFORM=windows_i486
prr@1953 39 HS_ARCH=x86
prr@1953 40 MAKE_ARGS += ARCH=x86
prr@1953 41 MAKE_ARGS += BUILDARCH=i486
prr@1953 42 MAKE_ARGS += Platform_arch=x86
prr@1953 43 MAKE_ARGS += Platform_arch_model=x86_32
prr@1953 44 endif
prr@1953 45
duke@435 46 ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) x86),)
duke@435 47 ARCH_DATA_MODEL=32
duke@435 48 PLATFORM=windows-i586
duke@435 49 VM_PLATFORM=windows_i486
duke@435 50 HS_ARCH=x86
duke@435 51 MAKE_ARGS += ARCH=x86
duke@435 52 MAKE_ARGS += BUILDARCH=i486
duke@435 53 MAKE_ARGS += Platform_arch=x86
duke@435 54 MAKE_ARGS += Platform_arch_model=x86_32
duke@435 55 endif
duke@435 56
prr@1953 57 ifneq ($(ARCH_DATA_MODEL),32)
prr@1953 58 ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) ia64),)
prr@1953 59 ARCH_DATA_MODEL=64
prr@1953 60 PLATFORM=windows-ia64
prr@1953 61 VM_PLATFORM=windows_ia64
prr@1953 62 HS_ARCH=ia64
prr@1953 63 MAKE_ARGS += LP64=1
prr@1953 64 MAKE_ARGS += ARCH=ia64
prr@1953 65 MAKE_ARGS += BUILDARCH=ia64
prr@1953 66 MAKE_ARGS += Platform_arch=ia64
prr@1953 67 MAKE_ARGS += Platform_arch_model=ia64
prr@1953 68 endif
duke@435 69
prr@1840 70 # http://support.microsoft.com/kb/888731 : this can be either
prr@1840 71 # AMD64 for AMD, or EM64T for Intel chips.
prr@1953 72 ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) AMD64),)
prr@1953 73 ARCH_DATA_MODEL=64
prr@1953 74 PLATFORM=windows-amd64
prr@1953 75 VM_PLATFORM=windows_amd64
prr@1953 76 HS_ARCH=x86
prr@1953 77 MAKE_ARGS += LP64=1
prr@1953 78 MAKE_ARGS += ARCH=x86
prr@1953 79 MAKE_ARGS += BUILDARCH=amd64
prr@1953 80 MAKE_ARGS += Platform_arch=x86
prr@1953 81 MAKE_ARGS += Platform_arch_model=x86_64
prr@1953 82 endif
duke@435 83
prr@1912 84 ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) EM64T),)
prr@1953 85 ARCH_DATA_MODEL=64
prr@1953 86 PLATFORM=windows-amd64
prr@1953 87 VM_PLATFORM=windows_amd64
prr@1953 88 HS_ARCH=x86
prr@1953 89 MAKE_ARGS += LP64=1
prr@1953 90 MAKE_ARGS += ARCH=x86
prr@1953 91 MAKE_ARGS += BUILDARCH=amd64
prr@1953 92 MAKE_ARGS += Platform_arch=x86
prr@1953 93 MAKE_ARGS += Platform_arch_model=x86_64
prr@1953 94 endif
prr@1912 95
prr@1840 96 # NB later OS versions than 2003 may report "Intel64"
prr@1953 97 ifneq ($(shell $(ECHO) $(PROCESSOR_IDENTIFIER) | $(GREP) Intel64),)
prr@1953 98 ARCH_DATA_MODEL=64
prr@1953 99 PLATFORM=windows-amd64
prr@1953 100 VM_PLATFORM=windows_amd64
prr@1953 101 HS_ARCH=x86
prr@1953 102 MAKE_ARGS += LP64=1
prr@1953 103 MAKE_ARGS += ARCH=x86
prr@1953 104 MAKE_ARGS += BUILDARCH=amd64
prr@1953 105 MAKE_ARGS += Platform_arch=x86
prr@1953 106 MAKE_ARGS += Platform_arch_model=x86_64
prr@1953 107 endif
prr@1840 108 endif
prr@1840 109
dcubed@3724 110 # Full Debug Symbols has been enabled on Windows since JDK1.4.1 so
dcubed@3724 111 # there is no need for an "earlier than JDK7 check".
dcubed@3725 112 # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
dcubed@3725 113 # builds is enabled with debug info files ZIP'ed to save space. For
dcubed@3725 114 # BUILD_FLAVOR != product builds, FDS is always enabled, after all a
dcubed@3725 115 # debug build without debug info isn't very useful.
dcubed@3725 116 # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
dcubed@3725 117 #
dcubed@3725 118 # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
dcubed@3725 119 # disabled for a BUILD_FLAVOR == product build.
dcubed@3725 120 #
dcubed@3725 121 # Note: Use of a different variable name for the FDS override option
dcubed@3725 122 # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
dcubed@3725 123 # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
dcubed@3725 124 # in options via environment variables, use of distinct variables
dcubed@3725 125 # prevents strange behaviours. For example, in a BUILD_FLAVOR !=
dcubed@3725 126 # product build, the FULL_DEBUG_SYMBOLS environment variable will be
dcubed@3725 127 # 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
dcubed@3725 128 # the same variable name is used, then different values can be picked
dcubed@3725 129 # up by different parts of the build. Just to be clear, we only need
dcubed@3725 130 # two variable names because the incoming option value can be
dcubed@3725 131 # overridden in some situations, e.g., a BUILD_FLAVOR != product
dcubed@3725 132 # build.
dcubed@3724 133
dholmes@4243 134 # Due to the multiple sub-make processes that occur this logic gets
dholmes@4243 135 # executed multiple times. We reduce the noise by at least checking that
dholmes@4243 136 # BUILD_FLAVOR has been set.
dholmes@4243 137 ifneq ($(BUILD_FLAVOR),)
dholmes@4243 138 ifeq ($(BUILD_FLAVOR), product)
dholmes@4243 139 FULL_DEBUG_SYMBOLS ?= 1
dholmes@4243 140 ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
dholmes@4243 141 else
dholmes@4243 142 # debug variants always get Full Debug Symbols (if available)
dholmes@4243 143 ENABLE_FULL_DEBUG_SYMBOLS = 1
dholmes@4243 144 endif
dholmes@4243 145 _JUNK_ := $(shell \
dholmes@4243 146 echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
dholmes@4243 147 MAKE_ARGS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)
dholmes@4243 148
dholmes@4243 149 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
dholmes@4243 150 ZIP_DEBUGINFO_FILES ?= 1
dholmes@4243 151 else
dholmes@4243 152 ZIP_DEBUGINFO_FILES=0
dholmes@4243 153 endif
dholmes@4243 154 MAKE_ARGS += ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)
dcubed@3725 155 endif
dcubed@3724 156
dcubed@3724 157 MAKE_ARGS += RM="$(RM)"
dcubed@3724 158 MAKE_ARGS += ZIPEXE=$(ZIPEXE)
dcubed@3724 159
clanger@9823 160 MAKE_ARGS += COMPANY_NAME="$(COMPANY_NAME)"
clanger@9823 161 MAKE_ARGS += VENDOR_URL=$(VENDOR_URL)
clanger@9823 162 MAKE_ARGS += VENDOR_URL_BUG=$(VENDOR_URL_BUG)
clanger@9823 163 MAKE_ARGS += VENDOR_URL_VM_BUG=$(VENDOR_URL_VM_BUG)
clanger@9823 164 ifneq ($(VERSION_CFLAGS),)
clanger@9823 165 # transform syntax from -DProp='"Value"' to /D "Prop=\"Value\"" for Windows build
clanger@9823 166 MAKE_ARGS += VERSION_CFLAGS="$(subst -D,/D \",$(subst ',,$(subst '$() $(),\"$() $(),$(subst ",\\\",$(VERSION_CFLAGS)))))\""
clanger@9823 167 endif
clanger@9823 168
zgu@4492 169 # On 32 bit windows we build server and client, on 64 bit just server.
erikj@3649 170 ifeq ($(JVM_VARIANTS),)
erikj@3649 171 ifeq ($(ARCH_DATA_MODEL), 32)
jprovino@4165 172 JVM_VARIANTS:=client,server
erikj@3649 173 JVM_VARIANT_CLIENT:=true
erikj@3649 174 JVM_VARIANT_SERVER:=true
erikj@3649 175 else
erikj@3649 176 JVM_VARIANTS:=server
erikj@3649 177 JVM_VARIANT_SERVER:=true
erikj@3649 178 endif
erikj@3649 179 endif
erikj@3649 180
duke@435 181 JDK_INCLUDE_SUBDIR=win32
duke@435 182
never@3156 183 # Library suffix
never@3156 184 LIBRARY_SUFFIX=dll
never@3156 185
tbell@862 186 # HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined
duke@435 187 # and added to MAKE_ARGS list in $(GAMMADIR)/make/defs.make.
duke@435 188
duke@435 189 # next parameters are defined in $(GAMMADIR)/make/defs.make.
duke@435 190 MAKE_ARGS += JDK_MKTG_VERSION=$(JDK_MKTG_VERSION)
duke@435 191 MAKE_ARGS += JDK_MAJOR_VER=$(JDK_MAJOR_VERSION)
duke@435 192 MAKE_ARGS += JDK_MINOR_VER=$(JDK_MINOR_VERSION)
duke@435 193 MAKE_ARGS += JDK_MICRO_VER=$(JDK_MICRO_VERSION)
duke@435 194
duke@435 195 ifdef COOKED_JDK_UPDATE_VERSION
duke@435 196 MAKE_ARGS += JDK_UPDATE_VER=$(COOKED_JDK_UPDATE_VERSION)
duke@435 197 endif
duke@435 198
duke@435 199 # COOKED_BUILD_NUMBER should only be set if we have a numeric
duke@435 200 # build number. It must not be zero padded.
duke@435 201 ifdef COOKED_BUILD_NUMBER
duke@435 202 MAKE_ARGS += JDK_BUILD_NUMBER=$(COOKED_BUILD_NUMBER)
duke@435 203 endif
duke@435 204
sla@5046 205 NMAKE= MAKEFLAGS= MFLAGS= EXTRA_CFLAGS="$(EXTRA_CFLAGS)" nmake -NOLOGO
dcubed@3990 206 ifndef SYSTEM_UNAME
dcubed@3990 207 SYSTEM_UNAME := $(shell uname)
dcubed@3990 208 export SYSTEM_UNAME
dcubed@3990 209 endif
duke@435 210
duke@435 211 # Check for CYGWIN
dcubed@3990 212 ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
duke@435 213 USING_CYGWIN=true
duke@435 214 else
duke@435 215 USING_CYGWIN=false
duke@435 216 endif
dcubed@3990 217 # Check for MinGW
dcubed@3990 218 ifneq (,$(findstring MINGW,$(SYSTEM_UNAME)))
dcubed@3990 219 USING_MINGW=true
dcubed@3990 220 endif
duke@435 221
duke@435 222 # Windows wants particular paths due to nmake (must be after macros defined)
duke@435 223 # It is important that gnumake invokes nmake with C:\\...\\ formated
duke@435 224 # strings so that nmake gets C:\...\ style strings.
duke@435 225 # Check for CYGWIN
duke@435 226 ifeq ($(USING_CYGWIN), true)
duke@435 227 ABS_OUTPUTDIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(OUTPUTDIR)"))
duke@435 228 ABS_BOOTDIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(BOOTDIR)"))
duke@435 229 ABS_GAMMADIR := $(subst /,\\,$(shell /bin/cygpath -m -a "$(GAMMADIR)"))
jmasa@706 230 ABS_OS_MAKEFILE := $(shell /bin/cygpath -m -a "$(HS_MAKE_DIR)/$(OSNAME)")/build.make
dcubed@3990 231 else ifeq ($(USING_MINGW), true)
dcubed@3990 232 ABS_OUTPUTDIR := $(shell $(CD) $(OUTPUTDIR);$(PWD))
dcubed@3990 233 ABS_BOOTDIR := $(shell $(CD) $(BOOTDIR);$(PWD))
dcubed@3990 234 ABS_GAMMADIR := $(shell $(CD) $(GAMMADIR);$(PWD))
dcubed@3990 235 ABS_OS_MAKEFILE := $(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME);$(PWD))/build.make
dcubed@3990 236 else
dcubed@3990 237 ABS_OUTPUTDIR := $(subst /,\\,$(shell $(CD) $(OUTPUTDIR);$(PWD)))
dcubed@3990 238 ABS_BOOTDIR := $(subst /,\\,$(shell $(CD) $(BOOTDIR);$(PWD)))
dcubed@3990 239 ABS_GAMMADIR := $(subst /,\\,$(shell $(CD) $(GAMMADIR);$(PWD)))
dcubed@3990 240 ABS_OS_MAKEFILE := $(subst /,\\,$(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME);$(PWD))/build.make)
duke@435 241 endif
duke@435 242
duke@435 243 # Disable building SA on windows until we are sure
duke@435 244 # we want to release it. If we build it here,
duke@435 245 # the SDK makefiles will copy it over and put it into
duke@435 246 # the created image.
poonam@891 247 BUILD_WIN_SA = 1
duke@435 248 ifneq ($(ALT_BUILD_WIN_SA),)
duke@435 249 BUILD_WIN_SA = $(ALT_BUILD_WIN_SA)
duke@435 250 endif
duke@435 251
duke@435 252 ifeq ($(BUILD_WIN_SA), 1)
tbell@862 253 ifeq ($(ARCH),ia64)
duke@435 254 BUILD_WIN_SA = 0
duke@435 255 endif
duke@435 256 endif
duke@435 257
duke@435 258 EXPORT_SERVER_DIR = $(EXPORT_JRE_BIN_DIR)/server
kvn@3044 259 EXPORT_CLIENT_DIR = $(EXPORT_JRE_BIN_DIR)/client
kvn@3044 260
erikj@3649 261 ifeq ($(JVM_VARIANT_SERVER),true)
erikj@3649 262 EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
erikj@3649 263 EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.$(LIBRARY_SUFFIX)
dcubed@3726 264 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
dcubed@3726 265 ifeq ($(ZIP_DEBUGINFO_FILES),1)
dcubed@3726 266 EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.diz
dcubed@3726 267 else
dcubed@3726 268 EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.pdb
dcubed@3726 269 EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.map
dcubed@3726 270 endif
dcubed@3724 271 endif
dcubed@3724 272 endif
erikj@3649 273 ifeq ($(JVM_VARIANT_CLIENT),true)
duke@435 274 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
never@3156 275 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.$(LIBRARY_SUFFIX)
dcubed@3724 276 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
dcubed@3724 277 ifeq ($(ZIP_DEBUGINFO_FILES),1)
dcubed@3724 278 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.diz
dcubed@3724 279 else
dcubed@3724 280 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.pdb
dcubed@3724 281 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.map
dcubed@3724 282 endif
dcubed@3724 283 endif
erikj@3649 284 endif
duke@435 285
dholmes@6536 286 EXPORT_LIST += $(EXPORT_LIB_DIR)/jvm.lib
dholmes@6536 287
duke@435 288 ifeq ($(BUILD_WIN_SA), 1)
never@3156 289 EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.$(LIBRARY_SUFFIX)
dcubed@3724 290 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
dcubed@3724 291 ifeq ($(ZIP_DEBUGINFO_FILES),1)
dcubed@3724 292 EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.diz
dcubed@3724 293 else
dcubed@3724 294 EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.pdb
dcubed@3724 295 EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.map
dcubed@3724 296 endif
dcubed@3724 297 endif
tbell@862 298 EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar
duke@435 299 # Must pass this down to nmake.
duke@435 300 MAKE_ARGS += BUILD_WIN_SA=1
duke@435 301 endif
erikj@3600 302
drchase@4942 303 # Propagate compiler and tools paths from configure to nmake.
erikj@3600 304 # Need to make sure they contain \\ and not /.
erikj@3600 305 ifneq ($(SPEC),)
erikj@3600 306 ifeq ($(USING_CYGWIN), true)
erikj@3600 307 MAKE_ARGS += CXX="$(subst /,\\,$(shell /bin/cygpath -s -m -a $(CXX)))"
erikj@3600 308 MAKE_ARGS += LD="$(subst /,\\,$(shell /bin/cygpath -s -m -a $(LD)))"
erikj@3600 309 MAKE_ARGS += RC="$(subst /,\\,$(shell /bin/cygpath -s -m -a $(RC)))"
erikj@3600 310 MAKE_ARGS += MT="$(subst /,\\,$(shell /bin/cygpath -s -m -a $(MT)))"
erikj@3600 311 else
erikj@3600 312 MAKE_ARGS += CXX="$(subst /,\\,$(CXX))"
erikj@3600 313 MAKE_ARGS += LD="$(subst /,\\,$(LD))"
erikj@3600 314 MAKE_ARGS += RC="$(subst /,\\,$(RC))"
erikj@3600 315 MAKE_ARGS += MT="$(subst /,\\,$(MT))"
erikj@3600 316 endif
erikj@3600 317 endif

mercurial