1 # 2 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 # 5 # This code is free software; you can redistribute it and/or modify it 6 # under the terms of the GNU General Public License version 2 only, as 7 # published by the Free Software Foundation. Oracle designates this 8 # particular file as subject to the "Classpath" exception as provided 9 # by Oracle in the LICENSE file that accompanied this code. 10 # 11 # This code is distributed in the hope that it will be useful, but WITHOUT 12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 # version 2 for more details (a copy is included in the LICENSE file that 15 # accompanied this code). 16 # 17 # You should have received a copy of the GNU General Public License version 18 # 2 along with this work; if not, write to the Free Software Foundation, 19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 # 21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 # or visit www.oracle.com if you need additional information or have any 23 # questions. 24 # 25 26 27 # Chaining of spec files 28 HOTSPOT_SPEC:=$(dir $(SPEC))hotspot-spec.gmk 29 override SPEC=$(HOTSPOT_SPEC) 30 # Now include the base spec.gmk file 31 include $(BASE_SPEC) 32 33 # Additional legacy variables defined for Hotspot 34 35 @SET_OPENJDK@ 36 @HOTSPOT_SET_WARNINGS_AS_ERRORS@ 37 38 # Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options. 39 @BUILD_HEADLESS@ 40 41 # Legacy setting: OPT or DBG 42 VARIANT:=@VARIANT@ 43 # Legacy setting: true or false 44 FASTDEBUG:=@FASTDEBUG@ 45 # Legacy setting: debugging the class files? 46 DEBUG_CLASSFILES:=@DEBUG_CLASSFILES@ 47 48 ALT_CUPS_HEADERS_PATH:=$(patsubst -I%,%,$(filter -I%,@CUPS_CFLAGS@)) 49 50 # The HOSTCC/HOSTCXX is Hotspot terminology for the BUILD_CC/BUILD_CXX, i.e. the 51 # compiler that produces code that can be run on the build platform. 52 HOSTCC:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CC@ $(BUILD_SYSROOT_CFLAGS) 53 HOSTCXX:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CXX@ $(BUILD_SYSROOT_CFLAGS) 54 55 #################################################### 56 # 57 # Legacy Hotspot support 58 59 # If cross compiling, then define CROSS_COMPILE_ARCH:=cpu_name here. 60 @DEFINE_CROSS_COMPILE_ARCH@ 61 62 # Old name for OPENJDK_TARGET_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc) 63 PLATFORM=$(OPENJDK_TARGET_OS) 64 # 32 or 64 bit 65 ARCH_DATA_MODEL=$(OPENJDK_TARGET_CPU_BITS) 66 67 ALT_BOOTDIR=$(BOOT_JDK) 68 # Can be /sparcv9 or /amd64 on Solaris 69 ISA_DIR=$(OPENJDK_TARGET_CPU_ISADIR) 70 # Yet another name for arch used for an extra subdir below the jvm lib. 71 # Uses i386 and amd64, instead of x86 and x86_64. 72 LIBARCH=$(OPENJDK_TARGET_CPU_LEGACY_LIB) 73 # Set the cpu architecture 74 ARCH=$(OPENJDK_TARGET_CPU_ARCH) 75 # Legacy setting for building for a 64 bit machine. 76 # If yes then this expands to _LP64:=1 77 @LP64@ 78 79 # Legacy settings for zero 80 ZERO_ENDIANNESS=$(OPENJDK_TARGET_CPU_ENDIAN) 81 ZERO_LIBARCH=$(OPENJDK_TARGET_CPU_LEGACY_LIB) 82 ZERO_ARCHDEF=@ZERO_ARCHDEF@ 83 ZERO_ARCHFLAG=@ZERO_ARCHFLAG@ 84 LIBFFI_CFLAGS=@LIBFFI_CFLAGS@ 85 LIBFFI_LIBS=@LIBFFI_LIBS@ 86 87 # Legacy settings for zeroshark 88 LLVM_CFLAGS=@LLVM_CFLAGS@ 89 LLVM_LIBS=@LLVM_LIBS@ 90 LLVM_LDFLAGS=@LLVM_LDFLAGS@ 91 92 ALT_OUTPUTDIR=$(HOTSPOT_OUTPUTDIR) 93 ALT_EXPORT_PATH=$(HOTSPOT_DIST) 94 95 JVM_INTERPRETER:=@JVM_INTERPRETER@ 96 ifeq ($(JVM_INTERPRETER), cpp) 97 CC_INTERP=true 98 endif 99 100 HOTSPOT_MAKE_ARGS:=@HOTSPOT_MAKE_ARGS@ @STATIC_CXX_SETTING@ 101 # Control wether Hotspot runs Queens test after building 102 TEST_IN_BUILD=@TEST_IN_BUILD@ 103 104 USE_CLANG := @USE_CLANG@ 105 106 # For hotspot, override compiler/tools definition to not include FIXPATH prefix. 107 # Hotspot has its own handling on the Windows path situation. 108 CXX:=@CCACHE@ @ICECC@ @HOTSPOT_CXX@ 109 LD:=@HOTSPOT_LD@ 110 MT:=@HOTSPOT_MT@ 111 RC:=@HOTSPOT_RC@ 112 113 EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@ $(CFLAGS_CCACHE) $(NO_NULL_POINTER_CHECK_FLAG) $(NO_LIFETIME_DSE_CFLAG) $(CXXSTD_CXXFLAG) 114 EXTRA_CXXFLAGS=@LEGACY_EXTRA_CXXFLAGS@ $(CFLAGS_CCACHE) 115 EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@ 116 117 USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@ 118 119 # Hotspot expects the variable FULL_DEBUG_SYMBOLS=1/0 to control debug symbols 120 # creation. 121 ifeq ($(COPY_DEBUG_SYMBOLS), true) 122 FULL_DEBUG_SYMBOLS=1 123 # Ensure hotspot uses the objcopy that configure located 124 ALT_OBJCOPY:=$(OBJCOPY) 125 else 126 FULL_DEBUG_SYMBOLS=0 127 endif 128 129 # Hotspot expects the variable ZIP_DEBUGINFO_FILES=1/0 and not true/false. 130 ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true) 131 ZIP_DEBUGINFO_FILES:=1 132 else 133 ZIP_DEBUGINFO_FILES:=0 134 endif 135 136 DEBUG_BINARIES := @DEBUG_BINARIES@ 137 STRIP_POLICY := @STRIP_POLICY@ 138 139 ifeq ($(OPENJDK_TARGET_OS), windows) 140 # On Windows, the Visual Studio toolchain needs the LIB and INCLUDE 141 # environment variables (in Windows path style). 142 export INCLUDE:=@VS_INCLUDE@ 143 export LIB:=@VS_LIB@ 144 endif 145 146 # Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files. 147 # This is needed to get the LOG setting to work properly. 148 include $(SRC_ROOT)/make/common/MakeBase.gmk