author | ohair |
Wed, 16 Feb 2011 14:33:48 -0800 | |
changeset 8269 | f32efe2fd5f5 |
parent 8022 | d11e5f2eb62c |
child 8827 | f0f30d988312 |
permissions | -rw-r--r-- |
2 | 1 |
# |
7668 | 2 |
# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. |
2 | 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 |
|
5506 | 7 |
# published by the Free Software Foundation. Oracle designates this |
2 | 8 |
# particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
2 | 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 |
# |
|
5506 | 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. |
|
2 | 24 |
# |
25 |
||
26 |
# |
|
27 |
# Makefile to specify compiler flags for programs and libraries |
|
28 |
# targeted to Windows builds. Should not contain any rules. |
|
29 |
# |
|
30 |
# WARNING: This file is shared with other workspaces. |
|
31 |
# So when it includes other files, it must use JDK_TOPDIR. |
|
32 |
# |
|
33 |
||
34 |
# Get shared JDK settings |
|
35 |
include $(JDK_MAKE_SHARED_DIR)/Defs.gmk |
|
36 |
||
37 |
# CC compiler object code output directive flag value |
|
38 |
CC_OBJECT_OUTPUT_FLAG = -Fo |
|
39 |
CC_PROGRAM_OUTPUT_FLAG = -Fe |
|
40 |
||
41 |
# The suffix applied to the library name for FDLIBM |
|
42 |
FDDLIBM_SUFFIX = lib |
|
43 |
# The suffix applied to scripts (.bat for windows, nothing for unix) |
|
44 |
SCRIPT_SUFFIX = .bat |
|
45 |
||
46 |
# LIB_LOCATION, which for windows identifies where .exe files go, may be |
|
47 |
# set by each GNUmakefile. The default is BINDIR. |
|
48 |
ifndef LIB_LOCATION |
|
49 |
LIB_LOCATION = $(BINDIR) |
|
50 |
endif # LIB_LOCATION |
|
51 |
||
52 |
ifndef PLATFORM_SRC |
|
30
7ea1edf98bfe
6668781: Openjdk windows cygwin build failure: no rule to make linker_md.obj target
ohair
parents:
2
diff
changeset
|
53 |
PLATFORM_SRC = $(BUILDDIR)/../src/windows |
2 | 54 |
endif # PLATFORM_SRC |
55 |
||
56 |
# Platform specific closed sources |
|
57 |
ifndef OPENJDK |
|
58 |
ifndef CLOSED_PLATFORM_SRC |
|
30
7ea1edf98bfe
6668781: Openjdk windows cygwin build failure: no rule to make linker_md.obj target
ohair
parents:
2
diff
changeset
|
59 |
CLOSED_PLATFORM_SRC = $(BUILDDIR)/../src/closed/windows |
2 | 60 |
endif |
61 |
endif |
|
62 |
||
63 |
# for backwards compatability, the old "win32" is used here instead of |
|
64 |
# the more proper "windows" |
|
65 |
PLATFORM_INCLUDE_NAME = win32 |
|
66 |
PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME) |
|
67 |
||
68 |
# The following DLL's are considered MS runtime libraries and should |
|
69 |
# not to be REBASEd, see deploy/make/common/Release.gmk. |
|
8018
79ce40b4ab5e
6950375: Remove msvcrt.dll from the Windows JRE bundles
ohair
parents:
7669
diff
changeset
|
70 |
# msvcr*.dll: Microsoft runtimes |
2 | 71 |
ifeq ($(ARCH_DATA_MODEL), 32) |
72 |
ifeq ($(COMPILER_VERSION), VS2003) |
|
1776
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
73 |
MSVCRNN_DLL = msvcr71.dll |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
74 |
MSVCPNN_DLL = msvcp71.dll |
8018
79ce40b4ab5e
6950375: Remove msvcrt.dll from the Windows JRE bundles
ohair
parents:
7669
diff
changeset
|
75 |
MS_RUNTIME_LIBRARIES = msvcrt.dll $(MSVCRNN_DLL) |
1776
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
76 |
endif |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
77 |
ifeq ($(COMPILER_VERSION), VS2005) |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
78 |
MSVCRNN_DLL = msvcr80.dll |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
79 |
MSVCPNN_DLL = msvcp80.dll |
8018
79ce40b4ab5e
6950375: Remove msvcrt.dll from the Windows JRE bundles
ohair
parents:
7669
diff
changeset
|
80 |
MS_RUNTIME_LIBRARIES = msvcrt.dll $(MSVCRNN_DLL) |
1776
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
81 |
endif |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
82 |
ifeq ($(COMPILER_VERSION), VS2008) |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
83 |
MSVCRNN_DLL = msvcr90.dll |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
84 |
MSVCPNN_DLL = msvcp90.dll |
8018
79ce40b4ab5e
6950375: Remove msvcrt.dll from the Windows JRE bundles
ohair
parents:
7669
diff
changeset
|
85 |
MS_RUNTIME_LIBRARIES = msvcrt.dll $(MSVCRNN_DLL) |
2 | 86 |
endif |
5381
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
87 |
ifeq ($(COMPILER_VERSION), VS2010) |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
88 |
MSVCRNN_DLL = msvcr100.dll |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
89 |
MSVCPNN_DLL = msvcp100.dll |
8018
79ce40b4ab5e
6950375: Remove msvcrt.dll from the Windows JRE bundles
ohair
parents:
7669
diff
changeset
|
90 |
MS_RUNTIME_LIBRARIES = $(MSVCRNN_DLL) |
5381
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
91 |
endif |
2 | 92 |
endif |
93 |
||
2186
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2055
diff
changeset
|
94 |
ifeq ($(ARCH_DATA_MODEL), 64) |
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2055
diff
changeset
|
95 |
ifeq ($(COMPILER_VERSION), VS2008) |
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2055
diff
changeset
|
96 |
MSVCRNN_DLL = msvcr90.dll |
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2055
diff
changeset
|
97 |
MSVCPNN_DLL = msvcp90.dll |
8018
79ce40b4ab5e
6950375: Remove msvcrt.dll from the Windows JRE bundles
ohair
parents:
7669
diff
changeset
|
98 |
MS_RUNTIME_LIBRARIES = msvcrt.dll $(MSVCRNN_DLL) |
2186
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2055
diff
changeset
|
99 |
endif |
5381
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
100 |
ifeq ($(COMPILER_VERSION), VS2010) |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
101 |
MSVCRNN_DLL = msvcr100.dll |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
102 |
MSVCPNN_DLL = msvcp100.dll |
8018
79ce40b4ab5e
6950375: Remove msvcrt.dll from the Windows JRE bundles
ohair
parents:
7669
diff
changeset
|
103 |
MS_RUNTIME_LIBRARIES = $(MSVCRNN_DLL) |
5381
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
104 |
endif |
2186
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2055
diff
changeset
|
105 |
endif |
2 | 106 |
|
107 |
EXTRA_LFLAGS += /LIBPATH:$(DXSDK_LIB_PATH) |
|
108 |
||
109 |
# C Compiler flag definitions |
|
110 |
||
111 |
# |
|
112 |
# Default optimization |
|
113 |
# |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
114 |
|
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
115 |
ifndef OPTIMIZATION_LEVEL |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
116 |
ifeq ($(PRODUCT), java) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
117 |
OPTIMIZATION_LEVEL = HIGHER |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
118 |
else |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
119 |
OPTIMIZATION_LEVEL = LOWER |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
120 |
endif |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
121 |
endif |
2398
b0e6622ee72e
6604458: linux_x64-fastdebug-c2 fails on hyperbolic trig tests
ohair
parents:
2186
diff
changeset
|
122 |
ifndef FASTDEBUG_OPTIMIZATION_LEVEL |
b0e6622ee72e
6604458: linux_x64-fastdebug-c2 fails on hyperbolic trig tests
ohair
parents:
2186
diff
changeset
|
123 |
FASTDEBUG_OPTIMIZATION_LEVEL = LOWER |
b0e6622ee72e
6604458: linux_x64-fastdebug-c2 fails on hyperbolic trig tests
ohair
parents:
2186
diff
changeset
|
124 |
endif |
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
125 |
|
2 | 126 |
ifeq ($(CC_VERSION),msvc) |
127 |
# Visual Studio .NET 2003 or VS2003 compiler option definitions: |
|
128 |
# -O1 Favors reduced size over speed (-Og -Os -Oy -Ob2 -Gs -GF -Gy) |
|
129 |
# -O2 Favors speed over reduced size (-Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy) |
|
130 |
# -Ox Full optimization (use -O2) (-Og -Oi -Ot -Oy -Ob2) |
|
131 |
# (Removed in Visual Studio 2005 or VS2005) |
|
132 |
# -Ob2 More aggressive inlining |
|
133 |
# -Og Global optimizations |
|
134 |
# -Oi Replace some functions with intrinsic or special forms |
|
135 |
# -Op Improve floating point calculations (disables some optimizations) |
|
136 |
# (Replaced with -fp:precise in VS2005, /Op is default now) |
|
137 |
# -Os Favor small code |
|
138 |
# -Ot Favor faster code |
|
139 |
# -Oy Frame pointer omission |
|
140 |
# -GB Optimize for pentium (old VC6 option?) |
|
141 |
# -G6 VS2003 version of -GB? |
|
142 |
# -GF Pool strings in read-only memory |
|
143 |
# -Gf Pool strings in read-write memory (the default) |
|
144 |
# -Gs Controls stack probess |
|
145 |
# -GS Adds buffer overflow checks on stacks |
|
146 |
# (Default in VS2005) |
|
147 |
# -GX Enables exception handling |
|
148 |
# (Replaced with /EHsc in VS2005) |
|
149 |
# -Gy Function level linking only |
|
150 |
# |
|
151 |
# NOTE: With VC6, -Ox included -Gs. |
|
152 |
# NOTE: With VC6, -Ox, -O1, and -O2 used -Ob1, not -Ob2. |
|
153 |
# NOTE: With VC6, -O1 and -O2 used -Gf, not -GF. |
|
154 |
# |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
155 |
|
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
156 |
CC_OPT/NONE = -Od |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
157 |
CC_OPT/LOWER = -O2 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
158 |
CC_OPT/HIGHER = -O3 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
159 |
CC_OPT/HIGHEST = -O3 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
160 |
|
2 | 161 |
ifeq ($(COMPILER_VERSION), VC6) |
162 |
# VC6 (6.2) msvc compiler (the way Tiger and early Mustang were built) |
|
163 |
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch) |
|
164 |
AUTOMATIC_PCH_OPTION = |
|
165 |
GX_OPTION = -GX |
|
5381
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
166 |
GZ_OPTION = -GZ |
2 | 167 |
ifeq ($(ARCH_DATA_MODEL), 32) |
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
168 |
CC_OPT/HIGHEST = -Ox -Gy -Os -GB |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
169 |
CC_OPT/HIGHER = -Ox -Gy -Os -GB |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
170 |
CC_OPT/LOWER = -Ox -Gy -Os -GB |
2 | 171 |
else |
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
172 |
CC_OPT/HIGHEST = -Ox -Gy -Op |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
173 |
CC_OPT/HIGHER = -Ox -Gy -Op |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
174 |
CC_OPT/LOWER = -Ox -Gy -Op |
2 | 175 |
endif |
176 |
endif |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
177 |
|
2 | 178 |
ifeq ($(COMPILER_VERSION), VS2003) |
179 |
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch) |
|
180 |
AUTOMATIC_PCH_OPTION = -YX |
|
181 |
# Also known as VC7 compiler |
|
182 |
GX_OPTION = -GX |
|
5381
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
183 |
GZ_OPTION = -GZ |
2 | 184 |
ifeq ($(ARCH_DATA_MODEL), 32) |
185 |
# Lowered opt level to try and reduce footprint, dll size especially. |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
186 |
# Was: CC_OPT/HIGHEST = -O2 -G6 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
187 |
# Was: CC_OPT/HIGHER = -O2 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
188 |
CC_OPT/HIGHEST = -O2 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
189 |
CC_OPT/HIGHER = -O1 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
190 |
CC_OPT/LOWER = -O1 |
2 | 191 |
else |
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
192 |
CC_OPT/HIGHEST = -O2 -Op |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
193 |
CC_OPT/HIGHER = -O2 -Op |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
194 |
CC_OPT/LOWER = -O1 -Op |
2 | 195 |
endif |
196 |
endif |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
197 |
|
2 | 198 |
ifeq ($(COMPILER_VERSION), VS2005) |
199 |
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch) |
|
200 |
AUTOMATIC_PCH_OPTION = |
|
201 |
# VS2005 compiler, only with Platform SDK right now? |
|
202 |
GX_OPTION = -EHsc |
|
5381
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
203 |
GZ_OPTION = -RTC1 |
2 | 204 |
ifeq ($(ARCH_DATA_MODEL), 32) |
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
205 |
CC_OPT/HIGHEST = -O2 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
206 |
CC_OPT/HIGHER = -O1 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
207 |
CC_OPT/LOWER = -O1 |
2 | 208 |
else |
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
209 |
CC_OPT/HIGHEST = -O2 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
210 |
CC_OPT/HIGHER = -O1 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
211 |
CC_OPT/LOWER = -O1 |
2 | 212 |
endif |
213 |
endif |
|
1776
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
214 |
ifeq ($(COMPILER_VERSION), VS2008) |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
215 |
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch) |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
216 |
AUTOMATIC_PCH_OPTION = |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
217 |
GX_OPTION = -EHsc |
5381
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
218 |
GZ_OPTION = -RTC1 |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
219 |
ifeq ($(ARCH_DATA_MODEL), 32) |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
220 |
CC_OPT/HIGHEST = -O2 |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
221 |
CC_OPT/HIGHER = -O1 |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
222 |
CC_OPT/LOWER = -O1 |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
223 |
else |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
224 |
CC_OPT/HIGHEST = -O2 |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
225 |
CC_OPT/HIGHER = -O1 |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
226 |
CC_OPT/LOWER = -O1 |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
227 |
endif |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
228 |
endif |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
229 |
|
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
230 |
ifeq ($(COMPILER_VERSION), VS2010) |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
231 |
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch) |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
232 |
AUTOMATIC_PCH_OPTION = |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
233 |
GX_OPTION = -EHsc |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
234 |
GZ_OPTION = -RTC1 |
1776
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
235 |
ifeq ($(ARCH_DATA_MODEL), 32) |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
236 |
CC_OPT/HIGHEST = -O2 |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
237 |
CC_OPT/HIGHER = -O1 |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
238 |
CC_OPT/LOWER = -O1 |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
239 |
else |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
240 |
CC_OPT/HIGHEST = -O2 |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
241 |
CC_OPT/HIGHER = -O1 |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
242 |
CC_OPT/LOWER = -O1 |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
243 |
endif |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
244 |
endif |
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
245 |
|
2 | 246 |
else # CC_VERSION |
247 |
# GCC not supported, but left for historical reference... |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
248 |
CC_OPT/NONE = |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
249 |
CC_OPT/LOWER = -O2 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
250 |
CC_OPT/HIGHER = -O2 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
251 |
CC_OPT/HIGHEST = -O3 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
252 |
|
2 | 253 |
endif |
254 |
||
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
255 |
CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL)) |
2 | 256 |
|
257 |
# Select the runtime support library carefully, need to be consistent |
|
258 |
# |
|
259 |
# VS2003 compiler option definitions: |
|
260 |
# -MD Use dynamic multi-threaded runtime library |
|
261 |
# -MDd Use debug version (don't use, doesn't mix with -MD DLL's) |
|
262 |
# -MT Use static multi-threaded runtime library (-ML is going away) |
|
263 |
# -MTd Use static debug version (better than -MDd, no runtime issues) |
|
264 |
# -D_DEBUG Change use of malloc/free/etc to use special debug ones (-MTd) |
|
265 |
# |
|
1776
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
266 |
# NOTE: We also will use /D _STATIC_CPPLIB so we don't need msvcpnn.dll |
2 | 267 |
# |
1776
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
268 |
# If MS_RUNTIME_STATIC is requested, use -MT only with VS2003. |
2 | 269 |
ifeq ($(MS_RUNTIME_STATIC),true) |
1776
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
270 |
ifeq ($(COMPILER_VERSION), VS2003) |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
271 |
MS_RUNTIME_OPTION=-MT |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
272 |
endif |
2 | 273 |
else |
274 |
MS_RUNTIME_OPTION=-MD |
|
275 |
endif |
|
276 |
# The _DEBUG macro option (changes things like malloc to use debug version) |
|
277 |
MS_RUNTIME_DEBUG_OPTION= |
|
278 |
MS_RC_DEBUG_OPTION= |
|
279 |
# Externally set environment variable can force any build to use the debug vers |
|
280 |
ifeq ($(MFC_DEBUG), true) |
|
281 |
ifeq ($(MS_RUNTIME_STATIC),true) |
|
282 |
MS_RUNTIME_OPTION=-MTd |
|
283 |
else |
|
284 |
# This MS debugging flag forces a dependence on the debug |
|
8018
79ce40b4ab5e
6950375: Remove msvcrt.dll from the Windows JRE bundles
ohair
parents:
7669
diff
changeset
|
285 |
# version of the runtime library (MSVCR*D.DLL), as does -MDd. |
2 | 286 |
# We cannot re-distribute this debug runtime. |
287 |
MS_RUNTIME_OPTION=-MDd |
|
288 |
endif |
|
289 |
MS_RUNTIME_DEBUG_OPTION= -D_DEBUG |
|
290 |
MS_RC_DEBUG_OPTION= -d _DEBUG |
|
291 |
endif |
|
292 |
||
293 |
# Always add _STATIC_CPPLIB definition |
|
294 |
STATIC_CPPLIB_OPTION = /D _STATIC_CPPLIB |
|
7669
3ebe17bda998
6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents:
7668
diff
changeset
|
295 |
|
3ebe17bda998
6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents:
7668
diff
changeset
|
296 |
# Silence the warning about using _STATIC_CPPLIB |
3ebe17bda998
6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents:
7668
diff
changeset
|
297 |
ifneq ($(SHOW_ALL_WARNINGS),true) |
3ebe17bda998
6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents:
7668
diff
changeset
|
298 |
# Needed with VS2010 to turn off the deprecated warning. |
3ebe17bda998
6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents:
7668
diff
changeset
|
299 |
STATIC_CPPLIB_OPTION += /D _DISABLE_DEPRECATE_STATIC_CPPLIB |
3ebe17bda998
6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents:
7668
diff
changeset
|
300 |
endif |
3ebe17bda998
6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents:
7668
diff
changeset
|
301 |
|
2 | 302 |
MS_RUNTIME_OPTION += $(STATIC_CPPLIB_OPTION) |
303 |
||
304 |
ifeq ($(CC_VERSION),msvc) |
|
305 |
# VS2003 compiler option definitions: |
|
306 |
# -Zi Cause *.pdb file to be created, full debug information |
|
307 |
# -Z7 Full debug inside the .obj, no .pdb |
|
308 |
# -Zd Basic debug, no local variables? In the .obj |
|
309 |
# -Zl Don't add runtime library name to obj file? |
|
310 |
# -Od Turns off optimization and speeds compilation |
|
311 |
# -YX -Fp/.../foobar.pch Use precompiled headers (try someday?) |
|
312 |
# -nologo Don't print out startup message |
|
7669
3ebe17bda998
6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents:
7668
diff
changeset
|
313 |
# /D _STATIC_CPPLIB |
1776
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
314 |
# Use static link for the C++ runtime (so msvcpnn.dll not needed) |
2 | 315 |
# |
316 |
CFLAGS_COMMON += -Zi -nologo |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
317 |
CFLAGS_OPT = $(CC_OPT) |
2 | 318 |
CFLAGS_DBG = -Od $(MS_RUNTIME_DEBUG_OPTION) |
319 |
||
5381
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
320 |
# REMIND: I don't see where CFLAGS_VS2005 is used. I suspect its |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
321 |
# pulled in as a combined "CFLAGS_$(COMPILER_VERSION)" string |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
322 |
# but the lack of this isn't causing any apparent build problems |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
323 |
# with VS 2010 but it could be causing compiler warnings. |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
324 |
# For now, I will add it for all cases : |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
325 |
CFLAGS_VS2010 += -Zc:wchar_t- |
d6d64a42ff51
6931180: Migration to recent versions of MS Platform SDK
prr
parents:
3229
diff
changeset
|
326 |
# |
2 | 327 |
# Starting from VS2005 the wchar_t is handled as a built-in C/C++ data type |
328 |
# by default. However, we expect the wchar_t to be a typedef to the |
|
329 |
# unsigned short data type. The -Zc:wchar_t- option restores the old |
|
330 |
# behavior (as seen in VS2003) to avoid massive code modifications. |
|
331 |
# When/if our code will be "C/C++ Standard"-compliant (at least in the area |
|
332 |
# of handling the wchar_t type), the option won't be necessary. |
|
333 |
ifeq ($(ARCH_DATA_MODEL), 32) |
|
334 |
CFLAGS_VS2005 += -Zc:wchar_t- |
|
335 |
else |
|
336 |
# The 64bit Platform SDK we use (April 2005) doesn't like this option |
|
337 |
ifneq ($(CC_VER), 14.00.40310.41) |
|
338 |
CFLAGS_VS2005 += -Zc:wchar_t- |
|
339 |
endif |
|
340 |
endif |
|
341 |
||
342 |
# All builds get the same runtime setting |
|
343 |
CFLAGS_COMMON += $(MS_RUNTIME_OPTION) $(CFLAGS_$(COMPILER_VERSION)) |
|
344 |
||
345 |
||
346 |
LDEBUG = /debug |
|
347 |
||
348 |
ifeq ($(VTUNE_SUPPORT), true) |
|
349 |
OTHER_CFLAGS = -Z7 -Ox |
|
350 |
LDEBUG += /pdb:NONE |
|
351 |
endif |
|
352 |
||
353 |
# The new Platform SDK and VS2005 has /GS as a default and requires |
|
354 |
# bufferoverflowU.lib on the link command line, otherwise |
|
355 |
# we get missing __security_check_cookie externals at link time. |
|
356 |
BUFFEROVERFLOWLIB = bufferoverflowU.lib |
|
357 |
# Always add bufferoverflowU.lib to VS2005 link commands (pack uses LDDFLAGS) |
|
358 |
LFLAGS_VS2005 = $(BUFFEROVERFLOWLIB) |
|
359 |
||
1776
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
360 |
# VS2008 has bufferoverflow baked in: |
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
361 |
LFLAGS_VS2008 = |
8269
f32efe2fd5f5
7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents:
8022
diff
changeset
|
362 |
|
f32efe2fd5f5
7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents:
8022
diff
changeset
|
363 |
# VS2010, always need safe exception handlers, not needed on 64bit |
f32efe2fd5f5
7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents:
8022
diff
changeset
|
364 |
ifeq ($(ARCH_DATA_MODEL), 32) |
f32efe2fd5f5
7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents:
8022
diff
changeset
|
365 |
LFLAGS_VS2010 = -SAFESEH |
f32efe2fd5f5
7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents:
8022
diff
changeset
|
366 |
else |
f32efe2fd5f5
7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents:
8022
diff
changeset
|
367 |
LFLAGS_VS2010 = |
f32efe2fd5f5
7010594: Add /SAFESEH to links on windows to verify safe exceptions
ohair
parents:
8022
diff
changeset
|
368 |
endif |
1776
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
369 |
|
2 | 370 |
# LFLAGS are the flags given to $(LINK) and used to build the actual DLL file |
371 |
BASELFLAGS = -nologo /opt:REF /incremental:no |
|
1776
33e9405ab91b
6754862: jdk/src/windows/bin/java_md.c: hardcoded reference to msvcr71.dll
tbell
parents:
919
diff
changeset
|
372 |
|
2 | 373 |
LFLAGS = $(BASELFLAGS) $(LDEBUG) $(EXTRA_LFLAGS) $(LFLAGS_$(COMPILER_VERSION)) |
374 |
LDDFLAGS += $(LFLAGS_$(COMPILER_VERSION)) |
|
375 |
||
376 |
endif |
|
377 |
||
378 |
# |
|
379 |
# Preprocessor macro definitions |
|
380 |
# |
|
381 |
CPPFLAGS_COMMON = -DWIN32 -DIAL -D_LITTLE_ENDIAN |
|
382 |
ifeq ($(ARCH), amd64) |
|
383 |
CPPFLAGS_COMMON += -D_AMD64_ -Damd64 |
|
384 |
else |
|
849
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
847
diff
changeset
|
385 |
CPPFLAGS_COMMON += -D_X86_ -Dx86 |
2 | 386 |
endif |
387 |
CPPFLAGS_COMMON += -DWIN32_LEAN_AND_MEAN |
|
388 |
||
389 |
# |
|
390 |
# Output options (use specific filenames to avoid parallel compile errors) |
|
391 |
# |
|
392 |
CFLAGS_COMMON += -Fd$(OBJDIR)/$(basename $(@F)).pdb -Fm$(OBJDIR)/$(basename $(@F)).map |
|
393 |
||
394 |
# |
|
849
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
847
diff
changeset
|
395 |
# Use -wdNNNN to disable warning NNNN. |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
847
diff
changeset
|
396 |
# C4800 is a warning about bool performance casts (can't make go away) |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
847
diff
changeset
|
397 |
# |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
847
diff
changeset
|
398 |
COMPILER_WARNINGS_TO_IGNORE = 4800 |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
847
diff
changeset
|
399 |
CFLAGS_COMMON += $(COMPILER_WARNINGS_TO_IGNORE:%=-wd%) |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
847
diff
changeset
|
400 |
|
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
847
diff
changeset
|
401 |
# |
2 | 402 |
# Treat compiler warnings as errors, if requested |
403 |
# |
|
849
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
847
diff
changeset
|
404 |
CFLAGS_COMMON += -W$(COMPILER_WARNING_LEVEL) |
2 | 405 |
ifeq ($(COMPILER_WARNINGS_FATAL),true) |
406 |
CFLAGS_COMMON += -WX |
|
407 |
endif |
|
408 |
||
7669
3ebe17bda998
6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents:
7668
diff
changeset
|
409 |
# Turn off some warnings by default, enable them all if asked. |
3ebe17bda998
6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents:
7668
diff
changeset
|
410 |
ifneq ($(SHOW_ALL_WARNINGS),true) |
3ebe17bda998
6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents:
7668
diff
changeset
|
411 |
# The -D _CRT_SECURE_NO_DEPRECATE turns off security/deprecated warnings on |
3ebe17bda998
6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents:
7668
diff
changeset
|
412 |
# the standard C library functions like strcpy. |
3ebe17bda998
6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents:
7668
diff
changeset
|
413 |
CFLAGS_COMMON += -D _CRT_SECURE_NO_DEPRECATE |
3ebe17bda998
6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents:
7668
diff
changeset
|
414 |
# The -D _CRT_NONSTDC_NO_DEPRECATE turns off deprecation warnings about using |
3ebe17bda998
6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents:
7668
diff
changeset
|
415 |
# non-standard C POSIX functions. |
3ebe17bda998
6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents:
7668
diff
changeset
|
416 |
CFLAGS_COMMON += -D _CRT_NONSTDC_NO_DEPRECATE |
3ebe17bda998
6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents:
7668
diff
changeset
|
417 |
endif |
3ebe17bda998
6991482: Add global jdk makefile options to silence some VS2010 warnings
ohair
parents:
7668
diff
changeset
|
418 |
|
3222
432b8f34c3b0
6858127: Missing -DNDEBUG on Linux and Windows native code compiles
ohair
parents:
2398
diff
changeset
|
419 |
CPPFLAGS_OPT = -DNDEBUG |
2 | 420 |
CPPFLAGS_DBG = -DDEBUG -DLOGGING |
421 |
||
422 |
CXXFLAGS_COMMON = $(CFLAGS_COMMON) |
|
423 |
CXXFLAGS_OPT = $(CFLAGS_OPT) |
|
424 |
CXXFLAGS_DBG = $(CFLAGS_DBG) |
|
425 |
||
426 |
ifneq ($(LIBRARY),fdlibm) |
|
427 |
EXTRA_LIBS += advapi32.lib |
|
428 |
endif |
|
429 |
||
430 |
# |
|
431 |
# Path and option to link against the VM, if you have to. |
|
432 |
# |
|
433 |
JVMLIB = $(LIBDIR)/jvm.lib |
|
434 |
JAVALIB = $(LIBDIR)/java.lib |
|
435 |
||
436 |
ifeq ($(CC_VERSION), msvc) |
|
437 |
CC_DEPEND = -FD |
|
438 |
CC_DEPEND_FILTER = |
|
439 |
else # CC_VERSION |
|
440 |
# not supported, but left for historical reference... |
|
441 |
CC_DEPEND = -MM |
|
442 |
CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)&!g' |
|
443 |
endif # CC_VERSION |
|
444 |
||
445 |
LIBRARY_SUFFIX = dll |
|
446 |
LIB_SUFFIX = lib |
|
447 |
||
448 |
# Settings for the JDI - Serviceability Agent binding. |
|
449 |
HOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/bin |
|
450 |
SALIB_NAME = $(LIB_PREFIX)sawindbg.$(LIBRARY_SUFFIX) |
|
451 |
SAMAP_NAME = $(LIB_PREFIX)sawindbg.map |
|
452 |
SAPDB_NAME = $(LIB_PREFIX)sawindbg.pdb |
|
453 |
||
454 |
ifeq ($(ARCH), ia64) |
|
455 |
# SA will never be supported here. |
|
456 |
INCLUDE_SA = false |
|
457 |
else |
|
2055 | 458 |
INCLUDE_SA = true |
2 | 459 |
endif |
460 |
||
461 |
# Settings for the VERSIONINFO tap on windows. |
|
30
7ea1edf98bfe
6668781: Openjdk windows cygwin build failure: no rule to make linker_md.obj target
ohair
parents:
2
diff
changeset
|
462 |
VERSIONINFO_RESOURCE = $(BUILDDIR)/../src/windows/resource/version.rc |
2 | 463 |
|
464 |
ifneq ($(JDK_BUILD_NUMBER),) |
|
465 |
COOKED_BUILD_NUMBER = $(shell $(ECHO) $(JDK_BUILD_NUMBER) | $(SED) -e 's/^b//' -e 's/^0//') |
|
466 |
else |
|
467 |
COOKED_BUILD_NUMBER = 0 |
|
468 |
endif |
|
469 |
||
470 |
# If the update version contains non-numeric characters, we need |
|
471 |
# to massage it into a numeric format. |
|
472 |
# We use the following formula: |
|
473 |
# JDK_UPDATE_VER = JDK_UPDATE_VERSION * 10 + EXCEPTION_VERSION |
|
474 |
# |
|
475 |
# Here are some examples: |
|
476 |
# 1.5.0 b01 -> 5,0,0,1 |
|
477 |
# 1.5.0_10 b01 -> 5,0,100,1 |
|
478 |
# 1.4.2 b01 -> 4,2,0,1 |
|
479 |
# 1.4.2_02 b01 -> 4,2,20,1 |
|
480 |
# 1.4.2_02a b01 -> 4,2,21,1 |
|
481 |
# 1.4.2_02b b01 -> 4,2,22,1 |
|
482 |
ifdef JDK_UPDATE_VERSION |
|
483 |
VTMP := $(shell $(ECHO) $(JDK_UPDATE_VERSION) | $(TR) "abcde" "12345") |
|
484 |
CAB_CHAR1 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 1, 1);}') |
|
485 |
CAB_CHAR2 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 2, 1);}') |
|
486 |
CAB_CHAR3 := $(shell $(ECHO) $(VTMP) | $(NAWK) '{print substr($$1, 3, 1);}') |
|
487 |
JDK_UPDATE_META_TAG := U$(MARKETING_NUMBER) |
|
488 |
ifeq ($(CAB_CHAR3),) |
|
489 |
CAB_CHAR3 := 0 |
|
490 |
endif |
|
491 |
ifeq ($(CAB_CHAR1), 0) |
|
492 |
JDK_UPDATE_VER := $(CAB_CHAR2)$(CAB_CHAR3) |
|
493 |
else |
|
494 |
JDK_UPDATE_VER := $(CAB_CHAR1)$(CAB_CHAR2)$(CAB_CHAR3) |
|
495 |
endif |
|
496 |
else |
|
497 |
JDK_UPDATE_VER := 0 |
|
498 |
endif |
|
499 |
||
500 |
RC_FLAGS = /l 0x409 /r |
|
501 |
||
502 |
ifeq ($(VARIANT), OPT) |
|
503 |
RC_FLAGS += -d NDEBUG |
|
504 |
else |
|
505 |
RC_FLAGS += $(MS_RC_DEBUG_OPTION) |
|
506 |
endif |
|
507 |
||
847 | 508 |
# Values for the RC variables defined in RC_FLAGS |
509 |
JDK_RC_BUILD_ID = $(FULL_VERSION) |
|
510 |
JDK_RC_COMPANY = $(COMPANY_NAME) |
|
511 |
JDK_RC_COMPONENT = $(PRODUCT_NAME) $(JDK_RC_PLATFORM_NAME) binary |
|
512 |
JDK_RC_VER = \ |
|
513 |
$(JDK_MINOR_VERSION).$(JDK_MICRO_VERSION).$(JDK_UPDATE_VER).$(COOKED_BUILD_NUMBER) |
|
514 |
JDK_RC_COPYRIGHT = Copyright \xA9 $(COPYRIGHT_YEAR) |
|
515 |
JDK_RC_NAME = \ |
|
516 |
$(PRODUCT_NAME) $(JDK_RC_PLATFORM_NAME) $(JDK_MINOR_VERSION) $(JDK_UPDATE_META_TAG) |
|
517 |
JDK_RC_FVER = \ |
|
518 |
$(JDK_MINOR_VERSION),$(JDK_MICRO_VERSION),$(JDK_UPDATE_VER),$(COOKED_BUILD_NUMBER) |
|
2 | 519 |
|
3111
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
520 |
# JDK name required here |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
521 |
RC_FLAGS += -d "JDK_BUILD_ID=$(JDK_RC_BUILD_ID)" \ |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
522 |
-d "JDK_COMPANY=$(JDK_RC_COMPANY)" \ |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
523 |
-d "JDK_COMPONENT=$(JDK_RC_COMPONENT)" \ |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
524 |
-d "JDK_VER=$(JDK_RC_VER)" \ |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
525 |
-d "JDK_COPYRIGHT=$(JDK_RC_COPYRIGHT)" \ |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
526 |
-d "JDK_NAME=$(JDK_RC_NAME)" \ |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
527 |
-d "JDK_FVER=$(JDK_RC_FVER)" |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
528 |
|
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
529 |
# Enable 7-Zip LZMA file (de)compression for Java Kernel if it is available |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
530 |
ifeq ($(ARCH_DATA_MODEL), 32) |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
531 |
ifneq ($(KERNEL), off) |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
532 |
# This is a hack to use until 7-Zip (and UPX) bundles can be put |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
533 |
# under /java/devtools. |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
534 |
ifndef DEPLOY_TOPDIR |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
535 |
DEPLOY_TOPDIR=$(JDK_TOPDIR)/../deploy |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
536 |
endif |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
537 |
# Uncomment this block to cause build failure if above assumption false |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
538 |
#DCHK = $(shell if [ ! -d $(DEPLOY_TOPDIR) ] ; then \ |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
539 |
# $(ECHO) deploy_not_a_peer_of_j2se ; \ |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
540 |
#fi ) |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
541 |
#ifeq ($(DCHK), deploy_not_a_peer_of_j2se) |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
542 |
# If a build failure points to control coming here it means |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
543 |
# it means deploy is not in the same directory |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
544 |
# as j2se. Java Kernel can't tolerate that for the time being. |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
545 |
#endif |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
546 |
EC_TMP = $(shell if [ -d $(DEPLOY_TOPDIR)/make/lzma ] ; then \ |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
547 |
$(ECHO) true ; \ |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
548 |
else \ |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
549 |
$(ECHO) false ; \ |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
550 |
fi ) |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
551 |
ifeq ($(EC_TMP), true) |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
552 |
EXTRA_COMP_INSTALL_PATH = lib\\\\deploy\\\\lzma.dll |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
553 |
# Crazy but true: deploy/make/plugin/jinstall/Makefile.jkernel does |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
554 |
# not include deploy/make/common/Defs-windows.gmk, either directly |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
555 |
# or indirectly. But it does include this file, so redundantly declare |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
556 |
# these variables that are in deploy/make/common/Defs-windows.gmk for |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
557 |
# the sake of the Java Kernel part of the deploy build. Whew! |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
558 |
EXTRA_COMP_LIB_NAME = lzma.dll |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
559 |
EXTRA_COMP_PATH = $(OUTPUTDIR)/tmp/deploy/lzma/win32/obj |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
560 |
EXTRA_COMP_CMD_PATH = $(EXTRA_COMP_PATH)/lzma.exe |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
561 |
EXTRA_COMP_LIB_PATH = $(EXTRA_COMP_PATH)/$(EXTRA_COMP_LIB_NAME) |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
562 |
endif |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
563 |
endif |
fefdeafb7ab9
6797688: Umbrella: Merge all JDK 6u4 - 6u12 deployment code into JDK7
herrick
parents:
2398
diff
changeset
|
564 |
endif |