author | lana |
Thu, 05 May 2016 19:11:09 +0000 | |
changeset 37793 | 41844efbbcce |
parent 37402 | 62b5f067032e |
permissions | -rw-r--r-- |
13697 | 1 |
# |
36535
141db8da8c18
8151841: Build needs additional flags to compile with GCC 6
andrew
parents:
35032
diff
changeset
|
2 |
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. |
13697 | 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@ |
|
33443
ea274e904321
8141543: Propagate --disable-warnings-as-errors to hotspot
ihse
parents:
32810
diff
changeset
|
36 |
@HOTSPOT_SET_WARNINGS_AS_ERRORS@ |
13697 | 37 |
|
38 |
# Legacy defines controlled by the SUPPORT_HEADLESS and SUPPORT_HEADFUL options. |
|
39 |
@BUILD_HEADLESS@ |
|
40 |
||
37402 | 41 |
JVM_VARIANTS:=@JVM_VARIANTS_COMMA@ |
42 |
||
43 |
JVM_VARIANT_SERVER:=@JVM_VARIANT_SERVER@ |
|
44 |
JVM_VARIANT_CLIENT:=@JVM_VARIANT_CLIENT@ |
|
45 |
JVM_VARIANT_MINIMAL1:=@JVM_VARIANT_MINIMAL1@ |
|
46 |
JVM_VARIANT_CORE:=@JVM_VARIANT_CORE@ |
|
47 |
JVM_VARIANT_ZERO:=@JVM_VARIANT_ZERO@ |
|
48 |
JVM_VARIANT_ZEROSHARK:=@JVM_VARIANT_ZEROSHARK@ |
|
49 |
JVM_VARIANT_CUSTOM:=@JVM_VARIANT_HOTSPOT@ |
|
50 |
||
13697 | 51 |
# Legacy setting: OPT or DBG |
52 |
VARIANT:=@VARIANT@ |
|
53 |
# Legacy setting: true or false |
|
54 |
FASTDEBUG:=@FASTDEBUG@ |
|
55 |
# Legacy setting: debugging the class files? |
|
56 |
DEBUG_CLASSFILES:=@DEBUG_CLASSFILES@ |
|
57 |
||
58 |
ALT_CUPS_HEADERS_PATH:=$(patsubst -I%,%,$(filter -I%,@CUPS_CFLAGS@)) |
|
59 |
||
60 |
# The HOSTCC/HOSTCXX is Hotspot terminology for the BUILD_CC/BUILD_CXX, i.e. the |
|
61 |
# compiler that produces code that can be run on the build platform. |
|
34103 | 62 |
HOSTCC:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CC@ $(BUILD_SYSROOT_CFLAGS) |
63 |
HOSTCXX:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CXX@ $(BUILD_SYSROOT_CFLAGS) |
|
13697 | 64 |
|
65 |
#################################################### |
|
66 |
# |
|
67 |
# Legacy Hotspot support |
|
68 |
||
69 |
# If cross compiling, then define CROSS_COMPILE_ARCH:=cpu_name here. |
|
70 |
@DEFINE_CROSS_COMPILE_ARCH@ |
|
71 |
||
72 |
# Old name for OPENJDK_TARGET_OS (aix,bsd,hpux,linux,macosx,solaris,windows etc) |
|
73 |
PLATFORM=$(OPENJDK_TARGET_OS) |
|
74 |
# 32 or 64 bit |
|
75 |
ARCH_DATA_MODEL=$(OPENJDK_TARGET_CPU_BITS) |
|
76 |
||
77 |
ALT_BOOTDIR=$(BOOT_JDK) |
|
78 |
# Can be /sparcv9 or /amd64 on Solaris |
|
79 |
ISA_DIR=$(OPENJDK_TARGET_CPU_ISADIR) |
|
80 |
# Yet another name for arch used for an extra subdir below the jvm lib. |
|
81 |
# Uses i386 and amd64, instead of x86 and x86_64. |
|
82 |
LIBARCH=$(OPENJDK_TARGET_CPU_LEGACY_LIB) |
|
25318
10040c1338b4
8046471: Use OPENJDK_TARGET_CPU_ARCH instead of legacy value for hotspot ARCH
mikael
parents:
22721
diff
changeset
|
83 |
# Set the cpu architecture |
10040c1338b4
8046471: Use OPENJDK_TARGET_CPU_ARCH instead of legacy value for hotspot ARCH
mikael
parents:
22721
diff
changeset
|
84 |
ARCH=$(OPENJDK_TARGET_CPU_ARCH) |
13697 | 85 |
# Legacy setting for building for a 64 bit machine. |
86 |
# If yes then this expands to _LP64:=1 |
|
87 |
@LP64@ |
|
88 |
||
16581
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
15790
diff
changeset
|
89 |
# Legacy settings for zero |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
15790
diff
changeset
|
90 |
ZERO_ENDIANNESS=$(OPENJDK_TARGET_CPU_ENDIAN) |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
15790
diff
changeset
|
91 |
ZERO_LIBARCH=$(OPENJDK_TARGET_CPU_LEGACY_LIB) |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
15790
diff
changeset
|
92 |
ZERO_ARCHDEF=@ZERO_ARCHDEF@ |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
15790
diff
changeset
|
93 |
ZERO_ARCHFLAG=@ZERO_ARCHFLAG@ |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
15790
diff
changeset
|
94 |
LIBFFI_CFLAGS=@LIBFFI_CFLAGS@ |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
15790
diff
changeset
|
95 |
LIBFFI_LIBS=@LIBFFI_LIBS@ |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
15790
diff
changeset
|
96 |
|
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
15790
diff
changeset
|
97 |
# Legacy settings for zeroshark |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
15790
diff
changeset
|
98 |
LLVM_CFLAGS=@LLVM_CFLAGS@ |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
15790
diff
changeset
|
99 |
LLVM_LIBS=@LLVM_LIBS@ |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
15790
diff
changeset
|
100 |
LLVM_LDFLAGS=@LLVM_LDFLAGS@ |
b2cddec593f4
8011388: Support building zero and zeroshark with the new build
omajid
parents:
15790
diff
changeset
|
101 |
|
13697 | 102 |
ALT_OUTPUTDIR=$(HOTSPOT_OUTPUTDIR) |
103 |
ALT_EXPORT_PATH=$(HOTSPOT_DIST) |
|
104 |
||
37402 | 105 |
ifeq ($(HOTSPOT_TARGET_CPU), zero) |
22460
0273c023680c
8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents:
16581
diff
changeset
|
106 |
CC_INTERP=true |
0273c023680c
8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents:
16581
diff
changeset
|
107 |
endif |
0273c023680c
8017568: PPC64: Generic build preparations needed to enable new build on Linux/PPC64
simonis
parents:
16581
diff
changeset
|
108 |
|
14111 | 109 |
HOTSPOT_MAKE_ARGS:=@HOTSPOT_MAKE_ARGS@ @STATIC_CXX_SETTING@ |
13697 | 110 |
# Control wether Hotspot runs Queens test after building |
111 |
TEST_IN_BUILD=@TEST_IN_BUILD@ |
|
112 |
||
22721
63761da45392
8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents:
22469
diff
changeset
|
113 |
USE_CLANG := @USE_CLANG@ |
63761da45392
8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
ihse
parents:
22469
diff
changeset
|
114 |
|
14111 | 115 |
# For hotspot, override compiler/tools definition to not include FIXPATH prefix. |
116 |
# Hotspot has its own handling on the Windows path situation. |
|
34103 | 117 |
CXX:=@CCACHE@ @ICECC@ @HOTSPOT_CXX@ |
14111 | 118 |
LD:=@HOTSPOT_LD@ |
119 |
MT:=@HOTSPOT_MT@ |
|
120 |
RC:=@HOTSPOT_RC@ |
|
13697 | 121 |
|
36535
141db8da8c18
8151841: Build needs additional flags to compile with GCC 6
andrew
parents:
35032
diff
changeset
|
122 |
EXTRA_CFLAGS=@LEGACY_EXTRA_CFLAGS@ $(CFLAGS_CCACHE) $(NO_NULL_POINTER_CHECK_FLAG) \ |
141db8da8c18
8151841: Build needs additional flags to compile with GCC 6
andrew
parents:
35032
diff
changeset
|
123 |
$(NO_LIFETIME_DSE_CFLAG) $(CXXSTD_CXXFLAG) |
28812
6c36bc1ccc0e
8062223: Upgrading to ccache 1.3.10 disables the use of ccache
erikj
parents:
28809
diff
changeset
|
124 |
EXTRA_CXXFLAGS=@LEGACY_EXTRA_CXXFLAGS@ $(CFLAGS_CCACHE) |
13697 | 125 |
EXTRA_LDFLAGS=@LEGACY_EXTRA_LDFLAGS@ |
14111 | 126 |
|
14460
10ce34aca00e
8001941: build-infra: --disable-precompiled-headers does not seem to work
tbell
parents:
14111
diff
changeset
|
127 |
USE_PRECOMPILED_HEADER=@USE_PRECOMPILED_HEADER@ |
10ce34aca00e
8001941: build-infra: --disable-precompiled-headers does not seem to work
tbell
parents:
14111
diff
changeset
|
128 |
|
14615
2616975e69d3
8001753: build-infra: mismatch with full debug symbol control for hotspot
erikj
parents:
14460
diff
changeset
|
129 |
# Hotspot expects the variable FULL_DEBUG_SYMBOLS=1/0 to control debug symbols |
20363 | 130 |
# creation. |
35032 | 131 |
ifeq ($(COPY_DEBUG_SYMBOLS), true) |
14615
2616975e69d3
8001753: build-infra: mismatch with full debug symbol control for hotspot
erikj
parents:
14460
diff
changeset
|
132 |
FULL_DEBUG_SYMBOLS=1 |
20363 | 133 |
# Ensure hotspot uses the objcopy that configure located |
134 |
ALT_OBJCOPY:=$(OBJCOPY) |
|
135 |
else |
|
14615
2616975e69d3
8001753: build-infra: mismatch with full debug symbol control for hotspot
erikj
parents:
14460
diff
changeset
|
136 |
FULL_DEBUG_SYMBOLS=0 |
2616975e69d3
8001753: build-infra: mismatch with full debug symbol control for hotspot
erikj
parents:
14460
diff
changeset
|
137 |
endif |
2616975e69d3
8001753: build-infra: mismatch with full debug symbol control for hotspot
erikj
parents:
14460
diff
changeset
|
138 |
|
2616975e69d3
8001753: build-infra: mismatch with full debug symbol control for hotspot
erikj
parents:
14460
diff
changeset
|
139 |
# Hotspot expects the variable ZIP_DEBUGINFO_FILES=1/0 and not true/false. |
35032 | 140 |
ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true) |
14615
2616975e69d3
8001753: build-infra: mismatch with full debug symbol control for hotspot
erikj
parents:
14460
diff
changeset
|
141 |
ZIP_DEBUGINFO_FILES:=1 |
20640
66c24722698e
7165611: implement Full Debug Symbols on MacOS X hotspot
dcubed
parents:
16581
diff
changeset
|
142 |
else |
14615
2616975e69d3
8001753: build-infra: mismatch with full debug symbol control for hotspot
erikj
parents:
14460
diff
changeset
|
143 |
ZIP_DEBUGINFO_FILES:=0 |
2616975e69d3
8001753: build-infra: mismatch with full debug symbol control for hotspot
erikj
parents:
14460
diff
changeset
|
144 |
endif |
2616975e69d3
8001753: build-infra: mismatch with full debug symbol control for hotspot
erikj
parents:
14460
diff
changeset
|
145 |
|
35032 | 146 |
DEBUG_BINARIES := @DEBUG_BINARIES@ |
147 |
STRIP_POLICY := @STRIP_POLICY@ |
|
148 |
||
28809
6481e27e00ee
8071329: Stop exporting INCLUDE and LIB when building on windows
erikj
parents:
26549
diff
changeset
|
149 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
6481e27e00ee
8071329: Stop exporting INCLUDE and LIB when building on windows
erikj
parents:
26549
diff
changeset
|
150 |
# On Windows, the Visual Studio toolchain needs the LIB and INCLUDE |
6481e27e00ee
8071329: Stop exporting INCLUDE and LIB when building on windows
erikj
parents:
26549
diff
changeset
|
151 |
# environment variables (in Windows path style). |
6481e27e00ee
8071329: Stop exporting INCLUDE and LIB when building on windows
erikj
parents:
26549
diff
changeset
|
152 |
export INCLUDE:=@VS_INCLUDE@ |
6481e27e00ee
8071329: Stop exporting INCLUDE and LIB when building on windows
erikj
parents:
26549
diff
changeset
|
153 |
export LIB:=@VS_LIB@ |
6481e27e00ee
8071329: Stop exporting INCLUDE and LIB when building on windows
erikj
parents:
26549
diff
changeset
|
154 |
endif |
6481e27e00ee
8071329: Stop exporting INCLUDE and LIB when building on windows
erikj
parents:
26549
diff
changeset
|
155 |
|
14111 | 156 |
# Sneak this in via the spec.gmk file, since we don't want to mess around too much with the Hotspot make files. |
157 |
# This is needed to get the LOG setting to work properly. |
|
21759 | 158 |
include $(SRC_ROOT)/make/common/MakeBase.gmk |