buildjdk-spec.gmk.in revision 2024:cc16e2a24f94
1#
2# Copyright (c) 2015, 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# This spec file is used to compile a BUILD_JDK while cross compiling. The
27# BUILD_JDK runs on the build/host platform and is of the same version as
28# the main build.
29
30# First include the real base spec.gmk file
31include @SPEC@
32
33CC := @BUILD_CC@
34CXX := @BUILD_CXX@
35LD := @BUILD_LD@
36AS := @BUILD_AS@
37NM := @BUILD_NM@
38AR := @BUILD_AR@
39OBJCOPY := @BUILD_OBJCOPY@
40STRIP := @BUILD_STRIP@
41SYSROOT_CFLAGS := @BUILD_SYSROOT_CFLAGS@
42SYSROOT_LDFLAGS := @BUILD_SYSROOT_LDFLAGS@
43
44# These directories should not be moved to BUILDJDK_OUTPUTDIR
45HOTSPOT_OUTPUTDIR := $(patsubst $(BUILD_OUTPUT)%,$(BUILDJDK_OUTPUTDIR)%,$(HOTSPOT_OUTPUTDIR))
46HOTSPOT_DIST := $(patsubst $(BUILD_OUTPUT)%,$(BUILDJDK_OUTPUTDIR)%,$(HOTSPOT_DIST))
47SUPPORT_OUTPUTDIR := $(patsubst $(BUILD_OUTPUT)%,$(BUILDJDK_OUTPUTDIR)%,$(SUPPORT_OUTPUTDIR))
48JDK_OUTPUTDIR := $(patsubst $(BUILD_OUTPUT)%,$(BUILDJDK_OUTPUTDIR)%,$(JDK_OUTPUTDIR))
49
50OPENJDK_BUILD_CPU_LEGACY := @OPENJDK_BUILD_CPU_LEGACY@
51OPENJDK_BUILD_CPU_LEGACY_LIB := @OPENJDK_BUILD_CPU_LEGACY_LIB@
52OPENJDK_BUILD_CPU_LIBDIR := @OPENJDK_BUILD_CPU_LIBDIR@
53OPENJDK_TARGET_CPU_LIBDIR := @OPENJDK_BUILD_CPU_LIBDIR@
54OPENJDK_TARGET_CPU := @OPENJDK_BUILD_CPU@
55OPENJDK_TARGET_CPU_ARCH := @OPENJDK_BUILD_CPU_ARCH@
56OPENJDK_TARGET_CPU_BITS := @OPENJDK_BUILD_CPU_BITS@
57OPENJDK_TARGET_CPU_ENDIAN := @OPENJDK_BUILD_CPU_ENDIAN@
58OPENJDK_TARGET_CPU_LEGACY := @OPENJDK_BUILD_CPU_LEGACY@
59
60HOTSPOT_TARGET_OS := @HOTSPOT_BUILD_OS@
61HOTSPOT_TARGET_OS_TYPE := @HOTSPOT_BUILD_OS_TYPE@
62HOTSPOT_TARGET_CPU := @HOTSPOT_BUILD_CPU@
63HOTSPOT_TARGET_CPU_ARCH := @HOTSPOT_BUILD_CPU_ARCH@
64HOTSPOT_TARGET_CPU_DEFINE := @HOTSPOT_BUILD_CPU_DEFINE@
65
66CFLAGS_JDKLIB := @OPENJDK_BUILD_CFLAGS_JDKLIB@
67CXXFLAGS_JDKLIB := @OPENJDK_BUILD_CXXFLAGS_JDKLIB@
68LDFLAGS_JDKLIB := @OPENJDK_BUILD_LDFLAGS_JDKLIB@
69CFLAGS_JDKEXE := @OPENJDK_BUILD_CFLAGS_JDKEXE@
70CXXFLAGS_JDKEXE := @OPENJDK_BUILD_CXXFLAGS_JDKEXE@
71LDFLAGS_JDKEXE := @OPENJDK_BUILD_LDFLAGS_JDKEXE@
72OPENJDK_TARGET_CPU_JLI_CFLAGS := @OPENJDK_BUILD_CPU_JLI_CFLAGS@
73
74JVM_CFLAGS := @OPENJDK_BUILD_JVM_CFLAGS@
75JVM_LDFLAGS := @OPENJDK_BUILD_JVM_LDFLAGS@
76JVM_ASFLAGS := @OPENJDK_BUILD_JVM_ASFLAGS@
77JVM_LIBS := @OPENJDK_BUILD_JVM_LIBS@
78
79# The compiler for the build platform is likely not warning compatible with the official
80# compiler.
81WARNINGS_AS_ERRORS := false
82DISABLE_WARNING_PREFIX := @BUILD_CC_DISABLE_WARNING_PREFIX@
83
84# Save speed and disk space by not enabling debug symbols for the buildjdk
85ENABLE_DEBUG_SYMBOLS := false
86
87####################################################
88#
89# Legacy Hotspot support
90
91# Legacy setting: OPT or DBG
92VARIANT := OPT
93# Legacy setting: true or false
94FASTDEBUG := false
95# Legacy setting: debugging the class files?
96DEBUG_CLASSFILES := false
97
98# Some users still set EXTRA_*FLAGS on the make command line. Must
99# make sure to override that when building buildjdk.
100override EXTRA_CFLAGS :=
101override EXTRA_CXXFLAGS :=
102override EXTRA_LDFLAGS :=
103
104# The HOSTCC/HOSTCXX is Hotspot terminology for the BUILD_CC/BUILD_CXX, i.e. the
105# compiler that produces code that can be run on the build platform.
106HOSTCC := $(BUILD_CC)
107HOSTCXX := $(BUILD_CXX)
108
109# Old name for OPENJDK_TARGET_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc)
110PLATFORM := $(OPENJDK_BUILD_OS)
111# 32 or 64 bit
112ARCH_DATA_MODEL := $(OPENJDK_BUILD_CPU_BITS)
113
114ALT_BOOTDIR := $(BOOT_JDK)
115# Yet another name for arch used for an extra subdir below the jvm lib.
116# Uses i386 and amd64, instead of x86 and x86_64.
117LIBARCH := @OPENJDK_BUILD_CPU_LEGACY_LIB@
118# Set the cpu architecture. Some users still set ARCH on the make command line. Must
119# make sure to override that when building buildjdk.
120override ARCH := $(OPENJDK_BUILD_CPU_ARCH)
121# Legacy setting for building for a 64 bit machine.
122# If yes then this expands to _LP64 := 1
123ifeq ($(OPENJDK_BUILD_CPU_BITS), 64)
124  _LP64 := 1
125endif
126
127ALT_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)
128ALT_EXPORT_PATH := $(HOTSPOT_DIST)
129
130JVM_INTERPRETER := @JVM_INTERPRETER@
131ifeq ($(JVM_INTERPRETER), cpp)
132  CC_INTERP=true
133endif
134
135HOTSPOT_MAKE_ARGS := product docs export_product
136# Control wether Hotspot runs Queens test after building
137TEST_IN_BUILD := false
138
139USE_PRECOMPILED_HEADER := @USE_PRECOMPILED_HEADER@
140
141# Hotspot expects the variable FULL_DEBUG_SYMBOLS=1/0 to control debug symbols
142# creation.
143FULL_DEBUG_SYMBOLS := 0
144ZIP_DEBUGINFO_FILES := 0
145# Disable stripping
146STRIP_POLICY := none
147
148JVM_VARIANTS := server
149JVM_VARIANT_SERVER := true
150JVM_VARIANT_CLIENT := false
151JVM_VARIANT_MINIMAL1 := false
152JVM_VARIANT_KERNEL := false
153JVM_VARIANT_ZERO := false
154JVM_VARIANT_ZEROSHARK := false
155JVM_VARIANT_CORE := false
156
157# Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files.
158# This is needed to get the LOG setting to work properly.
159include $(SRC_ROOT)/make/common/MakeBase.gmk
160