author | weijun |
Thu, 08 Feb 2018 11:44:21 +0800 | |
changeset 48760 | 25725c11c296 |
parent 48751 | 54f355e65415 |
child 48766 | 2c4d1993b5f9 |
permissions | -rw-r--r-- |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
1 |
# |
36122 | 2 |
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
4 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. Oracle designates this |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
10 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
15 |
# accompanied this code). |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
16 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
20 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
22 |
# or visit www.oracle.com if you need additional information or have any |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
23 |
# questions. |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
24 |
# |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
25 |
|
27565 | 26 |
WIN_VERIFY_LIB := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify/verify.lib |
13702 | 27 |
|
35262
6ffcba13c973
8138677: IllegalAccessException Class sun.usagetracker.UsageTrackerClient$4 (module java.base) can not access a member of class java.lang.management.ManagementFactory (module java.management)
jbachorik
parents:
34014
diff
changeset
|
28 |
# Hook to include the corresponding custom file, if present. |
47314 | 29 |
$(eval $(call IncludeCustomExtension, lib/CoreLibraries.gmk)) |
35262
6ffcba13c973
8138677: IllegalAccessException Class sun.usagetracker.UsageTrackerClient$4 (module java.base) can not access a member of class java.lang.management.ManagementFactory (module java.management)
jbachorik
parents:
34014
diff
changeset
|
30 |
|
6ffcba13c973
8138677: IllegalAccessException Class sun.usagetracker.UsageTrackerClient$4 (module java.base) can not access a member of class java.lang.management.ManagementFactory (module java.management)
jbachorik
parents:
34014
diff
changeset
|
31 |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
32 |
########################################################################################## |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
33 |
# libfdlibm is statically linked with libjava below and not delivered into the |
26191
a0ff4b39d34b
8055188: General cleanup of minor issues from source restructure
erikj
parents:
25859
diff
changeset
|
34 |
# product on its own. |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
35 |
|
42353
ac0c725825bc
8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents:
41475
diff
changeset
|
36 |
BUILD_LIBFDLIBM_OPTIMIZATION := NONE |
ac0c725825bc
8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents:
41475
diff
changeset
|
37 |
|
ac0c725825bc
8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents:
41475
diff
changeset
|
38 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
ac0c725825bc
8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents:
41475
diff
changeset
|
39 |
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH |
ac0c725825bc
8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents:
41475
diff
changeset
|
40 |
endif |
13164 | 41 |
|
42353
ac0c725825bc
8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents:
41475
diff
changeset
|
42 |
ifeq ($(OPENJDK_TARGET_OS), linux) |
ac0c725825bc
8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents:
41475
diff
changeset
|
43 |
ifeq ($(OPENJDK_TARGET_CPU), ppc64) |
ac0c725825bc
8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents:
41475
diff
changeset
|
44 |
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH |
ac0c725825bc
8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents:
41475
diff
changeset
|
45 |
else ifeq ($(OPENJDK_TARGET_CPU), ppc64le) |
ac0c725825bc
8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents:
41475
diff
changeset
|
46 |
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH |
ac0c725825bc
8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents:
41475
diff
changeset
|
47 |
else ifeq ($(OPENJDK_TARGET_CPU), s390x) |
ac0c725825bc
8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents:
41475
diff
changeset
|
48 |
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH |
ac0c725825bc
8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents:
41475
diff
changeset
|
49 |
else ifeq ($(OPENJDK_TARGET_CPU), aarch64) |
ac0c725825bc
8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents:
41475
diff
changeset
|
50 |
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH |
ac0c725825bc
8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents:
41475
diff
changeset
|
51 |
endif |
12892 | 52 |
endif |
53 |
||
47217 | 54 |
LIBFDLIBM_SRC := $(TOPDIR)/src/java.base/share/native/libfdlibm |
25859 | 55 |
LIBFDLIBM_CFLAGS := -I$(LIBFDLIBM_SRC) |
56 |
||
20547 | 57 |
ifneq ($(OPENJDK_TARGET_OS), macosx) |
58 |
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM, \ |
|
59 |
STATIC_LIBRARY := fdlibm, \ |
|
27565 | 60 |
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \ |
25859 | 61 |
SRC := $(LIBFDLIBM_SRC), \ |
20547 | 62 |
OPTIMIZATION := $(BUILD_LIBFDLIBM_OPTIMIZATION), \ |
25859 | 63 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \ |
20547 | 64 |
CFLAGS_windows_debug := -DLOGGING, \ |
22594 | 65 |
CFLAGS_aix := -qfloat=nomaf, \ |
42353
ac0c725825bc
8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents:
41475
diff
changeset
|
66 |
CFLAGS_linux_ppc64 := -ffp-contract=off, \ |
ac0c725825bc
8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents:
41475
diff
changeset
|
67 |
CFLAGS_linux_ppc64le := -ffp-contract=off, \ |
ac0c725825bc
8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents:
41475
diff
changeset
|
68 |
CFLAGS_linux_s390x := -ffp-contract=off, \ |
ac0c725825bc
8170153: PPC64/s390x/aarch64: Poor StrictMath performance due to non-optimized compilation
gromero
parents:
41475
diff
changeset
|
69 |
CFLAGS_linux_aarch64 := -ffp-contract=off, \ |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
70 |
DISABLED_WARNINGS_gcc := sign-compare, \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
71 |
DISABLED_WARNINGS_microsoft := 4146 4244 4018, \ |
20547 | 72 |
ARFLAGS := $(ARFLAGS), \ |
27565 | 73 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \ |
35276 | 74 |
)) |
13164 | 75 |
|
12892 | 76 |
else |
14855
d104ff4d4bb9
8005178: build-infra: Dependency on libfdlibm on mac is broken
erikj
parents:
14789
diff
changeset
|
77 |
|
20890 | 78 |
# On macosx the old build does partial (incremental) linking of fdlibm instead of |
79 |
# a plain static library. |
|
20547 | 80 |
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM_MAC, \ |
81 |
LIBRARY := fdlibm, \ |
|
27565 | 82 |
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \ |
25859 | 83 |
SRC := $(LIBFDLIBM_SRC), \ |
84 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \ |
|
48751
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
47687
diff
changeset
|
85 |
LDFLAGS := -nostdlib $(ARFLAGS), \ |
27565 | 86 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \ |
35276 | 87 |
)) |
20547 | 88 |
|
27565 | 89 |
BUILD_LIBFDLIBM := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX) |
20547 | 90 |
$(BUILD_LIBFDLIBM): $(BUILD_LIBFDLIBM_MAC) |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
16513
diff
changeset
|
91 |
$(call install-file) |
12892 | 92 |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
93 |
endif |
20890 | 94 |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
95 |
########################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
96 |
|
13164 | 97 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
20547 | 98 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
47217 | 99 |
BUILD_LIBVERIFY_REORDER := $(TOPDIR)/make/mapfiles/libverify/reorder-$(OPENJDK_TARGET_CPU) |
20547 | 100 |
endif |
13164 | 101 |
endif |
102 |
||
20547 | 103 |
LIBVERIFY_OPTIMIZATION := HIGH |
104 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), ) |
|
35276 | 105 |
ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true) |
20547 | 106 |
LIBVERIFY_OPTIMIZATION := LOW |
107 |
endif |
|
13702 | 108 |
endif |
109 |
||
20547 | 110 |
$(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \ |
111 |
LIBRARY := verify, \ |
|
112 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
47217 | 113 |
SRC := $(TOPDIR)/src/java.base/share/native/libverify, \ |
20547 | 114 |
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \ |
115 |
CFLAGS := $(CFLAGS_JDKLIB), \ |
|
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
116 |
DISABLED_WARNINGS_microsoft := 4244 4267, \ |
47217 | 117 |
MAPFILE := $(TOPDIR)/make/mapfiles/libverify/mapfile-vers, \ |
20547 | 118 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
119 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
33406 | 120 |
LIBS_unix := -ljvm -lc, \ |
121 |
LIBS_windows := jvm.lib, \ |
|
25859 | 122 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 123 |
RC_FLAGS := $(RC_FLAGS) \ |
124 |
-D "JDK_FNAME=verify.dll" \ |
|
125 |
-D "JDK_INTERNAL_NAME=verify" \ |
|
126 |
-D "JDK_FTYPE=0x2L", \ |
|
127 |
REORDER := $(BUILD_LIBVERIFY_REORDER), \ |
|
27565 | 128 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify, \ |
35276 | 129 |
)) |
13164 | 130 |
|
27565 | 131 |
TARGETS += $(BUILD_LIBVERIFY) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
132 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
133 |
########################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
134 |
|
45462
0de8011890c0
8173654: Regression since 8u60: System.getenv doesn't return env var set in JNI code
robm
parents:
43806
diff
changeset
|
135 |
# Allow a custom makefile to add extra src dirs |
0de8011890c0
8173654: Regression since 8u60: System.getenv doesn't return env var set in JNI code
robm
parents:
43806
diff
changeset
|
136 |
LIBJAVA_SRC_DIRS += $(call FindSrcDirsForLib, java.base, java) |
20547 | 137 |
|
25859 | 138 |
LIBJAVA_CFLAGS := $(addprefix -I, $(LIBJAVA_SRC_DIRS)) \ |
47217 | 139 |
-I$(TOPDIR)/src/java.base/share/native/libfdlibm \ |
27565 | 140 |
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \ |
20547 | 141 |
-DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"' |
13164 | 142 |
|
35262
6ffcba13c973
8138677: IllegalAccessException Class sun.usagetracker.UsageTrackerClient$4 (module java.base) can not access a member of class java.lang.management.ManagementFactory (module java.management)
jbachorik
parents:
34014
diff
changeset
|
143 |
# Make it possible to override this variable |
47217 | 144 |
LIBJAVA_MAPFILE ?= $(TOPDIR)/make/mapfiles/libjava/mapfile-vers |
35262
6ffcba13c973
8138677: IllegalAccessException Class sun.usagetracker.UsageTrackerClient$4 (module java.base) can not access a member of class java.lang.management.ManagementFactory (module java.management)
jbachorik
parents:
34014
diff
changeset
|
145 |
|
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
146 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
20547 | 147 |
BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c |
148 |
BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c |
|
13164 | 149 |
endif |
150 |
||
151 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
20547 | 152 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
47217 | 153 |
LIBJAVA_REORDER := $(TOPDIR)/make/mapfiles/libjava/reorder-$(OPENJDK_TARGET_CPU) |
20547 | 154 |
endif |
13164 | 155 |
endif |
156 |
||
20547 | 157 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \ |
158 |
LIBRARY := java, \ |
|
159 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
160 |
SRC := $(LIBJAVA_SRC_DIRS), \ |
|
161 |
OPTIMIZATION := HIGH, \ |
|
162 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
163 |
$(LIBJAVA_CFLAGS), \ |
|
33984
2333676816eb
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
30784
diff
changeset
|
164 |
System.c_CFLAGS := $(VERSION_CFLAGS), \ |
2333676816eb
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
30784
diff
changeset
|
165 |
jdk_util.c_CFLAGS := $(VERSION_CFLAGS), \ |
37529
868c7195632c
8154087: Fix AIX and Linux/ppc64le after the integration of the new hotspot build
simonis
parents:
37525
diff
changeset
|
166 |
WARNINGS_AS_ERRORS_xlc := false, \ |
36511 | 167 |
DISABLED_WARNINGS_gcc := unused-result, \ |
32408
97230ec16697
8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents:
32267
diff
changeset
|
168 |
DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \ |
35262
6ffcba13c973
8138677: IllegalAccessException Class sun.usagetracker.UsageTrackerClient$4 (module java.base) can not access a member of class java.lang.management.ManagementFactory (module java.management)
jbachorik
parents:
34014
diff
changeset
|
169 |
MAPFILE := $(LIBJAVA_MAPFILE), \ |
20547 | 170 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
171 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
33406 | 172 |
LDFLAGS_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/, \ |
173 |
LDFLAGS_windows := -export:winFileHandleOpen -export:handleLseek \ |
|
174 |
-export:getLastErrorString \ |
|
175 |
-export:getErrorString -delayload:shell32.dll, \ |
|
176 |
LIBS_unix := -ljvm -lverify, \ |
|
177 |
LIBS_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \ |
|
178 |
LIBS_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc, \ |
|
36110
91a3a6df36ec
8150203: Incremental update from build-infra project
ihse
parents:
35706
diff
changeset
|
179 |
LIBS_aix := $(LIBDL) $(BUILD_LIBFDLIBM) $(LIBM),\ |
33406 | 180 |
LIBS_macosx := -lfdlibm \ |
20547 | 181 |
-framework CoreFoundation \ |
182 |
-framework Foundation \ |
|
183 |
-framework Security -framework SystemConfiguration, \ |
|
33406 | 184 |
LIBS_windows := jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \ |
185 |
shell32.lib delayimp.lib \ |
|
31246
dfc58fd4feec
8066504: GetVersionEx in java.base/windows/native/libjava/java_props_md.c might not get correct Windows version 0
rriggs
parents:
30784
diff
changeset
|
186 |
advapi32.lib version.lib, \ |
25859 | 187 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 188 |
RC_FLAGS := $(RC_FLAGS) \ |
189 |
-D "JDK_FNAME=java.dll" \ |
|
190 |
-D "JDK_INTERNAL_NAME=java" \ |
|
191 |
-D "JDK_FTYPE=0x2L", \ |
|
192 |
REORDER := $(LIBJAVA_REORDER), \ |
|
27565 | 193 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava, \ |
35276 | 194 |
)) |
13164 | 195 |
|
27565 | 196 |
TARGETS += $(BUILD_LIBJAVA) |
20547 | 197 |
|
198 |
$(BUILD_LIBJAVA): $(BUILD_LIBVERIFY) |
|
199 |
||
200 |
$(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
201 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
202 |
########################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
203 |
|
20547 | 204 |
BUILD_LIBZIP_EXCLUDES := |
205 |
ifeq ($(USE_EXTERNAL_LIBZ), true) |
|
43806 | 206 |
LIBZIP_EXCLUDES += zlib |
20547 | 207 |
endif |
208 |
||
209 |
BUILD_LIBZIP_REORDER := |
|
210 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
211 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
|
47217 | 212 |
BUILD_LIBZIP_REORDER := $(TOPDIR)/make/mapfiles/libzip/reorder-$(OPENJDK_TARGET_CPU) |
20547 | 213 |
endif |
214 |
endif |
|
215 |
||
216 |
ifeq ($(LIBZIP_CAN_USE_MMAP), true) |
|
217 |
BUILD_LIBZIP_MMAP := -DUSE_MMAP |
|
218 |
endif |
|
219 |
||
220 |
$(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \ |
|
221 |
LIBRARY := zip, \ |
|
222 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
223 |
OPTIMIZATION := LOW, \ |
|
47217 | 224 |
SRC := $(TOPDIR)/src/java.base/share/native/libzip, \ |
20547 | 225 |
EXCLUDES := $(LIBZIP_EXCLUDES), \ |
226 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
48751
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
47687
diff
changeset
|
227 |
$(LIBZ_CFLAGS) \ |
47217 | 228 |
-I$(TOPDIR)/src/java.base/share/native/libjava \ |
229 |
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \ |
|
27565 | 230 |
-I$(SUPPORT_OUTPUTDIR)/headers/java.base, \ |
27736
8c9bd4be4a86
8058631: Rename posix to unix in build system to match file name changes
ihse
parents:
27186
diff
changeset
|
231 |
CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \ |
47217 | 232 |
MAPFILE := $(TOPDIR)/make/mapfiles/libzip/mapfile-vers, \ |
20547 | 233 |
REORDER := $(BUILD_LIBZIP_REORDER), \ |
234 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
|
33406 | 235 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
20547 | 236 |
LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \ |
27565 | 237 |
-export:ZIP_ReadEntry -export:ZIP_GetNextEntry \ |
41358 | 238 |
-export:ZIP_InflateFully -export:ZIP_CRC32 -export:ZIP_FreeEntry, \ |
48751
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
47687
diff
changeset
|
239 |
LIBS_unix := -ljvm -ljava $(LIBZ_LIBS), \ |
33406 | 240 |
LIBS_solaris := -lc, \ |
241 |
LIBS_windows := jvm.lib $(WIN_JAVA_LIB), \ |
|
25859 | 242 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 243 |
RC_FLAGS := $(RC_FLAGS) \ |
244 |
-D "JDK_FNAME=zip.dll" \ |
|
245 |
-D "JDK_INTERNAL_NAME=zip" \ |
|
246 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 247 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libzip, \ |
35276 | 248 |
)) |
20547 | 249 |
|
250 |
$(BUILD_LIBZIP): $(BUILD_LIBJAVA) |
|
251 |
||
27565 | 252 |
TARGETS += $(BUILD_LIBZIP) |
20547 | 253 |
|
254 |
########################################################################################## |
|
255 |
||
35706 | 256 |
JIMAGELIB_CPPFLAGS := \ |
47217 | 257 |
-I$(TOPDIR)/src/java.base/share/native/libjava \ |
258 |
-I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \ |
|
259 |
-I$(TOPDIR)/src/java.base/share/native/libjimage \ |
|
35706 | 260 |
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \ |
261 |
# |
|
262 |
||
32641
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
263 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJIMAGE, \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
264 |
LIBRARY := jimage, \ |
41217
c3bdba3a880a
8160630: libjimage.so and others should link statically to libgcc
erikj
parents:
38783
diff
changeset
|
265 |
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \ |
32641
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
266 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
267 |
OPTIMIZATION := LOW, \ |
47217 | 268 |
SRC := $(TOPDIR)/src/java.base/share/native/libjimage \ |
269 |
$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjimage, \ |
|
32641
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
270 |
EXCLUDES := $(LIBJIMAGE_EXCLUDES), \ |
35706 | 271 |
CFLAGS := $(CFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \ |
272 |
CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \ |
|
32641
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
273 |
CFLAGS_unix := -UDEBUG, \ |
47217 | 274 |
MAPFILE := $(TOPDIR)/make/mapfiles/libjimage/mapfile-vers, \ |
41475 | 275 |
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \ |
33406 | 276 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
32641
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
277 |
LDFLAGS_windows := -export:JIMAGE_Open -export:JIMAGE_Close \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
278 |
-export:JIMAGE_PackageToModule \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
279 |
-export:JIMAGE_FindResource -export:JIMAGE_GetResource \ |
37612
2c9bb54c90dc
8147634: Need a JImage API that given a JImageLocationRef returns class name
jlaskey
parents:
37529
diff
changeset
|
280 |
-export:JIMAGE_ResourceIterator -export:JIMAGE_ResourcePath, \ |
33406 | 281 |
LIBS_unix := -ljvm -ldl $(LIBCXX), \ |
282 |
LIBS_solaris := -lc, \ |
|
283 |
LIBS_macosx := -lc++, \ |
|
284 |
LIBS_windows := jvm.lib, \ |
|
32641
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
285 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
286 |
RC_FLAGS := $(RC_FLAGS) \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
287 |
-D "JDK_FNAME=jimage.dll" \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
288 |
-D "JDK_INTERNAL_NAME=jimage" \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
289 |
-D "JDK_FTYPE=0x2L", \ |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
290 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjimage, \ |
35276 | 291 |
)) |
32641
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
292 |
|
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
293 |
$(BUILD_LIBJIMAGE): $(BUILD_LIBJAVA) |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
294 |
|
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
295 |
TARGETS += $(BUILD_LIBJIMAGE) |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
296 |
|
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
297 |
########################################################################################## |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
298 |
|
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
299 |
LIBJLI_SRC_DIRS := $(call FindSrcDirsForLib, java.base, jli) |
22951
5fd21112b2b6
8034043: Native methods for preferences API should not be in libjava
alanb
parents:
22941
diff
changeset
|
300 |
|
25859 | 301 |
LIBJLI_CFLAGS := $(CFLAGS_JDKLIB) |
20547 | 302 |
|
47687 | 303 |
ifeq ($(call check-jvm-variant, zero), true) |
20547 | 304 |
ERGO_FAMILY := zero |
305 |
else |
|
306 |
ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86) |
|
307 |
ERGO_FAMILY := i586 |
|
308 |
else |
|
309 |
ERGO_FAMILY := $(OPENJDK_TARGET_CPU_ARCH) |
|
310 |
endif |
|
311 |
endif |
|
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
312 |
LIBJLI_ALL_ERGO := $(wildcard $(addsuffix /ergo_*.c, $(LIBJLI_SRC_DIRS))) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
313 |
LIBJLI_EXCLUDE_ERGO := $(filter-out %/ergo_$(ERGO_FAMILY).c, $(LIBJLI_ALL_ERGO)) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
314 |
# If all specialized ergo files are excluded, use generic ergo |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
315 |
ifeq ($(LIBJLI_ALL_ERGO), $(LIBJLI_EXCLUDE_ERGO)) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
316 |
LIBJLI_CFLAGS += -DUSE_GENERIC_ERGO |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
317 |
endif |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
318 |
LIBJLI_EXCLUDE_FILES += $(notdir $(LIBJLI_EXCLUDE_ERGO)) |
20547 | 319 |
|
320 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
29742
b73f38796859
8074840: Resolve disabled warnings for libjli and libjli_static
mikael
parents:
29374
diff
changeset
|
321 |
LIBJLI_EXCLUDE_FILES += java_md_solinux.c ergo.c ergo_i586.c |
20547 | 322 |
|
323 |
BUILD_LIBJLI_java_md_macosx.c_CFLAGS := -x objective-c |
|
324 |
BUILD_LIBJLI_STATIC_java_md_macosx.c_CFLAGS := -x objective-c |
|
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
325 |
|
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
326 |
LIBJLI_CFLAGS += -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" |
20547 | 327 |
endif |
328 |
||
329 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
330 |
# Staticically link with c runtime on windows. |
|
331 |
LIBJLI_CFLAGS := $(filter-out -MD, $(LIBJLI_CFLAGS)) |
|
332 |
LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE) |
|
28984
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
333 |
# Supply the name of the C runtime lib. |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
334 |
LIBJLI_CFLAGS += -DMSVCR_DLL_NAME='"$(notdir $(MSVCR_DLL))"' |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
335 |
ifneq ($(MSVCP_DLL), ) |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
336 |
LIBJLI_CFLAGS += -DMSVCP_DLL_NAME='"$(notdir $(MSVCP_DLL))"' |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
337 |
endif |
20547 | 338 |
else |
339 |
LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)/jli |
|
340 |
endif |
|
341 |
||
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
342 |
LIBJLI_CFLAGS += $(addprefix -I, $(LIBJLI_SRC_DIRS)) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
343 |
|
48751
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
47687
diff
changeset
|
344 |
LIBJLI_CFLAGS += $(LIBZ_CFLAGS) |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
47687
diff
changeset
|
345 |
|
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
346 |
ifneq ($(USE_EXTERNAL_LIBZ), true) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
347 |
LIBJLI_EXTRA_FILES += \ |
47217 | 348 |
$(addprefix $(TOPDIR)/src/java.base/share/native/libzip/zlib/, \ |
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
349 |
inflate.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
350 |
inftrees.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
351 |
inffast.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
352 |
zadler32.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
353 |
zcrc32.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
354 |
zutil.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
355 |
) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
356 |
endif |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
357 |
|
20547 | 358 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \ |
359 |
LIBRARY := jli, \ |
|
360 |
OUTPUT_DIR := $(LIBJLI_OUTPUT_DIR), \ |
|
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
361 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
362 |
EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
363 |
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \ |
20547 | 364 |
OPTIMIZATION := HIGH, \ |
365 |
CFLAGS := $(LIBJLI_CFLAGS), \ |
|
32408
97230ec16697
8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents:
32267
diff
changeset
|
366 |
DISABLED_WARNINGS_solstudio := \ |
97230ec16697
8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents:
32267
diff
changeset
|
367 |
E_ASM_DISABLES_OPTIMIZATION \ |
97230ec16697
8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents:
32267
diff
changeset
|
368 |
E_STATEMENT_NOT_REACHED, \ |
47217 | 369 |
MAPFILE := $(TOPDIR)/make/mapfiles/libjli/mapfile-vers, \ |
20547 | 370 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
371 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
372 |
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \ |
|
373 |
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \ |
|
33406 | 374 |
LDFLAGS_windows := \ |
20547 | 375 |
-export:JLI_Launch \ |
376 |
-export:JLI_ManifestIterate \ |
|
377 |
-export:JLI_SetTraceLauncher \ |
|
378 |
-export:JLI_ReportErrorMessage \ |
|
379 |
-export:JLI_ReportErrorMessageSys \ |
|
380 |
-export:JLI_ReportMessage \ |
|
381 |
-export:JLI_ReportExceptionDescription \ |
|
382 |
-export:JLI_MemAlloc \ |
|
383 |
-export:JLI_CmdToArgs \ |
|
384 |
-export:JLI_GetStdArgc \ |
|
385 |
-export:JLI_GetStdArgs \ |
|
32267
4e96a9ee01b1
8027634: Support @argfiles for java command-line tool
henryjen
parents:
31246
diff
changeset
|
386 |
-export:JLI_List_new \ |
4e96a9ee01b1
8027634: Support @argfiles for java command-line tool
henryjen
parents:
31246
diff
changeset
|
387 |
-export:JLI_List_add \ |
4e96a9ee01b1
8027634: Support @argfiles for java command-line tool
henryjen
parents:
31246
diff
changeset
|
388 |
-export:JLI_StringDup \ |
4e96a9ee01b1
8027634: Support @argfiles for java command-line tool
henryjen
parents:
31246
diff
changeset
|
389 |
-export:JLI_MemFree \ |
4e96a9ee01b1
8027634: Support @argfiles for java command-line tool
henryjen
parents:
31246
diff
changeset
|
390 |
-export:JLI_InitArgProcessing \ |
4e96a9ee01b1
8027634: Support @argfiles for java command-line tool
henryjen
parents:
31246
diff
changeset
|
391 |
-export:JLI_PreprocessArg \ |
43325
033e4cced1dc
8170832: Add a new launcher environment variable JAVA_OPTIONS
henryjen
parents:
42755
diff
changeset
|
392 |
-export:JLI_AddArgsFromEnvVar \ |
33406 | 393 |
-export:JLI_GetAppArgIndex, \ |
48751
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
47687
diff
changeset
|
394 |
LIBS_unix := $(LIBZ_LIBS), \ |
33406 | 395 |
LIBS_linux := $(LIBDL) -lc -lpthread, \ |
396 |
LIBS_solaris := $(LIBDL) -lc, \ |
|
397 |
LIBS_aix := $(LIBDL),\ |
|
398 |
LIBS_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \ |
|
399 |
LIBS_windows := advapi32.lib comctl32.lib user32.lib, \ |
|
25859 | 400 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 401 |
RC_FLAGS := $(RC_FLAGS) \ |
402 |
-D "JDK_FNAME=jli.dll" \ |
|
403 |
-D "JDK_INTERNAL_NAME=jli" \ |
|
404 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 405 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli, \ |
35276 | 406 |
)) |
20547 | 407 |
|
27565 | 408 |
TARGETS += $(BUILD_LIBJLI) |
20547 | 409 |
|
410 |
# On windows, the static library has the same suffix as the import library created by |
|
411 |
# with the shared library, so the static library is given a different name. No harm |
|
412 |
# in doing it for all platform to reduce complexity. |
|
413 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
414 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \ |
|
415 |
STATIC_LIBRARY := jli_static, \ |
|
27565 | 416 |
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \ |
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
417 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
418 |
EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
419 |
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \ |
20547 | 420 |
OPTIMIZATION := HIGH, \ |
421 |
CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \ |
|
422 |
ARFLAGS := $(ARFLAGS), \ |
|
27565 | 423 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \ |
35276 | 424 |
)) |
20547 | 425 |
|
27565 | 426 |
TARGETS += $(BUILD_LIBJLI_STATIC) |
20547 | 427 |
|
428 |
else ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
429 |
# |
|
430 |
# On macosx they do partial (incremental) linking of libjli_static.a |
|
431 |
# code it here...rather than add support to NativeCompilation |
|
432 |
# as this is first time I see it |
|
433 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \ |
|
434 |
LIBRARY := jli_static, \ |
|
27565 | 435 |
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \ |
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
436 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
437 |
EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
438 |
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \ |
20547 | 439 |
OPTIMIZATION := HIGH, \ |
440 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \ |
|
48751
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
47687
diff
changeset
|
441 |
LDFLAGS := -nostdlib $(ARFLAGS), \ |
27565 | 442 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \ |
35276 | 443 |
)) |
20547 | 444 |
|
33653
c1ee09fe3274
8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents:
32846
diff
changeset
|
445 |
ifeq ($(STATIC_BUILD), true) |
c1ee09fe3274
8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents:
32846
diff
changeset
|
446 |
TARGETS += $(BUILD_LIBJLI_STATIC) |
c1ee09fe3274
8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents:
32846
diff
changeset
|
447 |
else |
c1ee09fe3274
8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents:
32846
diff
changeset
|
448 |
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a: $(BUILD_LIBJLI_STATIC) |
20547 | 449 |
$(call install-file) |
450 |
||
33653
c1ee09fe3274
8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents:
32846
diff
changeset
|
451 |
TARGETS += $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a |
c1ee09fe3274
8136556: Add the ability to perform static builds of MacOSX x64 binaries
bobv
parents:
32846
diff
changeset
|
452 |
endif |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
453 |
|
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
454 |
else ifeq ($(OPENJDK_TARGET_OS), aix) |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
455 |
# AIX also requires a static libjli because the compiler doesn't support '-rpath' |
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
456 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
457 |
STATIC_LIBRARY := jli_static, \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
458 |
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
459 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
460 |
EXCLUDE_FILES := $(LIBJLI_EXCLUDE_FILES), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
461 |
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
462 |
OPTIMIZATION := HIGH, \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
463 |
CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
464 |
ARFLAGS := $(ARFLAGS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
465 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static)) |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
466 |
|
27565 | 467 |
TARGETS += $(BUILD_LIBJLI_STATIC) |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
468 |
|
20547 | 469 |
endif |