make/linux/makefiles/defs.make

Sat, 03 Mar 2012 12:36:35 -0800

author
jcoomes
date
Sat, 03 Mar 2012 12:36:35 -0800
changeset 3621
e4624321d36a
parent 3619
2d503de963b3
child 3649
3d7ea1dbe0de
permissions
-rw-r--r--

7150454: add release jdk7u4 to jprt.properties
Reviewed-by: ohair, never

duke@435 1 #
mgerdin@3619 2 # Copyright (c) 2006, 2012, 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.
duke@435 22 #
duke@435 23 #
duke@435 24
duke@435 25 # The common definitions for hotspot linux 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.
duke@435 28
duke@435 29 SLASH_JAVA ?= /java
duke@435 30
duke@435 31 # Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name
duke@435 32 ARCH:=$(shell uname -m)
duke@435 33 PATH_SEP = :
duke@435 34 ifeq ($(LP64), 1)
duke@435 35 ARCH_DATA_MODEL ?= 64
duke@435 36 else
duke@435 37 ARCH_DATA_MODEL ?= 32
duke@435 38 endif
duke@435 39
never@1445 40 # zero
never@1445 41 ifeq ($(ZERO_BUILD), true)
never@1445 42 ifeq ($(ARCH_DATA_MODEL), 64)
never@1445 43 MAKE_ARGS += LP64=1
never@1445 44 endif
never@1445 45 PLATFORM = linux-zero
never@1445 46 VM_PLATFORM = linux_$(subst i386,i486,$(ZERO_LIBARCH))
never@1445 47 HS_ARCH = zero
never@1445 48 ARCH = zero
never@1445 49 endif
never@1445 50
duke@435 51 # ia64
duke@435 52 ifeq ($(ARCH), ia64)
duke@435 53 ARCH_DATA_MODEL = 64
duke@435 54 MAKE_ARGS += LP64=1
duke@435 55 PLATFORM = linux-ia64
duke@435 56 VM_PLATFORM = linux_ia64
duke@435 57 HS_ARCH = ia64
duke@435 58 endif
duke@435 59
duke@435 60 # sparc
duke@435 61 ifeq ($(ARCH), sparc64)
duke@435 62 ifeq ($(ARCH_DATA_MODEL), 64)
duke@435 63 ARCH_DATA_MODEL = 64
duke@435 64 MAKE_ARGS += LP64=1
duke@435 65 PLATFORM = linux-sparcv9
duke@435 66 VM_PLATFORM = linux_sparcv9
duke@435 67 else
duke@435 68 ARCH_DATA_MODEL = 32
duke@435 69 PLATFORM = linux-sparc
duke@435 70 VM_PLATFORM = linux_sparc
duke@435 71 endif
duke@435 72 HS_ARCH = sparc
duke@435 73 endif
duke@435 74
duke@435 75 # x86_64
duke@435 76 ifeq ($(ARCH), x86_64)
duke@435 77 ifeq ($(ARCH_DATA_MODEL), 64)
duke@435 78 ARCH_DATA_MODEL = 64
duke@435 79 MAKE_ARGS += LP64=1
duke@435 80 PLATFORM = linux-amd64
duke@435 81 VM_PLATFORM = linux_amd64
duke@435 82 HS_ARCH = x86
duke@435 83 else
duke@435 84 ARCH_DATA_MODEL = 32
duke@435 85 PLATFORM = linux-i586
duke@435 86 VM_PLATFORM = linux_i486
duke@435 87 HS_ARCH = x86
duke@435 88 # We have to reset ARCH to i686 since SRCARCH relies on it
duke@435 89 ARCH = i686
duke@435 90 endif
duke@435 91 endif
duke@435 92
duke@435 93 # i686
duke@435 94 ifeq ($(ARCH), i686)
duke@435 95 ARCH_DATA_MODEL = 32
duke@435 96 PLATFORM = linux-i586
duke@435 97 VM_PLATFORM = linux_i486
duke@435 98 HS_ARCH = x86
duke@435 99 endif
duke@435 100
bobv@2036 101 # ARM
bobv@2036 102 ifeq ($(ARCH), arm)
bobv@2036 103 ARCH_DATA_MODEL = 32
bobv@2036 104 PLATFORM = linux-arm
bobv@2036 105 VM_PLATFORM = linux_arm
bobv@2036 106 HS_ARCH = arm
bobv@2036 107 endif
bobv@2036 108
bobv@2036 109 # PPC
bobv@2036 110 ifeq ($(ARCH), ppc)
bobv@2036 111 ARCH_DATA_MODEL = 32
bobv@2036 112 PLATFORM = linux-ppc
bobv@2036 113 VM_PLATFORM = linux_ppc
bobv@2036 114 HS_ARCH = ppc
bobv@2036 115 endif
bobv@2036 116
dcubed@3150 117 # determine if HotSpot is being built in JDK6 or earlier version
dcubed@3150 118 JDK6_OR_EARLIER=0
dcubed@3150 119 ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1"
dcubed@3150 120 # if the longer variable names (newer build style) are set, then check those
dcubed@3150 121 ifeq "$(shell expr \( $(JDK_MAJOR_VERSION) = 1 \& $(JDK_MINOR_VERSION) \< 7 \))" "1"
dcubed@3150 122 JDK6_OR_EARLIER=1
dcubed@3150 123 endif
dcubed@3150 124 else
dcubed@3150 125 # the longer variables aren't set so check the shorter variable names
dcubed@3150 126 ifeq "$(shell expr \( '$(JDK_MAJOR_VER)' = 1 \& '$(JDK_MINOR_VER)' \< 7 \))" "1"
dcubed@3150 127 JDK6_OR_EARLIER=1
dcubed@3150 128 endif
dcubed@3150 129 endif
dcubed@3150 130
dcubed@3150 131 ifeq ($(JDK6_OR_EARLIER),0)
dcubed@3150 132 # Full Debug Symbols is supported on JDK7 or newer
dcubed@3150 133
dcubed@3150 134 # Default OBJCOPY comes from GNU Binutils on Linux:
dcubed@3150 135 DEF_OBJCOPY=/usr/bin/objcopy
dcubed@3150 136 ifdef CROSS_COMPILE_ARCH
dcubed@3150 137 # don't try to generate .debuginfo files when cross compiling
dcubed@3150 138 _JUNK_ := $(shell \
dcubed@3150 139 echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \
dcubed@3150 140 "skipping .debuginfo generation.")
dcubed@3150 141 OBJCOPY=
dcubed@3150 142 else
dcubed@3150 143 OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
dcubed@3150 144 ifneq ($(ALT_OBJCOPY),)
dcubed@3150 145 _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
dcubed@3150 146 # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
dcubed@3150 147 OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
dcubed@3150 148 endif
dcubed@3150 149 endif
dcubed@3150 150
dcubed@3150 151 ifeq ($(OBJCOPY),)
dcubed@3150 152 _JUNK_ := $(shell \
dcubed@3150 153 echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
dcubed@3150 154 else
dcubed@3150 155 _JUNK_ := $(shell \
dcubed@3150 156 echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
dcubed@3150 157
dcubed@3150 158 # Library stripping policies for .debuginfo configs:
dcubed@3150 159 # all_strip - strips everything from the library
dcubed@3150 160 # min_strip - strips most stuff from the library; leaves minimum symbols
dcubed@3150 161 # no_strip - does not strip the library at all
dcubed@3150 162 #
dcubed@3150 163 # Oracle security policy requires "all_strip". A waiver was granted on
dcubed@3150 164 # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
dcubed@3150 165 #
dcubed@3150 166 DEF_STRIP_POLICY="min_strip"
dcubed@3150 167 ifeq ($(ALT_STRIP_POLICY),)
dcubed@3150 168 STRIP_POLICY=$(DEF_STRIP_POLICY)
dcubed@3150 169 else
dcubed@3150 170 STRIP_POLICY=$(ALT_STRIP_POLICY)
dcubed@3150 171 endif
dcubed@3150 172
dcubed@3150 173 _JUNK_ := $(shell \
dcubed@3150 174 echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
dcubed@3150 175 endif
dcubed@3150 176 endif
dcubed@3150 177
duke@435 178 JDK_INCLUDE_SUBDIR=linux
duke@435 179
never@3156 180 # Library suffix
never@3156 181 LIBRARY_SUFFIX=so
never@3156 182
duke@435 183 # FIXUP: The subdirectory for a debug build is NOT the same on all platforms
duke@435 184 VM_DEBUG=jvmg
duke@435 185
duke@435 186 EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html
kvn@1450 187
kvn@1450 188 # client and server subdirectories have symbolic links to ../libjsig.so
never@3156 189 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
dcubed@3150 190 ifneq ($(OBJCOPY),)
dcubed@3150 191 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo
dcubed@3150 192 endif
bobv@2036 193 EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server
kvn@3044 194 EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client
kvn@1450 195
mgerdin@3619 196 EXPORT_LIST += $(EXPORT_JRE_LIB_DIR)/wb.jar
mgerdin@3619 197
bobv@2036 198 ifndef BUILD_CLIENT_ONLY
duke@435 199 EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
never@3156 200 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX)
dcubed@3150 201 ifneq ($(OBJCOPY),)
dcubed@3150 202 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo
dcubed@3150 203 endif
bobv@2036 204 endif
bobv@2036 205
never@1445 206 ifneq ($(ZERO_BUILD), true)
never@1445 207 ifeq ($(ARCH_DATA_MODEL), 32)
never@1445 208 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
never@3156 209 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
dcubed@3150 210 ifneq ($(OBJCOPY),)
dcubed@3150 211 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo
dcubed@3150 212 endif
never@1445 213 endif
duke@435 214 endif
bobv@2036 215
bobv@2036 216 # Serviceability Binaries
bobv@2036 217 # No SA Support for PPC, IA64, ARM or zero
never@3156 218 ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
bobv@2036 219 $(EXPORT_LIB_DIR)/sa-jdi.jar
never@3156 220 ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
bobv@2036 221 $(EXPORT_LIB_DIR)/sa-jdi.jar
dcubed@3150 222 ifneq ($(OBJCOPY),)
dcubed@3150 223 ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
dcubed@3150 224 ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
dcubed@3150 225 endif
bobv@2036 226 ADD_SA_BINARIES/ppc =
bobv@2036 227 ADD_SA_BINARIES/ia64 =
bobv@2036 228 ADD_SA_BINARIES/arm =
bobv@2036 229 ADD_SA_BINARIES/zero =
bobv@2036 230
bobv@2036 231 EXPORT_LIST += $(ADD_SA_BINARIES/$(HS_ARCH))
bobv@2036 232
bobv@2036 233

mercurial