author | pliden |
Tue, 18 Sep 2018 22:46:35 +0200 | |
changeset 51794 | 4129f43607cb |
parent 51783 | 4482acfef2a5 |
child 51808 | 3f32076a43a6 |
permissions | -rw-r--r-- |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
1 |
# |
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
2 |
# Copyright (c) 2011, 2018, 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 |
|
51765
e10ade04afe5
8210416: [linux] Poor StrictMath performance due to non-optimized compilation
sgehwolf
parents:
51669
diff
changeset
|
42 |
# If FDLIBM_CFLAGS is non-empty we know that we can optimize |
e10ade04afe5
8210416: [linux] Poor StrictMath performance due to non-optimized compilation
sgehwolf
parents:
51669
diff
changeset
|
43 |
# fdlibm when adding those extra C flags. Currently GCC, |
e10ade04afe5
8210416: [linux] Poor StrictMath performance due to non-optimized compilation
sgehwolf
parents:
51669
diff
changeset
|
44 |
# and clang only. |
e10ade04afe5
8210416: [linux] Poor StrictMath performance due to non-optimized compilation
sgehwolf
parents:
51669
diff
changeset
|
45 |
ifneq ($(FDLIBM_CFLAGS), ) |
e10ade04afe5
8210416: [linux] Poor StrictMath performance due to non-optimized compilation
sgehwolf
parents:
51669
diff
changeset
|
46 |
BUILD_LIBFDLIBM_OPTIMIZATION := LOW |
12892 | 47 |
endif |
48 |
||
47217 | 49 |
LIBFDLIBM_SRC := $(TOPDIR)/src/java.base/share/native/libfdlibm |
51765
e10ade04afe5
8210416: [linux] Poor StrictMath performance due to non-optimized compilation
sgehwolf
parents:
51669
diff
changeset
|
50 |
LIBFDLIBM_CFLAGS := -I$(LIBFDLIBM_SRC) $(FDLIBM_CFLAGS) |
25859 | 51 |
|
51783 | 52 |
$(eval $(call SetupNativeCompilation, BUILD_LIBFDLIBM, \ |
53 |
NAME := fdlibm, \ |
|
54 |
TYPE := STATIC_LIBRARY, \ |
|
55 |
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE), \ |
|
56 |
SRC := $(LIBFDLIBM_SRC), \ |
|
57 |
OPTIMIZATION := $(BUILD_LIBFDLIBM_OPTIMIZATION), \ |
|
58 |
CFLAGS := $(CFLAGS_JDKLIB) $(LIBFDLIBM_CFLAGS), \ |
|
59 |
CFLAGS_windows_debug := -DLOGGING, \ |
|
60 |
CFLAGS_aix := -qfloat=nomaf, \ |
|
61 |
DISABLED_WARNINGS_gcc := sign-compare misleading-indentation array-bounds, \ |
|
62 |
DISABLED_WARNINGS_microsoft := 4146 4244 4018, \ |
|
63 |
ARFLAGS := $(ARFLAGS), \ |
|
64 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libfdlibm, \ |
|
65 |
)) |
|
20890 | 66 |
|
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
67 |
########################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
68 |
|
20547 | 69 |
LIBVERIFY_OPTIMIZATION := HIGH |
70 |
ifneq ($(findstring $(OPENJDK_TARGET_OS), solaris linux), ) |
|
35276 | 71 |
ifeq ($(COMPILE_WITH_DEBUG_SYMBOLS), true) |
20547 | 72 |
LIBVERIFY_OPTIMIZATION := LOW |
73 |
endif |
|
13702 | 74 |
endif |
75 |
||
49244
995a5556edfa
8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents:
49241
diff
changeset
|
76 |
$(eval $(call SetupJdkLibrary, BUILD_LIBVERIFY, \ |
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
77 |
NAME := verify, \ |
20547 | 78 |
OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \ |
79 |
CFLAGS := $(CFLAGS_JDKLIB), \ |
|
48766
2c4d1993b5f9
8196985: Disable new warnings from GCC 7.3 in jdk libraries
erikj
parents:
48751
diff
changeset
|
80 |
DISABLED_WARNINGS_gcc := implicit-fallthrough, \ |
29374
f031a666744a
8074096: Disable (most) native warnings in JDK on a per-library basis
ihse
parents:
28999
diff
changeset
|
81 |
DISABLED_WARNINGS_microsoft := 4244 4267, \ |
20547 | 82 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
83 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
49241 | 84 |
LIBS_unix := -ljvm, \ |
33406 | 85 |
LIBS_windows := jvm.lib, \ |
35276 | 86 |
)) |
13164 | 87 |
|
27565 | 88 |
TARGETS += $(BUILD_LIBVERIFY) |
12317
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
89 |
|
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
90 |
########################################################################################## |
9670c1610c53
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
91 |
|
50471
f0aeede1b855
8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents:
50469
diff
changeset
|
92 |
LIBJAVA_CFLAGS := -DARCHPROPNAME='"$(OPENJDK_TARGET_CPU_OSARCH)"' |
13164 | 93 |
|
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
94 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
20547 | 95 |
BUILD_LIBJAVA_java_props_md.c_CFLAGS := -x objective-c |
96 |
BUILD_LIBJAVA_java_props_macosx.c_CFLAGS := -x objective-c |
|
13164 | 97 |
endif |
98 |
||
49244
995a5556edfa
8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents:
49241
diff
changeset
|
99 |
$(eval $(call SetupJdkLibrary, BUILD_LIBJAVA, \ |
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
100 |
NAME := java, \ |
20547 | 101 |
OPTIMIZATION := HIGH, \ |
102 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
103 |
$(LIBJAVA_CFLAGS), \ |
|
33984
2333676816eb
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
30784
diff
changeset
|
104 |
System.c_CFLAGS := $(VERSION_CFLAGS), \ |
2333676816eb
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
30784
diff
changeset
|
105 |
jdk_util.c_CFLAGS := $(VERSION_CFLAGS), \ |
50471
f0aeede1b855
8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents:
50469
diff
changeset
|
106 |
EXTRA_HEADER_DIRS := libfdlibm, \ |
37529
868c7195632c
8154087: Fix AIX and Linux/ppc64le after the integration of the new hotspot build
simonis
parents:
37525
diff
changeset
|
107 |
WARNINGS_AS_ERRORS_xlc := false, \ |
36511 | 108 |
DISABLED_WARNINGS_gcc := unused-result, \ |
32408
97230ec16697
8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents:
32267
diff
changeset
|
109 |
DISABLED_WARNINGS_solstudio := E_STATEMENT_NOT_REACHED, \ |
20547 | 110 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
111 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
33406 | 112 |
LDFLAGS_macosx := -L$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/, \ |
49440 | 113 |
LDFLAGS_windows := -delayload:shell32.dll, \ |
51783 | 114 |
LIBS := $(BUILD_LIBFDLIBM_TARGET), \ |
33406 | 115 |
LIBS_unix := -ljvm -lverify, \ |
51783 | 116 |
LIBS_linux := $(LIBDL), \ |
117 |
LIBS_solaris := -lsocket -lnsl -lscf $(LIBDL), \ |
|
118 |
LIBS_aix := $(LIBDL) $(LIBM),\ |
|
119 |
LIBS_macosx := -framework CoreFoundation \ |
|
20547 | 120 |
-framework Foundation \ |
121 |
-framework Security -framework SystemConfiguration, \ |
|
51783 | 122 |
LIBS_windows := jvm.lib $(WIN_VERIFY_LIB) \ |
33406 | 123 |
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
|
124 |
advapi32.lib version.lib, \ |
35276 | 125 |
)) |
13164 | 126 |
|
27565 | 127 |
TARGETS += $(BUILD_LIBJAVA) |
20547 | 128 |
|
129 |
$(BUILD_LIBJAVA): $(BUILD_LIBVERIFY) |
|
130 |
||
131 |
$(BUILD_LIBJAVA): $(BUILD_LIBFDLIBM) |
|
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 |
|
20547 | 135 |
BUILD_LIBZIP_EXCLUDES := |
136 |
ifeq ($(USE_EXTERNAL_LIBZ), true) |
|
43806 | 137 |
LIBZIP_EXCLUDES += zlib |
20547 | 138 |
endif |
139 |
||
140 |
ifeq ($(LIBZIP_CAN_USE_MMAP), true) |
|
141 |
BUILD_LIBZIP_MMAP := -DUSE_MMAP |
|
142 |
endif |
|
143 |
||
49244
995a5556edfa
8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents:
49241
diff
changeset
|
144 |
$(eval $(call SetupJdkLibrary, BUILD_LIBZIP, \ |
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
145 |
NAME := zip, \ |
20547 | 146 |
OPTIMIZATION := LOW, \ |
147 |
EXCLUDES := $(LIBZIP_EXCLUDES), \ |
|
148 |
CFLAGS := $(CFLAGS_JDKLIB) \ |
|
50471
f0aeede1b855
8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents:
50469
diff
changeset
|
149 |
$(LIBZ_CFLAGS), \ |
27736
8c9bd4be4a86
8058631: Rename posix to unix in build system to match file name changes
ihse
parents:
27186
diff
changeset
|
150 |
CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \ |
20547 | 151 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
33406 | 152 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
48751
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
47687
diff
changeset
|
153 |
LIBS_unix := -ljvm -ljava $(LIBZ_LIBS), \ |
33406 | 154 |
LIBS_windows := jvm.lib $(WIN_JAVA_LIB), \ |
35276 | 155 |
)) |
20547 | 156 |
|
157 |
$(BUILD_LIBZIP): $(BUILD_LIBJAVA) |
|
158 |
||
27565 | 159 |
TARGETS += $(BUILD_LIBZIP) |
20547 | 160 |
|
161 |
########################################################################################## |
|
162 |
||
49244
995a5556edfa
8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents:
49241
diff
changeset
|
163 |
$(eval $(call SetupJdkLibrary, BUILD_LIBJIMAGE, \ |
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
164 |
NAME := jimage, \ |
41217
c3bdba3a880a
8160630: libjimage.so and others should link statically to libgcc
erikj
parents:
38783
diff
changeset
|
165 |
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \ |
32641
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
166 |
OPTIMIZATION := LOW, \ |
50471
f0aeede1b855
8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents:
50469
diff
changeset
|
167 |
CFLAGS := $(CFLAGS_JDKLIB), \ |
f0aeede1b855
8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents:
50469
diff
changeset
|
168 |
CXXFLAGS := $(CXXFLAGS_JDKLIB), \ |
32641
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
169 |
CFLAGS_unix := -UDEBUG, \ |
41475 | 170 |
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \ |
33406 | 171 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
172 |
LIBS_unix := -ljvm -ldl $(LIBCXX), \ |
|
173 |
LIBS_macosx := -lc++, \ |
|
174 |
LIBS_windows := jvm.lib, \ |
|
35276 | 175 |
)) |
32641
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
176 |
|
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
177 |
$(BUILD_LIBJIMAGE): $(BUILD_LIBJAVA) |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
178 |
|
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
179 |
TARGETS += $(BUILD_LIBJIMAGE) |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
180 |
|
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
181 |
########################################################################################## |
ac2c73b45253
8087181: Move native jimage code to its own library (maybe libjimage)
jlaskey
parents:
32267
diff
changeset
|
182 |
|
47687 | 183 |
ifeq ($(call check-jvm-variant, zero), true) |
20547 | 184 |
ERGO_FAMILY := zero |
185 |
else |
|
186 |
ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86) |
|
187 |
ERGO_FAMILY := i586 |
|
188 |
else |
|
189 |
ERGO_FAMILY := $(OPENJDK_TARGET_CPU_ARCH) |
|
190 |
endif |
|
191 |
endif |
|
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
192 |
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
|
193 |
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
|
194 |
# 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
|
195 |
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
|
196 |
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
|
197 |
endif |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
198 |
LIBJLI_EXCLUDE_FILES += $(notdir $(LIBJLI_EXCLUDE_ERGO)) |
20547 | 199 |
|
200 |
ifeq ($(OPENJDK_TARGET_OS), macosx) |
|
29742
b73f38796859
8074840: Resolve disabled warnings for libjli and libjli_static
mikael
parents:
29374
diff
changeset
|
201 |
LIBJLI_EXCLUDE_FILES += java_md_solinux.c ergo.c ergo_i586.c |
20547 | 202 |
|
203 |
BUILD_LIBJLI_java_md_macosx.c_CFLAGS := -x objective-c |
|
204 |
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
|
205 |
|
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
206 |
LIBJLI_CFLAGS += -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" |
20547 | 207 |
endif |
208 |
||
209 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
210 |
# Staticically link with c runtime on windows. |
|
50471
f0aeede1b855
8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents:
50469
diff
changeset
|
211 |
LIBJLI_CFLAGS_JDKLIB := $(filter-out -MD, $(CFLAGS_JDKLIB)) |
20547 | 212 |
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
|
213 |
# 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
|
214 |
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
|
215 |
ifneq ($(MSVCP_DLL), ) |
12031ba2dc38
8042707: Source changes needed to build JDK 9 with Visual Studio 2013 (VS2013)
erikj
parents:
27799
diff
changeset
|
216 |
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
|
217 |
endif |
20547 | 218 |
else |
50471
f0aeede1b855
8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents:
50469
diff
changeset
|
219 |
LIBJLI_CFLAGS_JDKLIB := $(CFLAGS_JDKLIB) |
20547 | 220 |
LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)/jli |
221 |
endif |
|
222 |
||
48751
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
47687
diff
changeset
|
223 |
LIBJLI_CFLAGS += $(LIBZ_CFLAGS) |
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
47687
diff
changeset
|
224 |
|
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
225 |
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
|
226 |
LIBJLI_EXTRA_FILES += \ |
47217 | 227 |
$(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
|
228 |
inflate.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
229 |
inftrees.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
230 |
inffast.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
231 |
zadler32.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
232 |
zcrc32.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
233 |
zutil.c \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
234 |
) |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
235 |
endif |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
236 |
|
49244
995a5556edfa
8199639: Introduce SetupJdkLibrary and SetupJdkExecutable
ihse
parents:
49241
diff
changeset
|
237 |
$(eval $(call SetupJdkLibrary, BUILD_LIBJLI, \ |
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
238 |
NAME := jli, \ |
20547 | 239 |
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
|
240 |
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
|
241 |
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \ |
20547 | 242 |
OPTIMIZATION := HIGH, \ |
50471
f0aeede1b855
8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents:
50469
diff
changeset
|
243 |
CFLAGS := $(LIBJLI_CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \ |
32408
97230ec16697
8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents:
32267
diff
changeset
|
244 |
DISABLED_WARNINGS_solstudio := \ |
97230ec16697
8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents:
32267
diff
changeset
|
245 |
E_ASM_DISABLES_OPTIMIZATION \ |
97230ec16697
8134408: Disable warnings for jdk libraries triggered by SS12u4
erikj
parents:
32267
diff
changeset
|
246 |
E_STATEMENT_NOT_REACHED, \ |
20547 | 247 |
LDFLAGS := $(LDFLAGS_JDKLIB) \ |
248 |
$(call SET_SHARED_LIBRARY_ORIGIN), \ |
|
249 |
LDFLAGS_linux := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \ |
|
250 |
LDFLAGS_solaris := $(call SET_SHARED_LIBRARY_ORIGIN,/..), \ |
|
48751
54f355e65415
8196803: Fix build warnings in jdk libraries with Xcode 9
erikj
parents:
47687
diff
changeset
|
251 |
LIBS_unix := $(LIBZ_LIBS), \ |
49241 | 252 |
LIBS_linux := $(LIBDL) -lpthread, \ |
253 |
LIBS_solaris := $(LIBDL), \ |
|
33406 | 254 |
LIBS_aix := $(LIBDL),\ |
255 |
LIBS_macosx := -framework Cocoa -framework Security -framework ApplicationServices, \ |
|
256 |
LIBS_windows := advapi32.lib comctl32.lib user32.lib, \ |
|
35276 | 257 |
)) |
20547 | 258 |
|
27565 | 259 |
TARGETS += $(BUILD_LIBJLI) |
20547 | 260 |
|
50471
f0aeede1b855
8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents:
50469
diff
changeset
|
261 |
LIBJLI_SRC_DIRS := $(call FindSrcDirsForComponent, java.base, libjli) |
f0aeede1b855
8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents:
50469
diff
changeset
|
262 |
|
20547 | 263 |
# On windows, the static library has the same suffix as the import library created by |
264 |
# with the shared library, so the static library is given a different name. No harm |
|
265 |
# in doing it for all platform to reduce complexity. |
|
266 |
ifeq ($(OPENJDK_TARGET_OS), windows) |
|
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
267 |
$(eval $(call SetupNativeCompilation, BUILD_LIBJLI_STATIC, \ |
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
268 |
NAME := jli_static, \ |
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
269 |
TYPE := STATIC_LIBRARY, \ |
27565 | 270 |
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
|
271 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
272 |
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
|
273 |
EXTRA_FILES := $(LIBJLI_EXTRA_FILES), \ |
20547 | 274 |
OPTIMIZATION := HIGH, \ |
50471
f0aeede1b855
8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents:
50469
diff
changeset
|
275 |
CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS_JDKLIB) $(LIBJLI_CFLAGS) \ |
f0aeede1b855
8204572: SetupJdkLibrary should setup SRC and -I flags automatically
ihse
parents:
50469
diff
changeset
|
276 |
$(addprefix -I, $(LIBJLI_SRC_DIRS)), \ |
20547 | 277 |
ARFLAGS := $(ARFLAGS), \ |
27565 | 278 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \ |
35276 | 279 |
)) |
20547 | 280 |
|
27565 | 281 |
TARGETS += $(BUILD_LIBJLI_STATIC) |
20547 | 282 |
|
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
283 |
else ifeq ($(OPENJDK_TARGET_OS), aix) |
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
284 |
# AIX also requires a static libjli because the compiler doesn't support '-rpath' |
49070
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
285 |
$(eval $(call SetupNativeCompilation, BUILD_LIBJLI_STATIC, \ |
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
286 |
NAME := jli_static, \ |
d7859531621b
8198751: Refactor SetupNativeCompilation to take NAME and TYPE
ihse
parents:
48766
diff
changeset
|
287 |
TYPE := STATIC_LIBRARY, \ |
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
288 |
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
|
289 |
SRC := $(LIBJLI_SRC_DIRS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
290 |
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
|
291 |
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
|
292 |
OPTIMIZATION := HIGH, \ |
50506
54fcaffa8fac
8204684: [AIX] Build of libjli_static broken after change 8204572 (SetupJdkLibrary)
simonis
parents:
50471
diff
changeset
|
293 |
CFLAGS := $(STATIC_LIBRARY_FLAGS) $(LIBJLI_CFLAGS_JDKLIB) $(LIBJLI_CFLAGS) \ |
54fcaffa8fac
8204684: [AIX] Build of libjli_static broken after change 8204572 (SetupJdkLibrary)
simonis
parents:
50471
diff
changeset
|
294 |
$(addprefix -I, $(LIBJLI_SRC_DIRS)), \ |
28658
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
295 |
ARFLAGS := $(ARFLAGS), \ |
344426303820
8055190: Cleanup include and exclude of core-libs native libraries after source code restructure
erikj
parents:
27799
diff
changeset
|
296 |
OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static)) |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
297 |
|
27565 | 298 |
TARGETS += $(BUILD_LIBJLI_STATIC) |
22595
aaa6b141196c
8028066: PPC64: 8025715 changes broke AIX build after sync
simonis
parents:
22594
diff
changeset
|
299 |
|
20547 | 300 |
endif |