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