make/aix/makefiles/defs.make

Fri, 06 Sep 2013 20:08:29 +0200

author
simonis
date
Fri, 06 Sep 2013 20:08:29 +0200
changeset 6464
b83f7d608548
parent 0
f90c822e73f8
permissions
-rw-r--r--

8023034: PPC64 (part 14): Implement AIX/PPC64 support in HotSpot makefiles
Reviewed-by: kvn

aoqi@0 1 #
aoqi@0 2 # Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
aoqi@0 3 # Copyright 2012, 2013 SAP AG. All rights reserved.
aoqi@0 4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0 5 #
aoqi@0 6 # This code is free software; you can redistribute it and/or modify it
aoqi@0 7 # under the terms of the GNU General Public License version 2 only, as
aoqi@0 8 # published by the Free Software Foundation.
aoqi@0 9 #
aoqi@0 10 # This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0 11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0 12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0 13 # version 2 for more details (a copy is included in the LICENSE file that
aoqi@0 14 # accompanied this code).
aoqi@0 15 #
aoqi@0 16 # You should have received a copy of the GNU General Public License version
aoqi@0 17 # 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0 18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0 19 #
aoqi@0 20 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0 21 # or visit www.oracle.com if you need additional information or have any
aoqi@0 22 # questions.
aoqi@0 23 #
aoqi@0 24 #
aoqi@0 25
aoqi@0 26 # The common definitions for hotspot AIX builds.
aoqi@0 27 # Include the top level defs.make under make directory instead of this one.
aoqi@0 28 # This file is included into make/defs.make.
aoqi@0 29
aoqi@0 30 SLASH_JAVA ?= /java
aoqi@0 31
aoqi@0 32 # Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name
aoqi@0 33 #ARCH:=$(shell uname -m)
aoqi@0 34 PATH_SEP = :
aoqi@0 35 ifeq ($(LP64), 1)
aoqi@0 36 ARCH_DATA_MODEL ?= 64
aoqi@0 37 else
aoqi@0 38 ARCH_DATA_MODEL ?= 32
aoqi@0 39 endif
aoqi@0 40
aoqi@0 41 ifeq ($(ARCH_DATA_MODEL), 64)
aoqi@0 42 ARCH = ppc64
aoqi@0 43 else
aoqi@0 44 ARCH = ppc
aoqi@0 45 endif
aoqi@0 46
aoqi@0 47 # PPC
aoqi@0 48 ifeq ($(ARCH), ppc)
aoqi@0 49 #ARCH_DATA_MODEL = 32
aoqi@0 50 PLATFORM = aix-ppc
aoqi@0 51 VM_PLATFORM = aix_ppc
aoqi@0 52 HS_ARCH = ppc
aoqi@0 53 endif
aoqi@0 54
aoqi@0 55 # PPC64
aoqi@0 56 ifeq ($(ARCH), ppc64)
aoqi@0 57 #ARCH_DATA_MODEL = 64
aoqi@0 58 MAKE_ARGS += LP64=1
aoqi@0 59 PLATFORM = aix-ppc64
aoqi@0 60 VM_PLATFORM = aix_ppc64
aoqi@0 61 HS_ARCH = ppc
aoqi@0 62 endif
aoqi@0 63
aoqi@0 64 # On 32 bit aix we build server and client, on 64 bit just server.
aoqi@0 65 ifeq ($(JVM_VARIANTS),)
aoqi@0 66 ifeq ($(ARCH_DATA_MODEL), 32)
aoqi@0 67 JVM_VARIANTS:=client,server
aoqi@0 68 JVM_VARIANT_CLIENT:=true
aoqi@0 69 JVM_VARIANT_SERVER:=true
aoqi@0 70 else
aoqi@0 71 JVM_VARIANTS:=server
aoqi@0 72 JVM_VARIANT_SERVER:=true
aoqi@0 73 endif
aoqi@0 74 endif
aoqi@0 75
aoqi@0 76 # determine if HotSpot is being built in JDK6 or earlier version
aoqi@0 77 JDK6_OR_EARLIER=0
aoqi@0 78 ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1"
aoqi@0 79 # if the longer variable names (newer build style) are set, then check those
aoqi@0 80 ifeq "$(shell expr \( $(JDK_MAJOR_VERSION) = 1 \& $(JDK_MINOR_VERSION) \< 7 \))" "1"
aoqi@0 81 JDK6_OR_EARLIER=1
aoqi@0 82 endif
aoqi@0 83 else
aoqi@0 84 # the longer variables aren't set so check the shorter variable names
aoqi@0 85 ifeq "$(shell expr \( '$(JDK_MAJOR_VER)' = 1 \& '$(JDK_MINOR_VER)' \< 7 \))" "1"
aoqi@0 86 JDK6_OR_EARLIER=1
aoqi@0 87 endif
aoqi@0 88 endif
aoqi@0 89
aoqi@0 90 ifeq ($(JDK6_OR_EARLIER),0)
aoqi@0 91 # Full Debug Symbols is supported on JDK7 or newer.
aoqi@0 92 # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
aoqi@0 93 # builds is enabled with debug info files ZIP'ed to save space. For
aoqi@0 94 # BUILD_FLAVOR != product builds, FDS is always enabled, after all a
aoqi@0 95 # debug build without debug info isn't very useful.
aoqi@0 96 # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
aoqi@0 97 #
aoqi@0 98 # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
aoqi@0 99 # disabled for a BUILD_FLAVOR == product build.
aoqi@0 100 #
aoqi@0 101 # Note: Use of a different variable name for the FDS override option
aoqi@0 102 # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
aoqi@0 103 # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
aoqi@0 104 # in options via environment variables, use of distinct variables
aoqi@0 105 # prevents strange behaviours. For example, in a BUILD_FLAVOR !=
aoqi@0 106 # product build, the FULL_DEBUG_SYMBOLS environment variable will be
aoqi@0 107 # 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
aoqi@0 108 # the same variable name is used, then different values can be picked
aoqi@0 109 # up by different parts of the build. Just to be clear, we only need
aoqi@0 110 # two variable names because the incoming option value can be
aoqi@0 111 # overridden in some situations, e.g., a BUILD_FLAVOR != product
aoqi@0 112 # build.
aoqi@0 113
aoqi@0 114 # Due to the multiple sub-make processes that occur this logic gets
aoqi@0 115 # executed multiple times. We reduce the noise by at least checking that
aoqi@0 116 # BUILD_FLAVOR has been set.
aoqi@0 117 ifneq ($(BUILD_FLAVOR),)
aoqi@0 118 ifeq ($(BUILD_FLAVOR), product)
aoqi@0 119 FULL_DEBUG_SYMBOLS ?= 1
aoqi@0 120 ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
aoqi@0 121 else
aoqi@0 122 # debug variants always get Full Debug Symbols (if available)
aoqi@0 123 ENABLE_FULL_DEBUG_SYMBOLS = 1
aoqi@0 124 endif
aoqi@0 125 _JUNK_ := $(shell \
aoqi@0 126 echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
aoqi@0 127 # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
aoqi@0 128
aoqi@0 129 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
aoqi@0 130 # Default OBJCOPY comes from GNU Binutils on Linux
aoqi@0 131 ifeq ($(CROSS_COMPILE_ARCH),)
aoqi@0 132 DEF_OBJCOPY=/usr/bin/objcopy
aoqi@0 133 else
aoqi@0 134 # Assume objcopy is part of the cross-compilation toolset
aoqi@0 135 ifneq ($(ALT_COMPILER_PATH),)
aoqi@0 136 DEF_OBJCOPY=$(ALT_COMPILER_PATH)/objcopy
aoqi@0 137 endif
aoqi@0 138 endif
aoqi@0 139 OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
aoqi@0 140 ifneq ($(ALT_OBJCOPY),)
aoqi@0 141 _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
aoqi@0 142 OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
aoqi@0 143 endif
aoqi@0 144
aoqi@0 145 ifeq ($(OBJCOPY),)
aoqi@0 146 _JUNK_ := $(shell \
aoqi@0 147 echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files. You may need to set ALT_OBJCOPY.")
aoqi@0 148 ENABLE_FULL_DEBUG_SYMBOLS=0
aoqi@0 149 _JUNK_ := $(shell \
aoqi@0 150 echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
aoqi@0 151 else
aoqi@0 152 _JUNK_ := $(shell \
aoqi@0 153 echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
aoqi@0 154
aoqi@0 155 # Library stripping policies for .debuginfo configs:
aoqi@0 156 # all_strip - strips everything from the library
aoqi@0 157 # min_strip - strips most stuff from the library; leaves minimum symbols
aoqi@0 158 # no_strip - does not strip the library at all
aoqi@0 159 #
aoqi@0 160 # Oracle security policy requires "all_strip". A waiver was granted on
aoqi@0 161 # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
aoqi@0 162 #
aoqi@0 163 # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
aoqi@0 164 #
aoqi@0 165 STRIP_POLICY ?= min_strip
aoqi@0 166
aoqi@0 167 _JUNK_ := $(shell \
aoqi@0 168 echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
aoqi@0 169
aoqi@0 170 ZIP_DEBUGINFO_FILES ?= 1
aoqi@0 171
aoqi@0 172 _JUNK_ := $(shell \
aoqi@0 173 echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")
aoqi@0 174 endif
aoqi@0 175 endif # ENABLE_FULL_DEBUG_SYMBOLS=1
aoqi@0 176 endif # BUILD_FLAVOR
aoqi@0 177 endif # JDK_6_OR_EARLIER
aoqi@0 178
aoqi@0 179 # unused JDK_INCLUDE_SUBDIR=aix
aoqi@0 180
aoqi@0 181 # Library suffix
aoqi@0 182 LIBRARY_SUFFIX=so
aoqi@0 183
aoqi@0 184 EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html
aoqi@0 185
aoqi@0 186 # client and server subdirectories have symbolic links to ../libjsig.so
aoqi@0 187 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
aoqi@0 188 #ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
aoqi@0 189 # ifeq ($(ZIP_DEBUGINFO_FILES),1)
aoqi@0 190 # EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz
aoqi@0 191 # else
aoqi@0 192 # EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo
aoqi@0 193 # endif
aoqi@0 194 #endif
aoqi@0 195 EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server
aoqi@0 196 EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client
aoqi@0 197 EXPORT_MINIMAL_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/minimal
aoqi@0 198
aoqi@0 199 ifeq ($(findstring true, $(JVM_VARIANT_SERVER) $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK) $(JVM_VARIANT_CORE)), true)
aoqi@0 200 EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
aoqi@0 201 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX)
aoqi@0 202 # ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
aoqi@0 203 # ifeq ($(ZIP_DEBUGINFO_FILES),1)
aoqi@0 204 # EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz
aoqi@0 205 # else
aoqi@0 206 # EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo
aoqi@0 207 # endif
aoqi@0 208 # endif
aoqi@0 209 endif
aoqi@0 210
aoqi@0 211 ifeq ($(JVM_VARIANT_CLIENT),true)
aoqi@0 212 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
aoqi@0 213 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
aoqi@0 214 # ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
aoqi@0 215 # ifeq ($(ZIP_DEBUGINFO_FILES),1)
aoqi@0 216 # EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz
aoqi@0 217 # else
aoqi@0 218 # EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo
aoqi@0 219 # endif
aoqi@0 220 # endif
aoqi@0 221 endif
aoqi@0 222
aoqi@0 223 # Serviceability Binaries
aoqi@0 224 # No SA Support for PPC or zero
aoqi@0 225 ADD_SA_BINARIES/ppc =
aoqi@0 226 ADD_SA_BINARIES/ppc64 =
aoqi@0 227 ADD_SA_BINARIES/zero =
aoqi@0 228
aoqi@0 229 EXPORT_LIST += $(ADD_SA_BINARIES/$(HS_ARCH))
aoqi@0 230
aoqi@0 231

mercurial