1 # 2 # Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved. 3 # Copyright (c) 2012, 2013 SAP SE. 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 # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product 83 # builds is enabled with debug info files ZIP'ed to save space. For 84 # BUILD_FLAVOR != product builds, FDS is always enabled, after all a 85 # debug build without debug info isn't very useful. 86 # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled. 87 # 88 # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be 89 # disabled for a BUILD_FLAVOR == product build. 90 # 91 # Note: Use of a different variable name for the FDS override option 92 # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS 93 # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass 94 # in options via environment variables, use of distinct variables 95 # prevents strange behaviours. For example, in a BUILD_FLAVOR != 96 # product build, the FULL_DEBUG_SYMBOLS environment variable will be 97 # 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If 98 # the same variable name is used, then different values can be picked 99 # up by different parts of the build. Just to be clear, we only need 100 # two variable names because the incoming option value can be 101 # overridden in some situations, e.g., a BUILD_FLAVOR != product 102 # build. 103 104 # Due to the multiple sub-make processes that occur this logic gets 105 # executed multiple times. We reduce the noise by at least checking that 106 # BUILD_FLAVOR has been set. 107 ifneq ($(BUILD_FLAVOR),) 108 ifeq ($(BUILD_FLAVOR), product) 109 FULL_DEBUG_SYMBOLS ?= 1 110 ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS) 111 else 112 # debug variants always get Full Debug Symbols (if available) 113 ENABLE_FULL_DEBUG_SYMBOLS = 1 114 endif 115 $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")) 116 # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later 117 118 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) 119 # Default OBJCOPY comes from GNU Binutils on Linux 120 ifeq ($(CROSS_COMPILE_ARCH),) 121 DEF_OBJCOPY=/usr/bin/objcopy 122 else 123 # Assume objcopy is part of the cross-compilation toolset 124 ifneq ($(ALT_COMPILER_PATH),) 125 DEF_OBJCOPY=$(ALT_COMPILER_PATH)/objcopy 126 endif 127 endif 128 OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY)) 129 ifneq ($(ALT_OBJCOPY),) 130 $(eval $(call print_info, "ALT_OBJCOPY=$(ALT_OBJCOPY)")) 131 OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY)) 132 endif 133 134 ifeq ($(COPY_DEBUG_SYMBOLS), true) 135 ifeq ($(OBJCOPY),) 136 $(eval $(call print_info, "no objcopy cmd found so cannot create .debuginfo files. You may need to set ALT_OBJCOPY.")) 137 ENABLE_FULL_DEBUG_SYMBOLS=0 138 COPY_DEBUG_SYMBOLS=false 139 $(eval $(call print_info, "ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")) 140 else 141 $(eval $(call print_info, "$(OBJCOPY) cmd found so will create .debuginfo files.")) 142 143 # Library stripping policies for .debuginfo configs: 144 # all_strip - strips everything from the library 145 # min_strip - strips most stuff from the library; leaves minimum symbols 146 # no_strip - does not strip the library at all 147 # 148 # Oracle security policy requires "all_strip". A waiver was granted on 149 # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE. 150 # 151 # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled. 152 # 153 STRIP_POLICY ?= min_strip 154 155 $(eval $(call print_info, "STRIP_POLICY=$(STRIP_POLICY)")) 156 157 ZIP_DEBUGINFO_FILES ?= 1 158 159 $(eval $(call print_info, "ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")) 160 endif 161 endif # COPY_DEBUG_SYMBOLS=true 162 endif # ENABLE_FULL_DEBUG_SYMBOLS=1 163 endif # BUILD_FLAVOR 164 165 # unused JDK_INCLUDE_SUBDIR=aix 166 167 # Library suffix 168 LIBRARY_SUFFIX=so 169 170 EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html 171 172 # client and server subdirectories have symbolic links to ../libjsig.so 173 EXPORT_LIST += $(EXPORT_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX) 174 #ifeq ($(COPY_DEBUG_SYMBOLS),true) 175 # ifeq ($(ZIP_DEBUGINFO_FILES),1) 176 # EXPORT_LIST += $(EXPORT_LIB_ARCH_DIR)/libjsig.diz 177 # else 178 # EXPORT_LIST += $(EXPORT_LIB_ARCH_DIR)/libjsig.debuginfo 179 # endif 180 #endif 181 EXPORT_SERVER_DIR = $(EXPORT_LIB_ARCH_DIR)/server 182 EXPORT_CLIENT_DIR = $(EXPORT_LIB_ARCH_DIR)/client 183 EXPORT_MINIMAL_DIR = $(EXPORT_LIB_ARCH_DIR)/minimal 184 185 ifeq ($(findstring true, $(JVM_VARIANT_SERVER) $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK) $(JVM_VARIANT_CORE)), true) 186 EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt 187 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX) 188 # ifeq ($(COPY_DEBUG_SYMBOLS),true) 189 # ifeq ($(ZIP_DEBUGINFO_FILES),1) 190 # EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz 191 # else 192 # EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo 193 # endif 194 # endif 195 endif 196 197 ifeq ($(JVM_VARIANT_CLIENT),true) 198 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt 199 EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) 200 # ifeq ($(COPY_DEBUG_SYMBOLS),true) 201 # ifeq ($(ZIP_DEBUGINFO_FILES),1) 202 # EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz 203 # else 204 # EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo 205 # endif 206 # endif 207 endif