author | dsamersoff |
Thu, 17 Oct 2013 16:08:01 +0400 | |
changeset 21069 | 728330d2593a |
parent 20203 | 2e0b3aab117a |
child 20547 | 453837141fac |
child 20851 | 9f284cf7836b |
permissions | -rw-r--r-- |
14231 | 1 |
# |
2 |
# Copyright (c) 2011, 2012, 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 |
||
20203
2e0b3aab117a
8019219: Fix typo in jdk/makefiles "default" targets
ihse
parents:
19399
diff
changeset
|
26 |
default: all |
14231 | 27 |
|
28 |
include $(SPEC) |
|
29 |
include MakeBase.gmk |
|
30 |
include NativeCompilation.gmk |
|
31 |
||
32 |
# Setup the java compilers for the JDK build. |
|
33 |
include Setup.gmk |
|
34 |
||
15126
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14523
diff
changeset
|
35 |
# Prepare the find cache. Only used on windows. |
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14523
diff
changeset
|
36 |
$(eval $(call FillCacheFind,$(JDK_TOPDIR)/src/share/bin)) |
bceb690ccf35
8005540: build-infra: Improve incremental build speed on windows by caching find results
erikj
parents:
14523
diff
changeset
|
37 |
|
14231 | 38 |
# Build tools |
39 |
include Tools.gmk |
|
40 |
||
41 |
BUILD_LAUNCHERS= |
|
42 |
||
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
43 |
# When building a legacy overlay image (on solaris 64 bit), the launchers |
14231 | 44 |
# need to be built with a different rpath and a different output dir. |
45 |
ifeq ($(OVERLAY_IMAGES),true) |
|
46 |
ORIGIN_ROOT:=/../.. |
|
47 |
OUTPUT_SUBDIR:=$(OPENJDK_TARGET_CPU_ISADIR) |
|
48 |
else |
|
49 |
ORIGIN_ROOT:=/.. |
|
50 |
endif |
|
51 |
||
52 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
53 |
ORIGIN_ARG:=$(call SET_EXECUTABLE_ORIGIN) |
|
54 |
else |
|
55 |
ORIGIN_ARG:=$(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli) \ |
|
56 |
$(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli) |
|
57 |
endif |
|
58 |
||
59 |
# |
|
60 |
# Applications expect to be able to link against libjawt without invoking |
|
61 |
# System.loadLibrary("jawt") first. This was the behaviour described in the |
|
62 |
# devloper documentation of JAWT and what worked with OpenJDK6. |
|
63 |
# |
|
64 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), linux solaris),) |
|
65 |
ORIGIN_ARG+=$(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/lib$(OPENJDK_TARGET_CPU_LIBDIR)) \ |
|
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
66 |
$(call SET_EXECUTABLE_ORIGIN,$(ORIGIN_ROOT)/jre/lib$(OPENJDK_TARGET_CPU_LIBDIR)) |
14231 | 67 |
endif |
68 |
||
69 |
define SetupLauncher |
|
70 |
# TODO: Fix mapfile on solaris. Won't work with ld as linker. |
|
71 |
# Parameter 1 is the name of the launcher (java,javac,jar...) |
|
72 |
# Parameter 2 is extra CFLAGS |
|
73 |
# Parameter 3 is extra LDFLAGS |
|
74 |
# Parameter 4 is extra LDFLAGS_SUFFIX_posix |
|
75 |
# Parameter 5 is extra LDFLAGS_SUFFIX_windows |
|
76 |
# Parameter 6 is optional Windows JLI library (full path) |
|
77 |
# Parameter 7 is optional Windows resource (RC) flags |
|
78 |
# Parameter 8 is optional Windows version resource file (.rc) |
|
79 |
# Parameter 9 is different output dir |
|
80 |
# Parameter 10 if set, link statically with c runtime on windows. |
|
81 |
# Parameter 11 if set, override plist file on macosx. |
|
82 |
||
83 |
$1_WINDOWS_JLI_LIB:=$(JDK_OUTPUTDIR)/objs/libjli/jli.lib |
|
84 |
ifneq ($6,) |
|
85 |
$1_WINDOWS_JLI_LIB:=$6 |
|
86 |
endif |
|
87 |
$1_VERSION_INFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc |
|
88 |
ifneq ($8,) |
|
89 |
$1_VERSION_INFO_RESOURCE:=$8 |
|
90 |
endif |
|
91 |
||
92 |
$1_LDFLAGS := $3 |
|
93 |
$1_LDFLAGS_SUFFIX := |
|
94 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
95 |
$1_PLIST_FILE:=Info-cmdline.plist |
|
96 |
ifneq ($(11),) |
|
97 |
$1_PLIST_FILE:=$(11) |
|
17732
79c019dd5279
8013489: New build system does not run codesign on SA-related launchers on OS X
erikj
parents:
17506
diff
changeset
|
98 |
ifneq ($$(findstring privileged,$$($1_PLIST_FILE)),) |
79c019dd5279
8013489: New build system does not run codesign on SA-related launchers on OS X
erikj
parents:
17506
diff
changeset
|
99 |
$1_CODESIGN:=true |
79c019dd5279
8013489: New build system does not run codesign on SA-related launchers on OS X
erikj
parents:
17506
diff
changeset
|
100 |
endif |
14231 | 101 |
endif |
102 |
||
103 |
$1_LDFLAGS += -Wl,-all_load $(JDK_OUTPUTDIR)/objs/libjli_static.a \ |
|
104 |
-framework Cocoa -framework Security -framework ApplicationServices \ |
|
105 |
-sectcreate __TEXT __info_plist $(JDK_TOPDIR)/src/macosx/lib/$$($1_PLIST_FILE) |
|
106 |
$1_LDFLAGS_SUFFIX += -pthread |
|
107 |
endif |
|
108 |
||
109 |
ifeq ($(USE_EXTERNAL_LIBZ), true) |
|
110 |
$1_LDFLAGS_SUFFIX += -lz |
|
111 |
endif |
|
112 |
||
113 |
$1_OUTPUT_DIR_ARG:=$9 |
|
114 |
ifeq (,$$($1_OUTPUT_DIR_ARG)) |
|
115 |
$1_OUTPUT_DIR_ARG:=$(JDK_OUTPUTDIR)/bin |
|
116 |
endif |
|
117 |
||
118 |
# TODO: maybe it's better to move this if-statement out of this function |
|
119 |
ifeq ($1,java) |
|
120 |
$1_OPTIMIZATION_ARG:=HIGH |
|
121 |
$1_LDFLAGS_solaris:=-R$(OPENWIN_HOME)/lib$(OPENJDK_TARGET_CPU_ISADIR) |
|
122 |
else |
|
123 |
$1_OPTIMIZATION_ARG:=LOW |
|
124 |
endif |
|
125 |
||
126 |
$1_CFLAGS:=$(CFLAGS_JDKEXE) |
|
127 |
ifeq ($(10),true) |
|
128 |
$1_CFLAGS:=$(filter-out -MD,$(CFLAGS_JDKEXE)) |
|
129 |
endif |
|
130 |
||
131 |
ifneq ($(wildcard $(JDK_TOPDIR)/makefiles/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU)),) |
|
132 |
$1_MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/launchers/mapfile-$(OPENJDK_TARGET_CPU) |
|
133 |
else |
|
134 |
$1_MAPFILE:= |
|
135 |
endif |
|
136 |
||
137 |
$(call SetupNativeCompilation,BUILD_LAUNCHER_$1,\ |
|
138 |
SRC:=$(JDK_TOPDIR)/src/share/bin,\ |
|
139 |
INCLUDE_FILES:=main.c,\ |
|
140 |
LANG:=C,\ |
|
141 |
OPTIMIZATION:=$$($1_OPTIMIZATION_ARG), \ |
|
142 |
CFLAGS:=$$($1_CFLAGS) \ |
|
143 |
-I$(JDK_TOPDIR)/src/share/bin \ |
|
144 |
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/bin \ |
|
145 |
-I$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS)/bin \ |
|
146 |
-DFULL_VERSION='"$(FULL_VERSION)"' \ |
|
147 |
-DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \ |
|
148 |
-DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \ |
|
149 |
-DLIBARCHNAME='"$(OPENJDK_TARGET_CPU_LEGACY)"' \ |
|
150 |
-DLAUNCHER_NAME='"$(LAUNCHER_NAME)"' \ |
|
151 |
-DPROGNAME='"$1"' $(DPACKAGEPATH) \ |
|
152 |
$2,\ |
|
153 |
CFLAGS_linux:=-fPIC,\ |
|
154 |
CFLAGS_solaris:=-KPIC -DHAVE_GETHRTIME,\ |
|
155 |
LDFLAGS:=$(LDFLAGS_JDKEXE) \ |
|
156 |
$(ORIGIN_ARG) \ |
|
157 |
$$($1_LDFLAGS),\ |
|
158 |
LDFLAGS_macosx:=$(call SET_SHARED_LIBRARY_NAME,$1),\ |
|
159 |
LDFLAGS_linux:=-lpthread \ |
|
160 |
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)),\ |
|
161 |
LDFLAGS_solaris:=$$($1_LDFLAGS_solaris) \ |
|
162 |
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)),\ |
|
163 |
MAPFILE := $$($1_MAPFILE), \ |
|
164 |
LDFLAGS_SUFFIX:=$(LDFLAGS_JDKEXE_SUFFIX) $$($1_LDFLAGS_SUFFIX),\ |
|
165 |
LDFLAGS_SUFFIX_posix:=$4,\ |
|
166 |
LDFLAGS_SUFFIX_windows:=$$($1_WINDOWS_JLI_LIB) \ |
|
167 |
$(JDK_OUTPUTDIR)/objs/libjava/java.lib advapi32.lib $5,\ |
|
168 |
LDFLAGS_SUFFIX_linux:=-L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli $(LIBDL) -lc, \ |
|
169 |
LDFLAGS_SUFFIX_solaris:=-L$(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli -ljli -lthread $(LIBDL) -lc, \ |
|
170 |
OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/$1_objs$(OUTPUT_SUBDIR),\ |
|
171 |
OUTPUT_DIR:=$$($1_OUTPUT_DIR_ARG)$(OUTPUT_SUBDIR),\ |
|
172 |
PROGRAM:=$1,\ |
|
173 |
DEBUG_SYMBOLS:=true,\ |
|
174 |
VERSIONINFO_RESOURCE:=$$($1_VERSION_INFO_RESOURCE),\ |
|
175 |
RC_FLAGS:=$(RC_FLAGS)\ |
|
176 |
-D "JDK_FNAME=$1$(EXE_SUFFIX)" \ |
|
177 |
-D "JDK_INTERNAL_NAME=$1" \ |
|
178 |
-D "JDK_FTYPE=0x1L" \ |
|
179 |
$7,\ |
|
17732
79c019dd5279
8013489: New build system does not run codesign on SA-related launchers on OS X
erikj
parents:
17506
diff
changeset
|
180 |
MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/java.manifest,\ |
79c019dd5279
8013489: New build system does not run codesign on SA-related launchers on OS X
erikj
parents:
17506
diff
changeset
|
181 |
CODESIGN:=$$($1_CODESIGN)) |
14231 | 182 |
|
183 |
BUILD_LAUNCHERS += $$(BUILD_LAUNCHER_$1) |
|
184 |
||
185 |
ifeq ($(OPENJDK_TARGET_OS),macosx) |
|
186 |
$$(BUILD_LAUNCHER_$1) : $(JDK_OUTPUTDIR)/objs/libjli_static.a |
|
187 |
endif |
|
188 |
||
189 |
ifeq ($(OPENJDK_TARGET_OS),windows) |
|
190 |
$$(BUILD_LAUNCHER_$1) : $(JDK_OUTPUTDIR)/objs/libjava/java.lib \ |
|
191 |
$$($1_WINDOWS_JLI_LIB) |
|
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
192 |
endif |
14231 | 193 |
endef |
194 |
||
195 |
########################################################################################## |
|
196 |
||
197 |
XLIBS:=$(X_LIBS) -lX11 |
|
198 |
ifeq ($(OPENJDK_TARGET_OS),macosx) |
|
199 |
DPACKAGEPATH:=-DPACKAGE_PATH='"$(PACKAGE_PATH)"' |
|
200 |
XLIBS:= |
|
201 |
endif |
|
202 |
||
203 |
ifdef OPENJDK |
|
204 |
JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/windows/resource/icons" |
|
205 |
else |
|
206 |
JAVA_RC_FLAGS += -i "$(JDK_TOPDIR)/src/closed/windows/native/sun/windows" |
|
207 |
endif |
|
208 |
||
209 |
# On windows, the debuginfo files get the same name as for java.dll. Build |
|
210 |
# into another dir and copy selectively so debuginfo for java.dll isn't |
|
211 |
# overwritten. |
|
212 |
$(eval $(call SetupLauncher,java,\ |
|
213 |
-DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib,\ |
|
214 |
$(JDK_OUTPUTDIR)/objs/jli_static.lib,$(JAVA_RC_FLAGS),\ |
|
215 |
$(JDK_TOPDIR)/src/windows/resource/java.rc,$(JDK_OUTPUTDIR)/objs/java_objs,true)) |
|
216 |
||
217 |
$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java) |
|
218 |
$(MKDIR) -p $(@D) |
|
219 |
$(RM) $@ |
|
220 |
$(CP) $(JDK_OUTPUTDIR)/objs/java_objs$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX) $@ |
|
221 |
||
222 |
BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX) |
|
223 |
||
224 |
ifeq ($(OPENJDK_TARGET_OS),windows) |
|
225 |
$(eval $(call SetupLauncher,javaw,\ |
|
226 |
-DJAVAW -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib,\ |
|
227 |
$(JDK_OUTPUTDIR)/objs/jli_static.lib,$(JAVA_RC_FLAGS),\ |
|
228 |
$(JDK_TOPDIR)/src/windows/resource/java.rc,,true)) |
|
229 |
endif |
|
230 |
||
231 |
||
232 |
ifndef BUILD_HEADLESS_ONLY |
|
233 |
$(eval $(call SetupLauncher,appletviewer,\ |
|
234 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.applet.Main"$(COMMA) }',,\ |
|
235 |
$(XLIBS))) |
|
236 |
endif |
|
237 |
||
238 |
$(eval $(call SetupLauncher,extcheck,\ |
|
239 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.extcheck.Main"$(COMMA) }')) |
|
240 |
||
241 |
$(eval $(call SetupLauncher,idlj,\ |
|
242 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.corba.se.idl.toJavaPortable.Compile"$(COMMA) }')) |
|
243 |
||
244 |
$(eval $(call SetupLauncher,jar,\ |
|
245 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jar.Main"$(COMMA) }')) |
|
246 |
||
247 |
$(eval $(call SetupLauncher,jarsigner,\ |
|
14523
643702cd3aa8
8003960: build-infra: Jarsigner launcher has wrong classname
erikj
parents:
14235
diff
changeset
|
248 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.jarsigner.Main"$(COMMA) }')) |
14231 | 249 |
|
250 |
$(eval $(call SetupLauncher,javac,\ |
|
251 |
-DEXPAND_CLASSPATH_WILDCARDS \ |
|
252 |
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \ |
|
253 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javac.Main"$(COMMA) }')) |
|
254 |
||
255 |
ifeq ($(ENABLE_SJAVAC),yes) |
|
256 |
$(eval $(call SetupLauncher,sjavac,\ |
|
257 |
-DEXPAND_CLASSPATH_WILDCARDS \ |
|
258 |
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \ |
|
259 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.sjavac.Main"$(COMMA) }')) |
|
260 |
endif |
|
261 |
||
262 |
$(eval $(call SetupLauncher,javadoc,\ |
|
263 |
-DEXPAND_CLASSPATH_WILDCARDS \ |
|
264 |
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \ |
|
265 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javadoc.Main"$(COMMA) }')) |
|
266 |
||
267 |
$(eval $(call SetupLauncher,javah,\ |
|
268 |
-DEXPAND_CLASSPATH_WILDCARDS \ |
|
269 |
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \ |
|
270 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javah.Main"$(COMMA) }')) |
|
271 |
||
272 |
$(eval $(call SetupLauncher,javap,\ |
|
273 |
-DEXPAND_CLASSPATH_WILDCARDS \ |
|
274 |
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \ |
|
275 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.javap.Main"$(COMMA) }')) |
|
276 |
||
14994
a544909d1d1c
8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
14523
diff
changeset
|
277 |
$(eval $(call SetupLauncher,jdeps,\ |
a544909d1d1c
8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
14523
diff
changeset
|
278 |
-DEXPAND_CLASSPATH_WILDCARDS \ |
a544909d1d1c
8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
14523
diff
changeset
|
279 |
-DNEVER_ACT_AS_SERVER_CLASS_MACHINE \ |
a544909d1d1c
8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
14523
diff
changeset
|
280 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.jdeps.Main"$(COMMA) }')) |
a544909d1d1c
8003562: Provide a CLI tool to analyze class dependencies
mchung
parents:
14523
diff
changeset
|
281 |
|
14231 | 282 |
BUILD_LAUNCHER_jconsole_CFLAGS_windows:=-DJAVAW |
283 |
BUILD_LAUNCHER_jconsole_LDFLAGS_windows:=user32.lib |
|
284 |
||
285 |
$(eval $(call SetupLauncher,jconsole,\ |
|
286 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "-J-Djconsole.showOutputViewer"$(COMMA) "sun.tools.jconsole.JConsole"$(COMMA) }' \ |
|
287 |
-DAPP_CLASSPATH='{ "/lib/jconsole.jar"$(COMMA) "/lib/tools.jar"$(COMMA) "/classes" }')) |
|
288 |
||
289 |
$(eval $(call SetupLauncher,jdb,\ |
|
290 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.example.debug.tty.TTY"$(COMMA) }' \ |
|
291 |
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }')) |
|
292 |
||
293 |
$(eval $(call SetupLauncher,jhat,\ |
|
294 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.hat.Main"$(COMMA) }')) |
|
295 |
||
296 |
$(eval $(call SetupLauncher,jinfo,\ |
|
297 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \ |
|
298 |
"-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \ |
|
299 |
"-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \ |
|
300 |
"sun.tools.jinfo.JInfo"$(COMMA) }' \ |
|
301 |
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \ |
|
302 |
,,,,,,,,,Info-privileged.plist)) |
|
303 |
||
304 |
$(eval $(call SetupLauncher,jmap,\ |
|
305 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \ |
|
306 |
"-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \ |
|
307 |
"-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \ |
|
308 |
"sun.tools.jmap.JMap"$(COMMA) }' \ |
|
309 |
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \ |
|
310 |
,,,,,,,,,Info-privileged.plist)) |
|
311 |
||
312 |
$(eval $(call SetupLauncher,jps,\ |
|
313 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jps.Jps"$(COMMA) }')) |
|
314 |
||
315 |
$(eval $(call SetupLauncher,jrunscript,\ |
|
316 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.script.shell.Main"$(COMMA) }')) |
|
317 |
||
16029 | 318 |
$(eval $(call SetupLauncher,jjs,\ |
319 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "jdk.nashorn.tools.Shell"$(COMMA) }')) |
|
320 |
||
14231 | 321 |
$(eval $(call SetupLauncher,jsadebugd,\ |
322 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.jvm.hotspot.jdi.SADebugServer"$(COMMA) }' \ |
|
323 |
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \ |
|
324 |
,,,,,,,,,Info-privileged.plist)) |
|
325 |
||
326 |
$(eval $(call SetupLauncher,jstack,\ |
|
327 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \ |
|
328 |
"-J-Dsun.jvm.hotspot.debugger.useProcDebugger"$(COMMA) \ |
|
329 |
"-J-Dsun.jvm.hotspot.debugger.useWindbgDebugger"$(COMMA) \ |
|
330 |
"sun.tools.jstack.JStack"$(COMMA) }' \ |
|
331 |
-DAPP_CLASSPATH='{ "/lib/tools.jar"$(COMMA) "/lib/sa-jdi.jar"$(COMMA) "/classes" }' \ |
|
332 |
,,,,,,,,,Info-privileged.plist)) |
|
333 |
||
334 |
$(eval $(call SetupLauncher,jstat,\ |
|
335 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstat.Jstat"$(COMMA) }')) |
|
336 |
||
337 |
$(eval $(call SetupLauncher,jstatd,\ |
|
338 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jstatd.Jstatd"$(COMMA) }')) |
|
339 |
||
340 |
$(eval $(call SetupLauncher,keytool,\ |
|
14235 | 341 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.keytool.Main"$(COMMA) }')) |
14231 | 342 |
|
343 |
$(eval $(call SetupLauncher,native2ascii,\ |
|
344 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.native2ascii.Main"$(COMMA) }')) |
|
345 |
||
346 |
ifndef BUILD_HEADLESS_ONLY |
|
347 |
$(eval $(call SetupLauncher,policytool,\ |
|
348 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.tools.policytool.PolicyTool"$(COMMA) }',,\ |
|
349 |
$(XLIBS))) |
|
350 |
endif |
|
351 |
||
352 |
$(eval $(call SetupLauncher,rmic,\ |
|
353 |
-DEXPAND_CLASSPATH_WILDCARDS \ |
|
354 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.rmic.Main"$(COMMA) }')) |
|
355 |
||
356 |
$(eval $(call SetupLauncher,schemagen,\ |
|
357 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.jxc.SchemaGenerator"$(COMMA) }')) |
|
358 |
||
359 |
$(eval $(call SetupLauncher,serialver,\ |
|
360 |
-DEXPAND_CLASSPATH_WILDCARDS \ |
|
361 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.serialver.SerialVer"$(COMMA) }')) |
|
362 |
||
363 |
$(eval $(call SetupLauncher,xjc,\ |
|
364 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.xjc.Driver"$(COMMA) }')) |
|
365 |
||
366 |
$(eval $(call SetupLauncher,wsgen,\ |
|
367 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsGen"$(COMMA) }')) |
|
368 |
||
369 |
$(eval $(call SetupLauncher,wsimport,\ |
|
370 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.tools.internal.ws.WsImport"$(COMMA) }')) |
|
371 |
||
372 |
$(eval $(call SetupLauncher,orbd,\ |
|
373 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \ |
|
374 |
"-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \ |
|
375 |
"-J-Dcom.sun.CORBA.activation.Port=1049"$(COMMA) \ |
|
376 |
"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \ |
|
377 |
"com.sun.corba.se.impl.activation.ORBD"$(COMMA) }')) |
|
378 |
||
379 |
$(eval $(call SetupLauncher,servertool,\ |
|
380 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.corba.se.impl.activation.ServerTool"$(COMMA) }')) |
|
381 |
||
382 |
$(eval $(call SetupLauncher,tnameserv,\ |
|
383 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) \ |
|
384 |
"-J-Dcom.sun.CORBA.activation.DbDir=./orb.db"$(COMMA) \ |
|
385 |
"-J-Djava.util.logging.LoggingPermission=contol"$(COMMA) \ |
|
386 |
"-J-Dcom.sun.CORBA.POA.ORBServerId=1"$(COMMA) \ |
|
387 |
"com.sun.corba.se.impl.naming.cosnaming.TransientNameServer"$(COMMA) }')) |
|
388 |
||
389 |
$(eval $(call SetupLauncher,pack200,\ |
|
390 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "com.sun.java.util.jar.pack.Driver"$(COMMA) "--pack" }')) |
|
391 |
||
392 |
$(eval $(call SetupLauncher,rmid,\ |
|
393 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.server.Activation"$(COMMA) }')) |
|
394 |
||
395 |
$(eval $(call SetupLauncher,rmiregistry,\ |
|
396 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.rmi.registry.RegistryImpl"$(COMMA) }')) |
|
397 |
||
398 |
$(eval $(call SetupLauncher,jcmd,\ |
|
399 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.tools.jcmd.JCmd"$(COMMA) }')) |
|
400 |
||
401 |
ifeq ($(OPENJDK_TARGET_OS),windows) |
|
402 |
$(eval $(call SetupLauncher,kinit,\ |
|
403 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Kinit"$(COMMA) }')) |
|
404 |
||
405 |
$(eval $(call SetupLauncher,klist,\ |
|
406 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Klist"$(COMMA) }')) |
|
407 |
||
408 |
$(eval $(call SetupLauncher,ktab,\ |
|
409 |
-DJAVA_ARGS='{ "-J-ms8m"$(COMMA) "sun.security.krb5.internal.tools.Ktab"$(COMMA) }')) |
|
410 |
endif |
|
411 |
||
412 |
########################################################################################## |
|
413 |
# The order of the object files on the link command line affects the size of the resulting |
|
414 |
# binary (at least on linux) which causes the size to differ between old and new build. |
|
415 |
ifeq ($(USE_EXTERNAL_LIBZ), true) |
|
416 |
UNPACKEXE_CFLAGS := -DSYSTEM_ZLIB |
|
417 |
UNPACKEXE_ZIPOBJS := -lz |
|
418 |
else |
|
419 |
UNPACKEXE_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/java/util/zip/zlib-1.2.5 |
|
420 |
UNPACKEXE_ZIPOBJS := $(JDK_OUTPUTDIR)/objs/libzip/zcrc32$(OBJ_SUFFIX) \ |
|
421 |
$(JDK_OUTPUTDIR)/objs/libzip/deflate$(OBJ_SUFFIX) \ |
|
422 |
$(JDK_OUTPUTDIR)/objs/libzip/trees$(OBJ_SUFFIX) \ |
|
423 |
$(JDK_OUTPUTDIR)/objs/libzip/zadler32$(OBJ_SUFFIX) \ |
|
424 |
$(JDK_OUTPUTDIR)/objs/libzip/compress$(OBJ_SUFFIX) \ |
|
425 |
$(JDK_OUTPUTDIR)/objs/libzip/zutil$(OBJ_SUFFIX) \ |
|
426 |
$(JDK_OUTPUTDIR)/objs/libzip/inflate$(OBJ_SUFFIX) \ |
|
427 |
$(JDK_OUTPUTDIR)/objs/libzip/infback$(OBJ_SUFFIX) \ |
|
428 |
$(JDK_OUTPUTDIR)/objs/libzip/inftrees$(OBJ_SUFFIX) \ |
|
429 |
$(JDK_OUTPUTDIR)/objs/libzip/inffast$(OBJ_SUFFIX) |
|
430 |
||
431 |
endif |
|
432 |
||
433 |
ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc) |
|
434 |
UNPACKEXE_CFLAGS += -xregs=no%appl |
|
435 |
UNPACKEXE_LDFLAGS_solaris += -xmemalign=4s |
|
436 |
endif |
|
437 |
||
438 |
UNPACKEXE_LANG:=C |
|
439 |
ifeq ($(OPENJDK_TARGET_OS),solaris) |
|
440 |
UNPACKEXE_LANG:=C++ |
|
441 |
endif |
|
442 |
# On windows, unpack200 is linked completely differently to all other |
|
443 |
# executables, using the compiler with the compiler arguments. |
|
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
444 |
# It's also linked incrementally, producing a .ilk file that needs to |
14231 | 445 |
# be kept away. |
446 |
ifeq ($(OPENJDK_TARGET_OS),windows) |
|
447 |
BUILD_UNPACKEXE_LDEXE:=$(CC) |
|
448 |
EXE_OUT_OPTION_save:=$(EXE_OUT_OPTION) |
|
449 |
EXE_OUT_OPTION:=-Fe |
|
450 |
endif |
|
451 |
$(eval $(call SetupNativeCompilation,BUILD_UNPACKEXE,\ |
|
452 |
SRC:=$(JDK_TOPDIR)/src/share/native/com/sun/java/util/jar/pack,\ |
|
453 |
EXCLUDE_FILES:=jni.cpp,\ |
|
454 |
LANG:=$(UNPACKEXE_LANG),\ |
|
455 |
OPTIMIZATION:=LOW, \ |
|
456 |
CFLAGS:=$(UNPACKEXE_CFLAGS) $(CXXFLAGS_JDKEXE)\ |
|
457 |
-DFULL, \ |
|
458 |
CFLAGS_release:=-DPRODUCT,\ |
|
459 |
CFLAGS_linux:=-fPIC,\ |
|
460 |
CFLAGS_solaris:=-KPIC, \ |
|
461 |
CFLAGS_macosx:=-fPIC, \ |
|
462 |
MAPFILE:=$(JDK_TOPDIR)/makefiles/mapfiles/libunpack/mapfile-vers-unpack200,\ |
|
463 |
LDFLAGS:=$(UNPACKEXE_ZIPOBJS),\ |
|
464 |
LDFLAGS_windows:=$(CXXFLAGS_JDKEXE),\ |
|
465 |
LDFLAGS_posix:=$(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \ |
|
466 |
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)unpack$(SHARED_LIBRARY_SUFFIX)) \ |
|
467 |
$(call SET_SHARED_LIBRARY_ORIGIN),\ |
|
468 |
LDFLAGS_linux:=-lc,\ |
|
469 |
LDFLAGS_solaris:=$(UNPACKEXE_LDFLAGS_solaris) -lc,\ |
|
470 |
LDFLAGS_SUFFIX:=$(LIBCXX),\ |
|
471 |
OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR),\ |
|
472 |
OUTPUT_DIR:=$(JDK_OUTPUTDIR)/objs/unpackexe$(OUTPUT_SUBDIR),\ |
|
473 |
PROGRAM:=unpack200,\ |
|
474 |
VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/windows/resource/version.rc,\ |
|
475 |
RC_FLAGS:=$(RC_FLAGS)\ |
|
476 |
-D "JDK_FNAME=unpack200.exe" \ |
|
477 |
-D "JDK_INTERNAL_NAME=unpack200" \ |
|
478 |
-D "JDK_FTYPE=0x1L",\ |
|
17506
f44b96992f26
8015087: Provide debugging information for programs
andrew
parents:
16636
diff
changeset
|
479 |
DEBUG_SYMBOLS:=true,\ |
14231 | 480 |
MANIFEST:=$(JDK_TOPDIR)/src/windows/resource/unpack200_proto.exe.manifest)) |
481 |
||
482 |
ifeq ($(OPENJDK_TARGET_OS),windows) |
|
483 |
EXE_OUT_OPTION:=$(EXE_OUT_OPTION_save) |
|
484 |
endif |
|
485 |
||
486 |
ifneq ($(USE_EXTERNAL_LIBZ), true) |
|
487 |
||
488 |
$(BUILD_UNPACKEXE) : $(UNPACKEXE_ZIPOBJS) |
|
489 |
||
490 |
endif |
|
491 |
||
492 |
# Build into object dir and copy executable afterwards to avoid .ilk file in |
|
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
493 |
# image. The real fix would be clean up linking of unpack200 using |
14231 | 494 |
# -link -incremental:no |
495 |
# like all other launchers. |
|
496 |
$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(EXE_SUFFIX): $(BUILD_UNPACKEXE) |
|
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
16029
diff
changeset
|
497 |
$(call install-file) |
14231 | 498 |
|
499 |
BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/unpack200$(EXE_SUFFIX) |
|
500 |
||
501 |
########################################################################################## |
|
502 |
||
503 |
||
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
504 |
BUILD_JEXEC := |
14231 | 505 |
BUILD_JEXEC_SRC := |
506 |
BUILD_JEXEC_INC := |
|
507 |
BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR) |
|
508 |
||
509 |
# |
|
510 |
# UNHANDLED: |
|
511 |
# - COMPILE_APPROACH = normal |
|
512 |
# |
|
513 |
||
514 |
# |
|
515 |
# jdk/make/java/Makefile |
|
516 |
# |
|
517 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
518 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32) |
|
519 |
BUILD_JEXEC := 1 |
|
520 |
endif |
|
521 |
endif |
|
522 |
||
523 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
524 |
BUILD_JEXEC := 1 |
|
525 |
endif # OPENJDK_TARGET_OS |
|
526 |
||
527 |
# |
|
528 |
# jdk/make/java/jexec/Makefile |
|
529 |
# |
|
530 |
ifeq ($(BUILD_JEXEC), 1) |
|
531 |
||
532 |
ifeq ($(OPENJDK_TARGET_OS),windows) |
|
533 |
else ifeq ($(OPENJDK_TARGET_OS),macosx) |
|
534 |
BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/macosx/bin |
|
535 |
else |
|
536 |
BUILD_JEXEC_SRC := $(JDK_TOPDIR)/src/solaris/bin |
|
537 |
endif |
|
538 |
||
539 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
540 |
BUILD_JEXEC_DST_DIR := $(JDK_OUTPUTDIR)/lib |
|
541 |
BUILD_JEXEC_INC += -I$(JDK_TOPDIR)/src/share/bin |
|
542 |
endif |
|
543 |
endif |
|
544 |
||
545 |
# |
|
546 |
# Note that the two Makefile's seems to contradict each other, |
|
547 |
# and that src/macosx/bin/jexec.c seems unused |
|
548 |
# |
|
549 |
ifneq ($(BUILD_JEXEC_SRC),) |
|
550 |
$(eval $(call SetupNativeCompilation,BUILD_JEXEC,\ |
|
551 |
SRC:=$(BUILD_JEXEC_SRC),\ |
|
552 |
INCLUDE_FILES:=jexec.c,\ |
|
553 |
LANG:=C,\ |
|
554 |
OPTIMIZATION := LOW, \ |
|
555 |
CFLAGS:=$(CFLAGS_JDKEXE)\ |
|
556 |
$(BUILD_JEXEC_INC), \ |
|
557 |
CFLAGS_linux:=-fPIC,\ |
|
558 |
CFLAGS_solaris:=-KPIC,\ |
|
559 |
LDFLAGS:=$(LDFLAGS_JDKEXE) \ |
|
560 |
$(call SET_SHARED_LIBRARY_NAME,$(LIBRARY_PREFIX)$(SHARED_LIBRARY_SUFFIX)), \ |
|
561 |
OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/jexec_obj,\ |
|
562 |
OUTPUT_DIR:=$(BUILD_JEXEC_DST_DIR),\ |
|
17506
f44b96992f26
8015087: Provide debugging information for programs
andrew
parents:
16636
diff
changeset
|
563 |
DEBUG_SYMBOLS:=true,\ |
14231 | 564 |
PROGRAM:=jexec)) |
565 |
||
566 |
BUILD_LAUNCHERS += $(BUILD_JEXEC) |
|
567 |
endif |
|
568 |
||
569 |
########################################################################################## |
|
570 |
||
571 |
# |
|
572 |
# The java-rmi.cgi script in bin/ only gets delivered in certain situations |
|
573 |
# |
|
574 |
JAVA_RMI_CGI:=$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java-rmi.cgi |
|
575 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
|
576 |
BUILD_LAUNCHERS += $(JAVA_RMI_CGI) |
|
577 |
endif |
|
578 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
579 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32) |
|
580 |
BUILD_LAUNCHERS += $(JAVA_RMI_CGI) |
|
581 |
endif |
|
582 |
endif |
|
583 |
||
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
584 |
# TODO: |
14231 | 585 |
# On windows java-rmi.cgi shouldn't be bundled since Java 1.2, but has been built all |
586 |
# this time anyway. Since jdk6, it has been built from the wrong source and resulted |
|
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
587 |
# in a (almost) copy of the standard java launcher named "java-rmi.exe" ending up in |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
588 |
# the final images bin dir. This weird behavior is mimicked here in the converted |
14231 | 589 |
# makefiles for now. Should probably just be deleted. |
590 |
# http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6512052 |
|
591 |
ifeq ($(OPENJDK_TARGET_OS),windows) |
|
592 |
$(eval $(call SetupLauncher,java-rmi,,\ |
|
593 |
$(call SET_SHARED_LIBRARY_MAPFILE,$(JDK_TOPDIR)/makefiles/java/main/java/mapfile-$(OPENJDK_TARGET_CPU)))) |
|
594 |
else |
|
595 |
$(JAVA_RMI_CGI): $(JDK_TOPDIR)/src/solaris/bin/java-rmi.cgi.sh |
|
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
16029
diff
changeset
|
596 |
$(call install-file) |
14231 | 597 |
$(CHMOD) a+x $@ |
598 |
endif |
|
599 |
||
600 |
########################################################################################## |
|
19399
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
601 |
|
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
602 |
BUILD_JSPAWNHELPER := |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
603 |
BUILD_JSPAWNHELPER_SRC := $(JDK_TOPDIR)/src/solaris/native/java/lang |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
604 |
BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib$(OPENJDK_TARGET_CPU_LIBDIR) |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
605 |
LINK_JSPAWNHELPER_OBJECTS := $(JDK_OUTPUTDIR)/objs/libjava/childproc.o |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
606 |
LINK_JSPAWNHELPER_FLAGS := |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
607 |
|
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
608 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx solaris),) |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
609 |
BUILD_JSPAWNHELPER := 1 |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
610 |
endif |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
611 |
|
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
612 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
613 |
BUILD_JSPAWNHELPER_DST_DIR := $(JDK_OUTPUTDIR)/lib |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
614 |
endif |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
615 |
|
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
616 |
ifeq ($(OPENJDK_TARGET_CPU_BITS), 64) |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
617 |
LINK_JSPAWNHELPER_FLAGS += -m64 |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
618 |
endif |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
619 |
|
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
620 |
ifeq ($(BUILD_JSPAWNHELPER), 1) |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
621 |
$(eval $(call SetupNativeCompilation,BUILD_JSPAWNHELPER,\ |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
622 |
SRC:=$(BUILD_JSPAWNHELPER_SRC),\ |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
623 |
INCLUDE_FILES:=jspawnhelper.c,\ |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
624 |
LANG:=C,\ |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
625 |
OPTIMIZATION := LOW, \ |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
626 |
CFLAGS:=$(CFLAGS_JDKEXE), \ |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
627 |
LDFLAGS:=$(LDFLAGS_JDKEXE) $(LINK_JSPAWNHELPER_FLAGS), \ |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
628 |
LDFLAGS_SUFFIX:= $(LINK_JSPAWNHELPER_OBJECTS), \ |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
629 |
OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/jspawnhelper,\ |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
630 |
OUTPUT_DIR:=$(BUILD_JSPAWNHELPER_DST_DIR),\ |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
631 |
PROGRAM:=jspawnhelper)) |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
632 |
|
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
633 |
$(BUILD_JSPAWNHELPER): $(LINK_JSPAWNHELPER_OBJECTS) |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
634 |
|
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
635 |
BUILD_LAUNCHERS += $(BUILD_JSPAWNHELPER) |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
636 |
endif |
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
637 |
|
e2e5122cd62e
5049299: (process) Use posix_spawn, not fork, on S10 to avoid swap exhaustion
robm
parents:
17732
diff
changeset
|
638 |
########################################################################################## |
15324
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
639 |
# jabswitch |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
640 |
|
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
641 |
ifndef OPENJDK |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
642 |
ifeq ($(OPENJDK_TARGET_OS),windows) |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
643 |
|
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
644 |
$(eval $(call SetupNativeCompilation,BUILD_JABSWITCH,\ |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
645 |
SRC:=$(JDK_TOPDIR)/src/closed/windows/native/sun/bridge,\ |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
646 |
INCLUDE_FILES:=jabswitch.cpp,\ |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
647 |
LANG:=C++,\ |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
648 |
CFLAGS:=$(filter-out -Zc:wchar_t-,$(CFLAGS_JDKEXE)) -Zc:wchar_t \ |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
649 |
-analyze- -Od -Gd -D_WINDOWS \ |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
650 |
-D_UNICODE -DUNICODE -RTC1 -EHsc,\ |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
651 |
LDFLAGS:=$(LDFLAGS_JDKEXE) \ |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
652 |
Advapi32.lib Version.lib User32.lib,\ |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
653 |
OBJECT_DIR:=$(JDK_OUTPUTDIR)/objs/jabswitch,\ |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
654 |
OUTPUT_DIR:=$(JDK_OUTPUTDIR)/bin,\ |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
655 |
PROGRAM:=jabswitch,\ |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
656 |
DEBUG_SYMBOLS:=true,\ |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
657 |
VERSIONINFO_RESOURCE:=$(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/AccessBridgeStatusWindow.rc,\ |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
658 |
RC_FLAGS:=$(RC_FLAGS),\ |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
659 |
MANIFEST:=$(JDK_TOPDIR)/src/closed/windows/native/sun/bridge/jabswitch.manifest)) |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
660 |
|
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
661 |
BUILD_LAUNCHERS += $(BUILD_JABSWITCH) |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
662 |
|
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
663 |
endif |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
664 |
endif |
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
665 |
|
74584166bb07
8000839: Integrate the Java Access Bridge with Java Runtime
raginip
parents:
14994
diff
changeset
|
666 |
########################################################################################## |
14231 | 667 |
|
668 |
$(BUILD_LAUNCHERS) : $(JDK_TOPDIR)/makefiles/CompileLaunchers.gmk |
|
669 |
||
670 |
all: $(BUILD_LAUNCHERS) |
|
671 |
||
672 |
.PHONY: all |