bootcycle-spec.gmk.in revision 2126:31261e7238af
1104964Sjeff# 2104964Sjeff# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. 3104964Sjeff# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4104964Sjeff# 5104964Sjeff# This code is free software; you can redistribute it and/or modify it 6104964Sjeff# under the terms of the GNU General Public License version 2 only, as 7104964Sjeff# published by the Free Software Foundation. Oracle designates this 8104964Sjeff# particular file as subject to the "Classpath" exception as provided 9104964Sjeff# by Oracle in the LICENSE file that accompanied this code. 10104964Sjeff# 11104964Sjeff# This code is distributed in the hope that it will be useful, but WITHOUT 12104964Sjeff# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13104964Sjeff# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14104964Sjeff# version 2 for more details (a copy is included in the LICENSE file that 15104964Sjeff# accompanied this code). 16104964Sjeff# 17104964Sjeff# You should have received a copy of the GNU General Public License version 18104964Sjeff# 2 along with this work; if not, write to the Free Software Foundation, 19104964Sjeff# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20104964Sjeff# 21104964Sjeff# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22104964Sjeff# or visit www.oracle.com if you need additional information or have any 23104964Sjeff# questions. 24104964Sjeff# 25104964Sjeff 26104964Sjeff# Support for building boot cycle builds 27104964Sjeff 28104964SjeffBOOT_JDK_MODULAR := true 29104964Sjeff 30104964Sjeff# First include the real base spec.gmk file 31104964Sjeffinclude @SPEC@ 32104964Sjeff 33104964Sjeff# Check that the user did not try to specify a different java to use for compiling. 34125287Sjeff# On windows we need to account for fixpath being first word. 35125287Sjeffifeq ($(firstword $(JAVA)),$(FIXPATH)) 36125287Sjeff JAVA_EXEC_POS=2 37125287Sjeffelse 38125287Sjeff JAVA_EXEC_POS=1 39125287Sjeffendif 40104964Sjeffifneq ($(word $(JAVA_EXEC_POS),$(SJAVAC_SERVER_JAVA)),$(word $(JAVA_EXEC_POS),$(JAVA))) 41125287Sjeff $(error Bootcycle builds are not possible if --with-sjavac-server-java is specified) 42104964Sjeffendif 43104964Sjeff 44104964Sjeff 45113355Sjeff# Override specific values to do a boot cycle build 46113355Sjeff 47113355Sjeff# Use a different Boot JDK 48113355SjeffBOOT_JDK := $(JDK_IMAGE_DIR) 49113355Sjeff 50113355Sjeff# The bootcycle build has a different output directory 51104964SjeffOLD_BUILD_OUTPUT:=@BUILD_OUTPUT@ 52104964SjeffBUILD_OUTPUT:=$(OLD_BUILD_OUTPUT)/bootcycle-build 53104964Sjeff# The HOTSPOT_DIST dir is not defined relative to BUILD_OUTPUT in spec.gmk. Must not 54104964Sjeff# use space in this patsubst to avoid leading space in HOTSPOT_DIST. 55113355SjeffHOTSPOT_DIST:=$(patsubst $(OLD_BUILD_OUTPUT)%,$(BUILD_OUTPUT)%,$(HOTSPOT_DIST)) 56113355SjeffSJAVAC_SERVER_DIR:=$(patsubst $(OLD_BUILD_OUTPUT)%, $(BUILD_OUTPUT)%, $(SJAVAC_SERVER_DIR)) 57113355Sjeff 58104964SjeffJAVA_CMD:=$(BOOT_JDK)/bin/java 59104964SjeffJAVAC_CMD:=$(BOOT_JDK)/bin/javac 60104964SjeffJAVAH_CMD:=$(BOOT_JDK)/bin/javah 61122036SjeffJAR_CMD:=$(BOOT_JDK)/bin/jar 62122036SjeffJARSIGNER_CMD:=$(BOOT_JDK)/bin/jarsigner 63104964SjeffSJAVAC_SERVER_JAVA_CMD:=$(JAVA_CMD) 64113355Sjeff# When building a 32bit target, make sure the sjavac server flags are compatible 65113355Sjeff# with a 32bit JVM. 66122036Sjeffifeq ($(OPENJDK_TARGET_CPU_BITS), 32) 67113355Sjeff SJAVAC_SERVER_JAVA_FLAGS:= -Xms256M -Xmx1500M 68126326Sjhbendif 69121128Sjeff# The bootcycle JVM arguments may differ from the original boot jdk. 70113355SjeffJAVA_FLAGS_BIG := @BOOTCYCLE_JVM_ARGS_BIG@ 71104964Sjeff