make/defs.make

Tue, 29 Jul 2014 13:56:29 +0200

author
thartmann
date
Tue, 29 Jul 2014 13:56:29 +0200
changeset 7002
a073be2ce5c2
parent 6472
2b8e28fdf503
child 6876
710a3c8b516e
child 7598
ddce0b7cee93
permissions
-rw-r--r--

8049043: Load variable through a pointer of an incompatible type in hotspot/src/share/vm/runtime/sharedRuntimeMath.hpp
Summary: Fixed parfait warnings caused by __HI and __LO macros in sharedRuntimeMath.hpp by using a union.
Reviewed-by: kvn

duke@435 1 #
sla@5237 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.
sla@5237 22 #
duke@435 23 #
duke@435 24
jprovino@4165 25 # The common definitions for hotspot builds.
jprovino@4165 26
jprovino@4165 27 # Optionally include SPEC file generated by configure.
jprovino@4165 28 ifneq ($(SPEC),)
jprovino@4165 29 include $(SPEC)
jprovino@4165 30 endif
jprovino@4165 31
jprovino@4165 32 # Directory paths and user name
jprovino@4165 33 # Unless GAMMADIR is set on the command line, search upward from
jprovino@4165 34 # the current directory for a parent directory containing "src/share/vm".
jprovino@4165 35 # If that fails, look for $GAMMADIR in the environment.
jprovino@4165 36 # When the tree of subdirs is built, this setting is stored in each flags.make.
jprovino@4165 37 GAMMADIR := $(shell until ([ -d dev ]&&echo $${GAMMADIR:-/GAMMADIR/}) || ([ -d src/share/vm ]&&pwd); do cd ..; done)
jprovino@4165 38 HS_SRC_DIR=$(GAMMADIR)/src
jprovino@4165 39 HS_MAKE_DIR=$(GAMMADIR)/make
jprovino@4165 40 HS_BUILD_DIR=$(GAMMADIR)/build
jprovino@4165 41
jprovino@4165 42 ifeq ($(USER),)
jprovino@4165 43 USER=$(USERNAME)
jprovino@4165 44 endif
jprovino@4165 45
bpittore@4028 46 ifeq ($(HS_ALT_MAKE),)
bpittore@4028 47 ifneq ($(OPENJDK),true)
bpittore@4028 48 HS_ALT_MAKE=$(GAMMADIR)/make/closed
bpittore@4028 49 else
bpittore@4028 50 HS_ALT_MAKE=NO_SUCH_PATH
bpittore@4028 51 endif
bpittore@4028 52 endif
bpittore@4028 53
jprovino@4165 54 #
jprovino@4165 55 # Include alternate defs.make if it exists
jprovino@4165 56 #
jprovino@4165 57 -include $(HS_ALT_MAKE)/defs.make
erikj@3600 58
duke@435 59 # Default to verbose build logs (show all compile lines):
duke@435 60 MAKE_VERBOSE=y
duke@435 61
duke@435 62 # Make macros for install files or preparing targets
duke@435 63 CD=cd
duke@435 64 CP=cp
duke@435 65 ECHO=echo
duke@435 66 GREP=grep
duke@435 67 MKDIR=mkdir
duke@435 68 MV=mv
duke@435 69 PWD=pwd
duke@435 70 RM=rm -f
duke@435 71 SED=sed
duke@435 72 TAR=tar
duke@435 73 ZIPEXE=zip
duke@435 74
duke@435 75 define install-file
duke@435 76 @$(MKDIR) -p $(@D)
duke@435 77 @$(RM) $@
duke@435 78 $(CP) $< $@
duke@435 79 endef
dcubed@5898 80
dcubed@5898 81 # MacOS X strongly discourages 'cp -r' and provides 'cp -R' instead.
dcubed@5898 82 # May need to have a MacOS X specific definition of install-dir
dcubed@5898 83 # sometime in the future.
dcubed@5898 84 define install-dir
dcubed@5898 85 @$(MKDIR) -p $(@D)
dcubed@5898 86 @$(RM) -r $@
dcubed@5898 87 $(CP) -r $< $@
dcubed@5898 88 endef
dcubed@5898 89
duke@435 90 define prep-target
duke@435 91 @$(MKDIR) -p $(@D)
duke@435 92 @$(RM) $@
duke@435 93 endef
duke@435 94
erikj@3649 95 # Default values for JVM_VARIANT* variables if configure hasn't set
erikj@3649 96 # it already.
erikj@3649 97 ifeq ($(JVM_VARIANTS),)
erikj@3649 98 ifeq ($(ZERO_BUILD), true)
erikj@3649 99 ifeq ($(SHARK_BUILD), true)
erikj@3649 100 JVM_VARIANTS:=zeroshark
erikj@3649 101 JVM_VARIANT_ZEROSHARK:=true
erikj@3649 102 else
erikj@3649 103 JVM_VARIANTS:=zero
erikj@3649 104 JVM_VARIANT_ZERO:=true
erikj@3649 105 endif
erikj@3649 106 else
erikj@3649 107 # A default is needed
erikj@3649 108 ifeq ($(BUILD_CLIENT_ONLY), true)
erikj@3649 109 JVM_VARIANTS:=client
erikj@3649 110 JVM_VARIANT_CLIENT:=true
erikj@3649 111 endif
erikj@3649 112 # Further defaults are platform and arch specific
erikj@3649 113 endif
erikj@3649 114 endif
erikj@3649 115
duke@435 116 # hotspot version definitions
duke@435 117 include $(GAMMADIR)/make/hotspot_version
duke@435 118
duke@435 119 # Java versions needed
duke@435 120 ifeq ($(PREVIOUS_JDK_VERSION),)
duke@435 121 PREVIOUS_JDK_VERSION=$(JDK_PREVIOUS_VERSION)
duke@435 122 endif
duke@435 123 ifeq ($(JDK_MAJOR_VERSION),)
duke@435 124 JDK_MAJOR_VERSION=$(JDK_MAJOR_VER)
duke@435 125 endif
duke@435 126 ifeq ($(JDK_MINOR_VERSION),)
duke@435 127 JDK_MINOR_VERSION=$(JDK_MINOR_VER)
duke@435 128 endif
duke@435 129 ifeq ($(JDK_MICRO_VERSION),)
duke@435 130 JDK_MICRO_VERSION=$(JDK_MICRO_VER)
duke@435 131 endif
duke@435 132 ifeq ($(JDK_MKTG_VERSION),)
duke@435 133 JDK_MKTG_VERSION=$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
duke@435 134 endif
duke@435 135 ifeq ($(JDK_VERSION),)
duke@435 136 JDK_VERSION=$(JDK_MAJOR_VERSION).$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION)
duke@435 137 endif
duke@435 138 ifeq ($(FULL_VERSION),)
duke@435 139 FULL_VERSION="$(JDK_VERSION)"
duke@435 140 endif
duke@435 141
duke@435 142 # FULL_VERSION is only used to define JRE_RELEASE_VERSION which is used
duke@435 143 # as JRE version in VM -Xinternalversion output.
duke@435 144 ifndef JRE_RELEASE_VERSION
duke@435 145 JRE_RELEASE_VERSION=$(FULL_VERSION)
duke@435 146 endif
duke@435 147
duke@435 148 ifndef HOTSPOT_RELEASE_VERSION
duke@435 149 HOTSPOT_RELEASE_VERSION=$(HS_MAJOR_VER).$(HS_MINOR_VER)-b$(HS_BUILD_NUMBER)
duke@435 150 endif
duke@435 151
duke@435 152 ifdef HOTSPOT_BUILD_VERSION
ohair@2319 153 # specified in command line
duke@435 154 else
ohair@2319 155 ifdef COOKED_BUILD_NUMBER
ohair@2319 156 # JRE build
ohair@2319 157 HOTSPOT_BUILD_VERSION=
duke@435 158 else
ohair@2319 159 ifdef USER_RELEASE_SUFFIX
ohair@2319 160 HOTSPOT_BUILD_VERSION=internal-$(USER_RELEASE_SUFFIX)
duke@435 161 else
duke@435 162 HOTSPOT_BUILD_VERSION=internal
duke@435 163 endif
duke@435 164 endif
duke@435 165 endif
duke@435 166
duke@435 167 # Windows should have OS predefined
duke@435 168 ifeq ($(OS),)
duke@435 169 OS := $(shell uname -s)
never@3156 170 ifneq ($(findstring BSD,$(OS)),)
never@3156 171 OS=bsd
never@3156 172 endif
never@3156 173 ifeq ($(OS), Darwin)
never@3156 174 OS=bsd
never@3156 175 endif
duke@435 176 HOST := $(shell uname -n)
duke@435 177 endif
duke@435 178
simonis@6464 179 # If not SunOS, not Linux not BSD and not AIX, assume Windows
duke@435 180 ifneq ($(OS), Linux)
duke@435 181 ifneq ($(OS), SunOS)
never@3156 182 ifneq ($(OS), bsd)
simonis@6464 183 ifneq ($(OS), AIX)
simonis@6464 184 OSNAME=windows
simonis@6464 185 else
simonis@6464 186 OSNAME=aix
simonis@6464 187 endif
never@3156 188 else
never@3156 189 OSNAME=bsd
never@3156 190 endif
duke@435 191 else
duke@435 192 OSNAME=solaris
duke@435 193 endif
duke@435 194 else
duke@435 195 OSNAME=linux
duke@435 196 endif
duke@435 197
duke@435 198 # Determinations of default make arguments and platform specific settings
duke@435 199 MAKE_ARGS=
duke@435 200
duke@435 201 # ARCH_DATA_MODEL==64 is equivalent to LP64=1
duke@435 202 ifeq ($(ARCH_DATA_MODEL), 64)
duke@435 203 ifndef LP64
duke@435 204 LP64 := 1
duke@435 205 endif
duke@435 206 endif
duke@435 207
duke@435 208 # Defaults set for product build
duke@435 209 EXPORT_SUBDIR=
duke@435 210
duke@435 211 # Change default /java path if requested
duke@435 212 ifneq ($(ALT_SLASH_JAVA),)
duke@435 213 SLASH_JAVA=$(ALT_SLASH_JAVA)
duke@435 214 endif
duke@435 215
duke@435 216 # Default OUTPUTDIR
duke@435 217 OUTPUTDIR=$(HS_BUILD_DIR)/$(OSNAME)
duke@435 218 ifneq ($(ALT_OUTPUTDIR),)
duke@435 219 OUTPUTDIR=$(ALT_OUTPUTDIR)
duke@435 220 endif
duke@435 221
duke@435 222 # Find latest promoted JDK area
duke@435 223 JDK_IMPORT_PATH=$(SLASH_JAVA)/re/j2se/$(JDK_VERSION)/promoted/latest/binaries/$(PLATFORM)
duke@435 224 ifneq ($(ALT_JDK_IMPORT_PATH),)
duke@435 225 JDK_IMPORT_PATH=$(ALT_JDK_IMPORT_PATH)
duke@435 226 endif
duke@435 227
dholmes@2544 228 # Other parts of JDK build may require an import JDK that can be executed
dholmes@2544 229 # on the build host. For cross-compile builds we also need an import JDK
dholmes@2544 230 # that matches the target arch, so for that we set ALT_JDK_TARGET_IMPORT_PATH
dholmes@2544 231 ifneq ($(ALT_JDK_TARGET_IMPORT_PATH),)
dholmes@2544 232 JDK_IMPORT_PATH=$(ALT_JDK_TARGET_IMPORT_PATH)
dholmes@2544 233 endif
dholmes@2544 234
duke@435 235 # Find JDK used for javac compiles
duke@435 236 BOOTDIR=$(SLASH_JAVA)/re/j2se/$(PREVIOUS_JDK_VERSION)/latest/binaries/$(PLATFORM)
duke@435 237 ifneq ($(ALT_BOOTDIR),)
duke@435 238 BOOTDIR=$(ALT_BOOTDIR)
duke@435 239 endif
duke@435 240
phh@3492 241 # Select name of the export directory and honor ALT overrides
phh@3492 242 EXPORT_PATH=$(OUTPUTDIR)/export-$(PLATFORM)$(EXPORT_SUBDIR)
phh@3492 243 ifneq ($(ALT_EXPORT_PATH),)
phh@3492 244 EXPORT_PATH=$(ALT_EXPORT_PATH)
phh@3492 245 endif
phh@3492 246
phh@3492 247 # Default jdk image if one is created for you with create_jdk
phh@3492 248 JDK_IMAGE_DIR=$(OUTPUTDIR)/jdk-$(PLATFORM)
twisti@3567 249 ifneq ($(ALT_JDK_IMAGE_DIR),)
twisti@3567 250 JDK_IMAGE_DIR=$(ALT_JDK_IMAGE_DIR)
twisti@3567 251 endif
phh@3492 252
sla@5237 253 # The platform dependent defs.make defines platform specific variable such
duke@435 254 # as ARCH, EXPORT_LIST etc. We must place the include here after BOOTDIR is defined.
kamg@526 255 include $(GAMMADIR)/make/$(OSNAME)/makefiles/defs.make
duke@435 256
duke@435 257 # We are trying to put platform specific defintions
kamg@526 258 # files to make/$(OSNAME)/makefiles dictory. However
duke@435 259 # some definitions are common for both linux and solaris,
duke@435 260 # so we put them here.
duke@435 261 ifneq ($(OSNAME),windows)
kamg@526 262 ABS_OUTPUTDIR := $(shell mkdir -p $(OUTPUTDIR); $(CD) $(OUTPUTDIR); $(PWD))
duke@435 263 ABS_BOOTDIR := $(shell $(CD) $(BOOTDIR); $(PWD))
duke@435 264 ABS_GAMMADIR := $(shell $(CD) $(GAMMADIR); $(PWD))
kamg@526 265 ABS_OS_MAKEFILE := $(shell $(CD) $(HS_MAKE_DIR)/$(OSNAME); $(PWD))/Makefile
duke@435 266
duke@435 267 # uname, HotSpot source directory, build directory and JDK use different names
duke@435 268 # for CPU architectures.
duke@435 269 # ARCH - uname output
duke@435 270 # SRCARCH - where to find HotSpot cpu and os_cpu source files
duke@435 271 # BUILDARCH - build directory
duke@435 272 # LIBARCH - directory name in JDK/JRE
duke@435 273
duke@435 274 # Use uname output for SRCARCH, but deal with platform differences. If ARCH
sla@5237 275 # is not explicitly listed below, it is treated as x86.
simonis@6452 276 SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 arm ppc ppc64 zero,$(ARCH)))
duke@435 277 ARCH/ = x86
duke@435 278 ARCH/sparc = sparc
duke@435 279 ARCH/sparc64= sparc
duke@435 280 ARCH/ia64 = ia64
duke@435 281 ARCH/amd64 = x86
duke@435 282 ARCH/x86_64 = x86
bobv@2036 283 ARCH/ppc64 = ppc
bobv@2036 284 ARCH/ppc = ppc
bobv@2036 285 ARCH/arm = arm
never@1445 286 ARCH/zero = zero
duke@435 287
duke@435 288 # BUILDARCH is usually the same as SRCARCH, except for sparcv9
duke@435 289 BUILDARCH = $(SRCARCH)
duke@435 290 ifeq ($(BUILDARCH), x86)
duke@435 291 ifdef LP64
duke@435 292 BUILDARCH = amd64
duke@435 293 else
duke@435 294 BUILDARCH = i486
duke@435 295 endif
duke@435 296 endif
duke@435 297 ifeq ($(BUILDARCH), sparc)
duke@435 298 ifdef LP64
duke@435 299 BUILDARCH = sparcv9
duke@435 300 endif
duke@435 301 endif
simonis@6452 302 ifeq ($(BUILDARCH), ppc)
simonis@6452 303 ifdef LP64
simonis@6452 304 BUILDARCH = ppc64
simonis@6452 305 endif
simonis@6452 306 endif
duke@435 307
duke@435 308 # LIBARCH is 1:1 mapping from BUILDARCH
duke@435 309 LIBARCH = $(LIBARCH/$(BUILDARCH))
duke@435 310 LIBARCH/i486 = i386
duke@435 311 LIBARCH/amd64 = amd64
duke@435 312 LIBARCH/sparc = sparc
duke@435 313 LIBARCH/sparcv9 = sparcv9
duke@435 314 LIBARCH/ia64 = ia64
simonis@6452 315 LIBARCH/ppc64 = ppc64
bobv@2036 316 LIBARCH/ppc = ppc
bobv@2036 317 LIBARCH/arm = arm
never@1445 318 LIBARCH/zero = $(ZERO_LIBARCH)
duke@435 319
simonis@6452 320 LP64_ARCH = sparcv9 amd64 ia64 ppc64 zero
duke@435 321 endif
duke@435 322
duke@435 323 # Required make macro settings for all platforms
twisti@4780 324 MAKE_ARGS += BOOTDIR=$(ABS_BOOTDIR)
xlu@663 325 MAKE_ARGS += OUTPUTDIR=$(ABS_OUTPUTDIR)
duke@435 326 MAKE_ARGS += GAMMADIR=$(ABS_GAMMADIR)
duke@435 327 MAKE_ARGS += MAKE_VERBOSE=$(MAKE_VERBOSE)
duke@435 328 MAKE_ARGS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION)
duke@435 329 MAKE_ARGS += JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
duke@435 330
duke@435 331 # Pass HOTSPOT_BUILD_VERSION as argument to OS specific Makefile
duke@435 332 # to overwrite the default definition since OS specific Makefile also
duke@435 333 # includes this make/defs.make file.
duke@435 334 MAKE_ARGS += HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION)
duke@435 335
duke@435 336 # Various export sub directories
duke@435 337 EXPORT_INCLUDE_DIR = $(EXPORT_PATH)/include
duke@435 338 EXPORT_DOCS_DIR = $(EXPORT_PATH)/docs
duke@435 339 EXPORT_LIB_DIR = $(EXPORT_PATH)/lib
duke@435 340 EXPORT_JRE_DIR = $(EXPORT_PATH)/jre
duke@435 341 EXPORT_JRE_BIN_DIR = $(EXPORT_JRE_DIR)/bin
duke@435 342 EXPORT_JRE_LIB_DIR = $(EXPORT_JRE_DIR)/lib
duke@435 343 EXPORT_JRE_LIB_ARCH_DIR = $(EXPORT_JRE_LIB_DIR)/$(LIBARCH)
duke@435 344
dcubed@3202 345 # non-universal macosx builds need to appear universal
dcubed@3202 346 ifeq ($(OS_VENDOR), Darwin)
dcubed@3202 347 ifneq ($(MACOSX_UNIVERSAL), true)
dcubed@3202 348 EXPORT_JRE_LIB_ARCH_DIR = $(EXPORT_JRE_LIB_DIR)
dcubed@3202 349 endif
dcubed@3202 350 endif
dcubed@3202 351
duke@435 352 # Common export list of files
duke@435 353 EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jvmti.h
dcubed@1619 354 EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jvmticmlr.h
duke@435 355 EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jni.h
duke@435 356 EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/$(JDK_INCLUDE_SUBDIR)/jni_md.h
duke@435 357 EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jmm.h
phh@3427 358
sla@5237 359 .PHONY: $(HS_ALT_MAKE)/defs.make
bpittore@4028 360

mercurial