author | mikael |
Thu, 02 Apr 2015 11:54:33 -0700 | |
changeset 29742 | b73f38796859 |
parent 29374 | f031a666744a |
child 29931 | 64e274ed6567 |
permissions | -rw-r--r-- |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
1 |
# |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
2 |
# Copyright (c) 2011, 2015, 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 |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
28 |
########################################################################################## |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
29 |
# 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
|
30 |
# product on its own. |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
31 |
|
20547 | 32 |
BUILD_LIBFDLIBM_OPTIMIZATION := HIGH |
13164 | 33 |
|
34 |
ifneq ($(OPENJDK_TARGET_OS), solaris) |
|
20547 | 35 |
BUILD_LIBFDLIBM_OPTIMIZATION := NONE |
12892 | 36 |
endif |
37 |
||
25859 | 38 |
LIBFDLIBM_SRC := $(JDK_TOPDIR)/src/java.base/share/native/libfdlibm |
39 |
LIBFDLIBM_CFLAGS := -I$(LIBFDLIBM_SRC) |
|
40 |
||
20547 | 41 |
ifneq ($(OPENJDK_TARGET_OS), macosx) |
42 |
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM, \ |
|
43 |
STATIC_LIBRARY := fdlibm, \ |
|
27565 | 44 |
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \ |
25859 | 45 |
SRC := $(LIBFDLIBM_SRC), \ |
20547 | 46 |
LANG := C, \ |
47 |
OPTIMIZATION := $(BUILD_LIBFDLIBM_OPTIMIZATION), \ |
|
25859 | 48 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \ |
20547 | 49 |
CFLAGS_windows_debug := -DLOGGING, \ |
22594 | 50 |
CFLAGS_aix := -qfloat=nomaf, \ |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
51 |
DISABLED_WARNINGS_gcc := sign-compare, \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
52 |
DISABLED_WARNINGS_microsoft := 4146 4244 4018, \ |
20547 | 53 |
ARFLAGS := $(ARFLAGS), \ |
27565 | 54 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \ |
20547 | 55 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
13164 | 56 |
|
12892 | 57 |
else |
14855
d104ff4d4bb9
8005178: build-infra: Dependency on libfdlibm on mac is broken
erikj
parents:
14789
diff
changeset
|
58 |
|
20890 | 59 |
# On macosx the old build does partial (incremental) linking of fdlibm instead of |
60 |
# a plain static library. |
|
20547 | 61 |
$(eval $(call SetupNativeCompilation,BUILD_LIBFDLIBM_MAC, \ |
62 |
LIBRARY := fdlibm, \ |
|
27565 | 63 |
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \ |
25859 | 64 |
SRC := $(LIBFDLIBM_SRC), \ |
20547 | 65 |
LANG := C, \ |
25859 | 66 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \ |
20547 | 67 |
LDFLAGS := -nostdlib -r -arch x86_64, \ |
27565 | 68 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \ |
20547 | 69 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
70 |
||
27565 | 71 |
BUILD_LIBFDLIBM := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/$(LIBRARY_PREFIX)fdlibm$(STATIC_LIBRARY_SUFFIX) |
20547 | 72 |
$(BUILD_LIBFDLIBM): $(BUILD_LIBFDLIBM_MAC) |
16636
1cc691bcfe50
8008373: JFR JTReg tests fail with CompilationError on MacOSX; missing '._sunec.jar'
erikj
parents:
16513
diff
changeset
|
73 |
$(call install-file) |
12892 | 74 |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
75 |
endif |
20890 | 76 |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
77 |
########################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
78 |
|
13164 | 79 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
20547 | 80 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
21805 | 81 |
BUILD_LIBVERIFY_REORDER := $(JDK_TOPDIR)/make/mapfiles/libverify/reorder-$(OPENJDK_TARGET_CPU) |
20547 | 82 |
endif |
13164 | 83 |
endif |
84 |
||
20547 | 85 |
LIBVERIFY_OPTIMIZATION := HIGH |
86 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), ) |
|
87 |
ifeq ($(ENABLE_DEBUG_SYMBOLS), true) |
|
88 |
LIBVERIFY_OPTIMIZATION := LOW |
|
89 |
endif |
|
13702 | 90 |
endif |
91 |
||
20547 | 92 |
$(eval $(call SetupNativeCompilation,BUILD_LIBVERIFY, \ |
93 |
LIBRARY := verify, \ |
|
94 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
25859 | 95 |
SRC := $(JDK_TOPDIR)/src/java.base/share/native/libverify, \ |
20547 | 96 |
LANG := C, \ |
97 |
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \ |
|
98 |
CFLAGS := $(CFLAGS_JDKLIB), \ |
|
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
99 |
DISABLED_WARNINGS_microsoft := 4244 4267, \ |
21805 | 100 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libverify/mapfile-vers, \ |
20547 | 101 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
102 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
27736
8c9bd4be4a86
8058631: Rename posix to unix in build system to match file name changes
ihse
parents:
27186
diff
changeset
|
103 |
LDFLAGS_SUFFIX_unix := -ljvm -lc, \ |
20547 | 104 |
LDFLAGS_SUFFIX_windows := jvm.lib, \ |
25859 | 105 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 106 |
RC_FLAGS := $(RC_FLAGS) \ |
107 |
-D "JDK_FNAME=verify.dll" \ |
|
108 |
-D "JDK_INTERNAL_NAME=verify" \ |
|
109 |
-D "JDK_FTYPE=0x2L", \ |
|
110 |
REORDER := $(BUILD_LIBVERIFY_REORDER), \ |
|
27565 | 111 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libverify, \ |
20547 | 112 |
DEBUG_SYMBOLS := true)) |
13164 | 113 |
|
27565 | 114 |
TARGETS += $(BUILD_LIBVERIFY) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
115 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
116 |
########################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
117 |
|
25859 | 118 |
LIBJAVA_SRC_DIRS := $(call FindSrcDirsForLib, java.base, java) |
20547 | 119 |
|
25859 | 120 |
LIBJAVA_CFLAGS := $(addprefix -I, $(LIBJAVA_SRC_DIRS)) \ |
121 |
-I$(JDK_TOPDIR)/src/java.base/share/native/libfdlibm \ |
|
27565 | 122 |
-I$(SUPPORT_OUTPUTDIR)/headers/java.base \ |
20547 | 123 |
-DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"' |
13164 | 124 |
|
125 |
LIBJAVA_CFLAGS += -DJDK_MAJOR_VERSION='"$(JDK_MAJOR_VERSION)"' \ |
|
20547 | 126 |
-DJDK_MINOR_VERSION='"$(JDK_MINOR_VERSION)"' \ |
127 |
-DJDK_MICRO_VERSION='"$(JDK_MICRO_VERSION)"' \ |
|
128 |
-DJDK_BUILD_NUMBER='"$(JDK_BUILD_NUMBER)"' |
|
129 |
||
130 |
ifneq (, $(JDK_UPDATE_VERSION)) |
|
131 |
LIBJAVA_CFLAGS += -DJDK_UPDATE_VERSION='"$(JDK_UPDATE_VERSION)"' |
|
13164 | 132 |
endif |
133 |
||
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
134 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
20547 | 135 |
BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c |
136 |
BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c |
|
13164 | 137 |
endif |
138 |
||
139 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
20547 | 140 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
21805 | 141 |
LIBJAVA_REORDER := $(JDK_TOPDIR)/make/mapfiles/libjava/reorder-$(OPENJDK_TARGET_CPU) |
20547 | 142 |
endif |
13164 | 143 |
endif |
144 |
||
20547 | 145 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJAVA, \ |
146 |
LIBRARY := java, \ |
|
147 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
148 |
SRC := $(LIBJAVA_SRC_DIRS), \ |
|
149 |
LANG := C, \ |
|
150 |
OPTIMIZATION := HIGH, \ |
|
151 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
152 |
$(LIBJAVA_CFLAGS), \ |
|
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
153 |
DISABLED_WARNINGS_gcc := type-limits format-nonliteral, \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
154 |
DISABLED_WARNINGS_clang := int-conversion, \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
155 |
DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE, \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
156 |
DISABLED_WARNINGS_microsoft := 4022 4267, \ |
21805 | 157 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjava/mapfile-vers, \ |
20547 | 158 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
159 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
27736
8c9bd4be4a86
8058631: Rename posix to unix in build system to match file name changes
ihse
parents:
27186
diff
changeset
|
160 |
LDFLAGS_SUFFIX_unix := -ljvm -lverify, \ |
20547 | 161 |
LDFLAGS_SUFFIX_solaris := -lsocket -lnsl -lscf $(LIBDL) $(BUILD_LIBFDLIBM) -lc, \ |
162 |
LDFLAGS_SUFFIX_linux := $(LIBDL) $(BUILD_LIBFDLIBM), \ |
|
22594 | 163 |
LDFLAGS_SUFFIX_aix := $(LIBDL) $(BUILD_LIBFDLIBM) -lm,\ |
27565 | 164 |
LDFLAGS_SUFFIX_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/ -lfdlibm \ |
20547 | 165 |
-framework CoreFoundation \ |
166 |
-framework Foundation \ |
|
167 |
-framework Security -framework SystemConfiguration, \ |
|
168 |
LDFLAGS_SUFFIX_windows := -export:winFileHandleOpen -export:handleLseek \ |
|
27184 | 169 |
-export:getLastErrorString \ |
20547 | 170 |
jvm.lib $(BUILD_LIBFDLIBM) $(WIN_VERIFY_LIB) \ |
171 |
shell32.lib delayimp.lib -DELAYLOAD:shell32.dll \ |
|
172 |
advapi32.lib, \ |
|
25859 | 173 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 174 |
RC_FLAGS := $(RC_FLAGS) \ |
175 |
-D "JDK_FNAME=java.dll" \ |
|
176 |
-D "JDK_INTERNAL_NAME=java" \ |
|
177 |
-D "JDK_FTYPE=0x2L", \ |
|
178 |
REORDER := $(LIBJAVA_REORDER), \ |
|
27565 | 179 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjava, \ |
20547 | 180 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
13164 | 181 |
|
27565 | 182 |
TARGETS += $(BUILD_LIBJAVA) |
20547 | 183 |
|
184 |
$(BUILD_LIBJAVA): $(BUILD_LIBVERIFY) |
|
185 |
||
186 |
$(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM) |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
187 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
188 |
########################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
189 |
|
20547 | 190 |
BUILD_LIBZIP_EXCLUDES := |
191 |
ifeq ($(USE_EXTERNAL_LIBZ), true) |
|
24710
c019dc4104b2
8044725: Bug in zlib 1.2.5 prevents inflation of some gzipped files
sherman
parents:
23562
diff
changeset
|
192 |
LIBZIP_EXCLUDES += zlib-1.2.8 |
20547 | 193 |
endif |
194 |
||
195 |
BUILD_LIBZIP_REORDER := |
|
196 |
ifeq ($(OPENJDK_TARGET_OS), solaris) |
|
197 |
ifneq ($(OPENJDK_TARGET_CPU), x86_64) |
|
21805 | 198 |
BUILD_LIBZIP_REORDER := $(JDK_TOPDIR)/make/mapfiles/libzip/reorder-$(OPENJDK_TARGET_CPU) |
20547 | 199 |
endif |
200 |
endif |
|
201 |
||
202 |
ifeq ($(LIBZIP_CAN_USE_MMAP), true) |
|
203 |
BUILD_LIBZIP_MMAP := -DUSE_MMAP |
|
204 |
endif |
|
205 |
||
206 |
$(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \ |
|
207 |
LIBRARY := zip, \ |
|
208 |
OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \ |
|
209 |
LANG := C, \ |
|
210 |
OPTIMIZATION := LOW, \ |
|
25859 | 211 |
SRC := $(JDK_TOPDIR)/src/java.base/share/native/libzip, \ |
20547 | 212 |
EXCLUDES := $(LIBZIP_EXCLUDES), \ |
213 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
214 |
$(ZLIB_CPPFLAGS) \ |
|
25859 | 215 |
-I$(JDK_TOPDIR)/src/java.base/share/native/libjava \ |
27736
8c9bd4be4a86
8058631: Rename posix to unix in build system to match file name changes
ihse
parents:
27186
diff
changeset
|
216 |
-I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \ |
27565 | 217 |
-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
|
218 |
CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \ |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
219 |
DISABLED_WARNINGS_gcc := parentheses, \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
220 |
DISABLED_WARNINGS_clang := dangling-else, \ |
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
221 |
DISABLED_WARNINGS_microsoft := 4267, \ |
21805 | 222 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libzip/mapfile-vers, \ |
20547 | 223 |
REORDER := $(BUILD_LIBZIP_REORDER), \ |
224 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
|
225 |
$(call SET_SHARED_LIBRARY_ORIGIN) \ |
|
226 |
$(EXPORT_ZIP_FUNCS), \ |
|
227 |
LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \ |
|
27565 | 228 |
-export:ZIP_ReadEntry -export:ZIP_GetNextEntry \ |
229 |
-export:ZIP_InflateFully -export:ZIP_CRC32 \ |
|
230 |
jvm.lib $(WIN_JAVA_LIB), \ |
|
20547 | 231 |
LDFLAGS_SUFFIX_linux := -ljvm -ljava $(LIBZ), \ |
232 |
LDFLAGS_SUFFIX_solaris := -ljvm -ljava $(LIBZ) -lc, \ |
|
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
233 |
LDFLAGS_SUFFIX_aix := -ljvm -ljava $(LIBZ),\ |
20547 | 234 |
LDFLAGS_SUFFIX_macosx := $(LIBZ) -ljava -ljvm, \ |
25859 | 235 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 236 |
RC_FLAGS := $(RC_FLAGS) \ |
237 |
-D "JDK_FNAME=zip.dll" \ |
|
238 |
-D "JDK_INTERNAL_NAME=zip" \ |
|
239 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 240 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libzip, \ |
20547 | 241 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
242 |
||
243 |
||
244 |
$(BUILD_LIBZIP): $(BUILD_LIBJAVA) |
|
245 |
||
27565 | 246 |
TARGETS += $(BUILD_LIBZIP) |
20547 | 247 |
|
248 |
########################################################################################## |
|
249 |
||
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
250 |
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
|
251 |
|
25859 | 252 |
LIBJLI_CFLAGS := $(CFLAGS_JDKLIB) |
20547 | 253 |
|
254 |
ifeq ($(JVM_VARIANT_ZERO), true) |
|
255 |
ERGO_FAMILY := zero |
|
256 |
else |
|
257 |
ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86) |
|
258 |
ERGO_FAMILY := i586 |
|
259 |
else |
|
260 |
ERGO_FAMILY := $(OPENJDK_TARGET_CPU_ARCH) |
|
261 |
endif |
|
262 |
endif |
|
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
263 |
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
|
264 |
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
|
265 |
# 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
|
266 |
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
|
267 |
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
|
268 |
endif |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
269 |
LIBJLI_EXCLUDE_FILES += $(notdir $(LIBJLI_EXCLUDE_ERGO)) |
20547 | 270 |
|
271 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
29742
b73f38796859
8074840: Resolve disabled warnings for libjli and libjli_static
mikael
parents:
29374
diff
changeset
|
272 |
LIBJLI_EXCLUDE_FILES += java_md_solinux.c ergo.c ergo_i586.c |
20547 | 273 |
|
274 |
BUILD_LIBJLI_java_md_macosx.c_CFLAGS := -x objective-c |
|
275 |
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
|
276 |
|
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
277 |
LIBJLI_CFLAGS += -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" |
20547 | 278 |
endif |
279 |
||
280 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
281 |
# Staticically link with c runtime on windows. |
|
282 |
LIBJLI_CFLAGS := $(filter-out -MD, $(LIBJLI_CFLAGS)) |
|
283 |
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
|
284 |
# 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
|
285 |
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
|
286 |
ifneq ($(MSVCP_DLL), ) |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
287 |
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
|
288 |
endif |
20547 | 289 |
else |
290 |
LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)/jli |
|
291 |
endif |
|
292 |
||
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
293 |
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
|
294 |
|
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
295 |
# Append defines depending on target platform |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
296 |
LIBJLI_CFLAGS += $(OPENJDK_TARGET_CPU_JLI_CFLAGS) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
297 |
|
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
298 |
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
|
299 |
LIBJLI_CFLAGS += $(ZLIB_CPPFLAGS) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
300 |
LIBJLI_EXTRA_FILES += \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
301 |
$(addprefix $(JDK_TOPDIR)/src/java.base/share/native/libzip/zlib-1.2.8/, \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
302 |
inflate.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
303 |
inftrees.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
304 |
inffast.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
305 |
zadler32.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
306 |
zcrc32.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
307 |
zutil.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
308 |
) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
309 |
endif |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
310 |
|
20547 | 311 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI, \ |
312 |
LIBRARY := jli, \ |
|
313 |
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
|
314 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
315 |
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
|
316 |
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \ |
20547 | 317 |
LANG := C, \ |
318 |
OPTIMIZATION := HIGH, \ |
|
319 |
CFLAGS := $(LIBJLI_CFLAGS), \ |
|
29742
b73f38796859
8074840: Resolve disabled warnings for libjli and libjli_static
mikael
parents:
29374
diff
changeset
|
320 |
DISABLED_WARNINGS_solstudio := E_ASM_DISABLES_OPTIMIZATION, \ |
21805 | 321 |
MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjli/mapfile-vers, \ |
20547 | 322 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
323 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
324 |
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \ |
|
325 |
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \ |
|
326 |
LDFLAGS_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \ |
|
327 |
LDFLAGS_SUFFIX_solaris := $(LIBZ) $(LIBDL) -lc, \ |
|
21606 | 328 |
LDFLAGS_SUFFIX_linux := $(LIBZ) $(LIBDL) -lc -lpthread, \ |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
329 |
LDFLAGS_SUFFIX_aix := $(LIBZ) $(LIBDL),\ |
20547 | 330 |
LDFLAGS_SUFFIX_macosx := $(LIBZ), \ |
331 |
LDFLAGS_SUFFIX_windows := \ |
|
332 |
-export:JLI_Launch \ |
|
333 |
-export:JLI_ManifestIterate \ |
|
334 |
-export:JLI_SetTraceLauncher \ |
|
335 |
-export:JLI_ReportErrorMessage \ |
|
336 |
-export:JLI_ReportErrorMessageSys \ |
|
337 |
-export:JLI_ReportMessage \ |
|
338 |
-export:JLI_ReportExceptionDescription \ |
|
339 |
-export:JLI_MemAlloc \ |
|
340 |
-export:JLI_CmdToArgs \ |
|
341 |
-export:JLI_GetStdArgc \ |
|
342 |
-export:JLI_GetStdArgs \ |
|
343 |
advapi32.lib \ |
|
344 |
comctl32.lib \ |
|
345 |
user32.lib, \ |
|
25859 | 346 |
VERSIONINFO_RESOURCE := $(GLOBAL_VERSION_INFO_RESOURCE), \ |
20547 | 347 |
RC_FLAGS := $(RC_FLAGS) \ |
348 |
-D "JDK_FNAME=jli.dll" \ |
|
349 |
-D "JDK_INTERNAL_NAME=jli" \ |
|
350 |
-D "JDK_FTYPE=0x2L", \ |
|
27565 | 351 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli, \ |
20547 | 352 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
353 |
||
27565 | 354 |
TARGETS += $(BUILD_LIBJLI) |
20547 | 355 |
|
356 |
# On windows, the static library has the same suffix as the import library created by |
|
357 |
# with the shared library, so the static library is given a different name. No harm |
|
358 |
# in doing it for all platform to reduce complexity. |
|
359 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
360 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \ |
|
361 |
STATIC_LIBRARY := jli_static, \ |
|
27565 | 362 |
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
|
363 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
364 |
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
|
365 |
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \ |
20547 | 366 |
LANG := C, \ |
367 |
OPTIMIZATION := HIGH, \ |
|
368 |
CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS), \ |
|
369 |
ARFLAGS := $(ARFLAGS), \ |
|
27565 | 370 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \ |
20547 | 371 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
372 |
||
27565 | 373 |
TARGETS += $(BUILD_LIBJLI_STATIC) |
20547 | 374 |
|
375 |
else ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
376 |
# |
|
377 |
# On macosx they do partial (incremental) linking of libjli_static.a |
|
378 |
# code it here...rather than add support to NativeCompilation |
|
379 |
# as this is first time I see it |
|
380 |
$(eval $(call SetupNativeCompilation,BUILD_LIBJLI_STATIC, \ |
|
381 |
LIBRARY := jli_static, \ |
|
27565 | 382 |
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
|
383 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
384 |
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
|
385 |
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \ |
20547 | 386 |
LANG := C, \ |
387 |
OPTIMIZATION := HIGH, \ |
|
388 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \ |
|
389 |
LDFLAGS := -nostdlib -r, \ |
|
27565 | 390 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \ |
20547 | 391 |
DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) |
392 |
||
27565 | 393 |
$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a: $(BUILD_LIBJLI_STATIC) |
20547 | 394 |
$(call install-file) |
395 |
||
27565 | 396 |
TARGETS += $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
397 |
|
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
398 |
else ifeq ($(OPENJDK_TARGET_OS), aix) |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
399 |
# 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
|
400 |
$(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
|
401 |
STATIC_LIBRARY := jli_static, \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
402 |
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
|
403 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
404 |
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
|
405 |
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
|
406 |
LANG := C, \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
407 |
OPTIMIZATION := HIGH, \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
408 |
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
|
409 |
ARFLAGS := $(ARFLAGS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
410 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static)) |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
411 |
|
27565 | 412 |
TARGETS += $(BUILD_LIBJLI_STATIC) |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
413 |
|
20547 | 414 |
endif |