fix preselection of instructions set
[openadk.git] / package / openjdk7 / patches / openadk.patch
blob276f1fc797ebc620af480c72c450e92599a59102
1 diff -Nur icedtea-2.6.9.orig/Makefile.in icedtea-2.6.9/Makefile.in
2 --- icedtea-2.6.9.orig/Makefile.in 2017-02-14 01:37:03.478827012 +0100
3 +++ icedtea-2.6.9/Makefile.in 2017-04-02 07:50:37.977789464 +0200
4 @@ -647,7 +647,6 @@
5 STAGE1_BOOT_DIR = $(abs_top_builddir)/bootstrap/boot
6 STAGE2_BOOT_DIR = $(abs_top_builddir)/bootstrap/icedtea
7 JAMVM_IMPORT_PATH = $(abs_top_builddir)/jamvm/install/hotspot
8 -CRYPTO_CHECK_BUILD_DIR = $(abs_top_builddir)/test/cryptocheck.build
9 ECC_CHECK_BUILD_DIR = $(abs_top_builddir)/ecccheck.build
10 MIME_TYPE_CHECK_BUILD_DIR = $(abs_top_builddir)/test/mimetypecheck.build
11 STAGE1_BOOT_RUNTIME = $(STAGE1_BOOT_DIR)/jre/lib/rt.jar
12 @@ -791,7 +790,7 @@
13 $(am__append_14) $(DISTRIBUTION_PATCHES)
15 # Bootstrapping patches
16 -ICEDTEA_BOOT_PATCHES = patches/boot/javafiles.patch \
17 +ICEDTEA_BOOT_PATCHES = patches/openadk.patch patches/boot/javafiles.patch \
18 patches/boot/corba-idlj.patch patches/boot/corba-no-gen.patch \
19 patches/boot/corba-orb.patch patches/boot/demos.patch \
20 patches/boot/fphexconstants.patch \
21 @@ -1512,7 +1511,7 @@
22 clean-icedtea-debug-stage2 clean-icedtea-stage1 clean-add-zero clean-add-zero-debug \
23 clean-add-cacao clean-add-cacao-debug clean-rt clean-rewrite-rhino clean-rewriter \
24 clean-add-systemtap clean-add-systemtap-debug clean-add-nss clean-add-tzdata-support \
25 - clean-add-tzdata-support-debug clean-cryptocheck clean-policytool-@JAVA_VER@.desktop \
26 + clean-add-tzdata-support-debug clean-policytool-@JAVA_VER@.desktop \
27 clean-jconsole-@JAVA_VER@.desktop clean-ecccheck clean-mimetypecheck
28 if [ -e bootstrap ]; then \
29 rmdir bootstrap ; \
30 @@ -1545,8 +1544,7 @@
31 clean-add-systemtap-debug clean-add-systemtap-boot \
32 clean-add-nss clean-add-tzdata-support clean-add-tzdata-support-debug \
33 clean-add-tzdata-support-boot clean-check-mimetype clean-mimetypecheck \
34 - clean-check-crypto clean-check-crypto-debug clean-check-crypto-boot \
35 - clean-add-archive clean-add-archive-debug clean-add-archive-boot clean-cryptocheck \
36 + clean-add-archive clean-add-archive-debug clean-add-archive-boot \
37 clean-download-hotspot clean-download-corba clean-download-jaxp \
38 clean-download-jaxws clean-download-langtools clean-download-jdk clean-download-openjdk \
39 clean-extract-corba clean-extract-jaxp clean-extract-jaxws clean-extract-jdk \
40 @@ -2533,16 +2531,6 @@
42 rm -f stamps/add-tzdata-support.stamp
44 -stamps/check-crypto.stamp: stamps/cryptocheck.stamp stamps/icedtea.stamp
45 - if [ -e $(BUILD_SDK_DIR)/bin/java ] ; then \
46 - $(BUILD_SDK_DIR)/bin/java -cp $(CRYPTO_CHECK_BUILD_DIR) TestCryptoLevel ; \
47 - fi
48 - mkdir -p stamps
49 - touch $@
51 -clean-check-crypto:
52 - rm -f stamps/check-crypto.stamp
54 stamps/add-archive.stamp: stamps/icedtea.stamp
55 @ENABLE_CACAO_FALSE@@ENABLE_JAMVM_FALSE@@ZERO_BUILD_FALSE@ if [ -e $(BUILD_SDK_DIR)/bin/java ] ; then \
56 @ENABLE_CACAO_FALSE@@ENABLE_JAMVM_FALSE@@ZERO_BUILD_FALSE@ if test "x$(INSTALL_ARCH_DIR)" != "xppc64" -a "x$(INSTALL_ARCH_DIR)" != "xppc64le" ; then \
57 @@ -2657,16 +2645,6 @@
59 rm -f stamps/add-tzdata-support-debug.stamp
61 -stamps/check-crypto-debug.stamp: stamps/cryptocheck.stamp stamps/icedtea-debug.stamp
62 - if [ -e $(BUILD_DEBUG_SDK_DIR)/bin/java ] ; then \
63 - $(BUILD_DEBUG_SDK_DIR)/bin/java -cp $(CRYPTO_CHECK_BUILD_DIR) TestCryptoLevel ; \
64 - fi
65 - mkdir -p stamps
66 - touch $@
68 -clean-check-crypto-debug:
69 - rm -f stamps/check-crypto-debug.stamp
71 stamps/add-archive-debug.stamp: stamps/icedtea-debug.stamp
72 @ENABLE_CACAO_FALSE@@ENABLE_JAMVM_FALSE@@ZERO_BUILD_FALSE@ if [ -e $(BUILD_DEBUG_SDK_DIR)/bin/java ] ; then \
73 @ENABLE_CACAO_FALSE@@ENABLE_JAMVM_FALSE@@ZERO_BUILD_FALSE@ if test "x$(INSTALL_ARCH_DIR)" != "xppc64" -a "x$(INSTALL_ARCH_DIR)" != "xppc64le" ; then \
74 @@ -2711,24 +2689,24 @@
76 stamps/icedtea-stage2.stamp: stamps/icedtea.stamp stamps/add-cacao.stamp \
77 stamps/add-zero.stamp stamps/add-jamvm.stamp stamps/add-systemtap.stamp \
78 - stamps/add-tzdata-support.stamp stamps/check-crypto.stamp stamps/add-archive.stamp \
79 + stamps/add-tzdata-support.stamp stamps/add-archive.stamp \
80 stamps/split-debuginfo.stamp stamps/add-mime-types-file.stamp
81 mkdir -p stamps
82 touch $@
84 -clean-icedtea-stage2: clean-add-jamvm clean-check-crypto clean-add-archive clean-split-debuginfo \
85 +clean-icedtea-stage2: clean-add-jamvm clean-add-archive clean-split-debuginfo \
86 clean-add-mime-types-file
87 rm -f stamps/icedtea-stage2.stamp
89 stamps/icedtea-debug-stage2.stamp: stamps/icedtea-debug.stamp \
90 stamps/add-cacao-debug.stamp stamps/add-zero-debug.stamp stamps/add-jamvm-debug.stamp \
91 stamps/add-systemtap-debug.stamp stamps/add-tzdata-support-debug.stamp \
92 - stamps/check-crypto-debug.stamp stamps/add-archive-debug.stamp stamps/split-debuginfo-debug.stamp \
93 + stamps/add-archive-debug.stamp stamps/split-debuginfo-debug.stamp \
94 stamps/add-mime-types-file-debug.stamp
95 mkdir -p stamps
96 touch $@
98 -clean-icedtea-debug-stage2: clean-add-jamvm-debug clean-check-crypto-debug \
99 +clean-icedtea-debug-stage2: clean-add-jamvm-debug \
100 clean-add-archive-debug clean-split-debuginfo-debug clean-add-mime-types-file-debug
101 rm -f stamps/icedtea-debug-stage2.stamp
103 @@ -2799,16 +2777,6 @@
105 rm -f stamps/add-tzdata-support-boot.stamp
107 -stamps/check-crypto-boot.stamp: stamps/cryptocheck.stamp stamps/icedtea-boot.stamp
108 - if [ -e $(BUILD_BOOT_SDK_DIR)/bin/java ] ; then \
109 - $(BUILD_BOOT_SDK_DIR)/bin/java -cp $(CRYPTO_CHECK_BUILD_DIR) TestCryptoLevel ; \
110 - fi
111 - mkdir -p stamps
112 - touch $@
114 -clean-check-crypto-boot:
115 - rm -f stamps/check-crypto-boot.stamp
117 stamps/add-archive-boot.stamp: stamps/icedtea-boot.stamp
118 @ENABLE_CACAO_FALSE@@ENABLE_JAMVM_FALSE@@ZERO_BUILD_FALSE@ if [ -e $(BUILD_BOOT_SDK_DIR)/bin/java ] ; then \
119 @ENABLE_CACAO_FALSE@@ENABLE_JAMVM_FALSE@@ZERO_BUILD_FALSE@ if test "x$(INSTALL_ARCH_DIR)" != "xppc64" -a "x$(INSTALL_ARCH_DIR)" != "xppc64le" ; then \
120 @@ -2853,13 +2821,13 @@
122 stamps/icedtea-stage1.stamp: stamps/icedtea-boot.stamp \
123 stamps/add-systemtap-boot.stamp stamps/add-tzdata-support-boot.stamp \
124 - stamps/check-crypto-boot.stamp stamps/add-archive-boot.stamp \
125 + stamps/add-archive-boot.stamp \
126 stamps/split-debuginfo-boot.stamp stamps/add-mime-types-file-boot.stamp
127 mkdir -p stamps
128 touch $@
130 clean-icedtea-stage1: clean-add-systemtap-boot clean-add-tzdata-support-boot \
131 - clean-check-crypto-boot clean-add-archive-boot clean-split-debuginfo-boot \
132 + clean-add-archive-boot clean-split-debuginfo-boot \
133 clean-add-mime-types-file-boot
134 rm -f stamps/icedtea-stage1.stamp
136 @@ -2940,7 +2908,7 @@
137 stamps/jamvm.stamp: $(OPENJDK_TREE) stamps/rt.stamp
138 @BUILD_JAMVM_TRUE@ cd jamvm/jamvm && \
139 @BUILD_JAMVM_TRUE@ ./autogen.sh --with-java-runtime-library=openjdk7 \
140 -@BUILD_JAMVM_TRUE@ --prefix=$(abs_top_builddir)/jamvm/install ; \
141 +@BUILD_JAMVM_TRUE@ --prefix=$(abs_top_builddir)/jamvm/install $(CONFIGURE_ARGS); \
142 @BUILD_JAMVM_TRUE@ $(MAKE) ; \
143 @BUILD_JAMVM_TRUE@ $(MAKE) install
144 @BUILD_JAMVM_TRUE@ mkdir -p $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server
145 @@ -3323,19 +3291,6 @@
146 chmod u+w $(STAGE1_BOOT_RUNTIME) ; \
149 -# Crypto Level Check
151 -stamps/cryptocheck.stamp: $(INITIAL_BOOTSTRAP_LINK_STAMP)
152 - mkdir -p $(CRYPTO_CHECK_BUILD_DIR)
153 - $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \
154 - -d $(CRYPTO_CHECK_BUILD_DIR) $(CRYPTO_CHECK_SRCS)
155 - mkdir -p stamps
156 - touch $@
158 -clean-cryptocheck:
159 - rm -rf $(CRYPTO_CHECK_BUILD_DIR)
160 - rm -f stamps/cryptocheck.stamp
162 # Mime Type Check
164 stamps/mimetypecheck.stamp: $(INITIAL_BOOTSTRAP_LINK_STAMP)
165 @@ -3422,7 +3377,6 @@
166 ${mkinstalldirs} $(DESTDIR)${prefix}/jre/bin $(DESTDIR)${prefix}/jre/lib
167 ${mkinstalldirs} $(DESTDIR)${prefix}/jre/lib/$(INSTALL_ARCH_DIR)/{.,headless,jli,xawt}
168 ${mkinstalldirs} $(DESTDIR)${prefix}/jre/lib/ext
169 - ${mkinstalldirs} $(DESTDIR)${prefix}/tapset
170 @SPLIT_DEBUGINFO_TRUE@ ${mkinstalldirs} $(DESTDIR)$(DEBUG_PREFIX)/$(bindir) $(DESTDIR)$(DEBUG_PREFIX)/${exec_prefix}/lib
171 @SPLIT_DEBUGINFO_TRUE@ ${mkinstalldirs} $(DESTDIR)$(DEBUG_PREFIX)/${exec_prefix}/lib/$(INSTALL_ARCH_DIR)
172 @SPLIT_DEBUGINFO_TRUE@ ${mkinstalldirs} $(DESTDIR)$(DEBUG_PREFIX)/${exec_prefix}/lib/$(INSTALL_ARCH_DIR)/jli
173 @@ -3520,9 +3474,6 @@
174 for files in $(BUILD_SDK_DIR)/jre/lib/ext/*.jar; do \
175 $(call install_file,$${files},$(DESTDIR)${prefix}/jre/lib/ext,$(INSTALL_DATA));\
176 done
177 - for files in $(BUILD_SDK_DIR)/tapset/*.stp; do \
178 - $(call install_file,$${files},$(DESTDIR)${prefix}/tapset,$(INSTALL_DATA));\
179 - done
180 $(abs_top_builddir)/pax-mark-vm $(DESTDIR)${prefix} false
182 install-data-local:
183 @@ -3687,12 +3638,6 @@
185 cacao: stamps/cacao.stamp
187 -check-crypto: stamps/check-crypto.stamp
189 -check-crypto-boot: stamps/check-crypto-boot.stamp
191 -check-crypto-debug: stamps/check-crypto-debug.stamp
193 check-mimetype: stamps/check-mimetype.stamp
195 check-ecc: stamps/check-ecc.stamp
196 @@ -3703,8 +3648,6 @@
198 clone-boot: stamps/clone-boot.stamp
200 -cryptocheck: stamps/cryptocheck.stamp
202 download: stamps/download.stamp
204 download-cacao: stamps/download-cacao.stamp
205 diff -Nur icedtea-2.6.9.orig/patches/openadk.patch icedtea-2.6.9/patches/openadk.patch
206 --- icedtea-2.6.9.orig/patches/openadk.patch 1970-01-01 01:00:00.000000000 +0100
207 +++ icedtea-2.6.9/patches/openadk.patch 2017-04-01 21:44:15.574904720 +0200
208 @@ -0,0 +1,688 @@
209 +diff -Nur openjdk.orig/corba/make/common/shared/Defs-utils.gmk openjdk/corba/make/common/shared/Defs-utils.gmk
210 +--- openjdk.orig/corba/make/common/shared/Defs-utils.gmk 2017-02-07 05:06:20.000000000 +0100
211 ++++ openjdk/corba/make/common/shared/Defs-utils.gmk 2017-04-01 21:43:13.128492754 +0200
212 +@@ -136,12 +136,12 @@
213 + TRUE = $(UTILS_COMMAND_PATH)true
214 + UNAME = $(UTILS_COMMAND_PATH)uname
215 + UNIQ = $(UTILS_USR_BIN_PATH)uniq
216 +-UNZIP = $(UTILS_USR_BIN_PATH)unzip
217 +-UNZIPSFX = $(UTILS_DEVTOOL_PATH)unzipsfx
218 ++UNZIP = unzip
219 ++UNZIPSFX = unzipsfx
220 + WC = $(UTILS_USR_BIN_PATH)wc
221 + WHICH = $(UTILS_USR_BIN_PATH)which
222 + YACC = $(UTILS_CCS_BIN_PATH)yacc
223 +-ZIPEXE = $(UTILS_DEVTOOL_PATH)zip
224 ++ZIPEXE = zip
226 + # Special cases
227 + #RM is defined by GNU Make as 'rm -f'
228 +diff -Nur openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make
229 +--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make 2017-02-07 05:06:40.000000000 +0100
230 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2017-04-01 21:43:13.128492754 +0200
231 +@@ -77,7 +77,7 @@
232 + VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO))
234 + ifeq ($(TYPE),ZERO)
235 +-CFLAGS += $(LIBFFI_CFLAGS)
236 ++CFLAGS += $(LIBFFI_CFLAGS) -Wl,-Bstatic $(LIBFFI_LIBS) -Wl,-Bdynamic
237 + endif
238 + ifeq ($(TYPE),SHARK)
239 + CFLAGS += $(LIBFFI_CFLAGS)
240 +diff -Nur openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make
241 +--- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2017-02-07 05:06:40.000000000 +0100
242 ++++ openjdk/hotspot/make/linux/makefiles/vm.make 2017-04-01 21:43:13.128492754 +0200
243 +@@ -301,27 +301,9 @@
244 + LIBJVM_MAPFILE$(LDNOMAP) = mapfile_reorder
245 + LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
246 + LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM))
248 +- # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
249 +- # get around library dependency and compatibility issues. Must use gcc not
250 +- # g++ to link.
251 +- ifeq ($(STATIC_CXX), true)
252 +- LFLAGS_VM += $(STATIC_LIBGCC)
253 +- LIBS_VM += $(STATIC_STDCXX)
254 +- else
255 +- LIBS_VM += -lstdc++
256 +- endif
258 +- LIBS_VM += $(LIBS)
259 +-endif
260 +-ifeq ($(TYPE),ZERO)
261 +- LIBS_VM += $(LIBFFI_LIBS)
262 +-endif
263 +-ifeq ($(TYPE),SHARK)
264 +- LIBS_VM += $(LIBFFI_LIBS) $(LLVM_LIBS)
265 +- LFLAGS_VM += $(LLVM_LDFLAGS)
266 + endif
268 ++LIBS_VM = $(LIBS) -lstdc++ $(LIBFFI_CFLAGS) -Wl,-Bstatic $(LIBFFI_LIBS) -Wl,-Bdynamic
269 + LINK_VM = $(LINK_LIB.CC)
271 + # rule for building precompiled header
272 +@@ -358,6 +340,7 @@
273 + $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
274 + $(QUIETLY) { \
275 + echo Linking vm...; \
276 ++ echo DEBUG: $(LIBS_VM); \
277 + $(LINK_LIB.CXX/PRE_HOOK) \
278 + $(LINK_VM) $(LD_SCRIPT_FLAG) \
279 + $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM); \
280 +diff -Nur openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hotspot/make/linux/makefiles/zeroshark.make
281 +--- openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make 2017-02-07 05:06:40.000000000 +0100
282 ++++ openjdk/hotspot/make/linux/makefiles/zeroshark.make 2017-04-01 21:43:13.128492754 +0200
283 +@@ -39,20 +39,20 @@
285 + offsets_arm.s: mkoffsets
286 + @echo Generating assembler offsets
287 +- ./mkoffsets > $@
288 ++ $(QEMU) ./mkoffsets > $@
290 + bytecodes_arm.s: bytecodes_arm.def mkbc
291 + @echo Generating ARM assembler bytecode sequences
292 +- $(CXX_COMPILE) -E -x c++ - < $< | ./mkbc - $@ $(COMPILE_DONE)
293 ++ $(CXX_COMPILE) -E -x c++ - < $< | $(QEMU) ./mkbc - $@ $(COMPILE_DONE)
295 + mkbc: $(GAMMADIR)/tools/mkbc.c
296 + @echo Compiling mkbc tool
297 +- $(CC_COMPILE) -o $@ $< $(COMPILE_DONE)
298 ++ $(CC_COMPILE) -static -o $@ $< $(COMPILE_DONE)
300 + mkoffsets: asm_helper.cpp
301 + @echo Compiling offset generator
302 + $(QUIETLY) $(REMOVE_TARGET)
303 +- $(CXX_COMPILE) -DSTATIC_OFFSETS -o $@ $< $(COMPILE_DONE)
304 ++ $(CXX_COMPILE) -Wl,-static -static -static-libstdc++ -DSTATIC_OFFSETS -o $@ $< $(COMPILE_DONE)
306 + endif
307 + endif
308 +diff -Nur openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
309 +--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp 2017-02-07 05:06:40.000000000 +0100
310 ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2017-04-01 21:43:13.132492910 +0200
311 +@@ -116,7 +116,6 @@
312 + # include <string.h>
313 + # include <syscall.h>
314 + # include <sys/sysinfo.h>
315 +-# include <gnu/libc-version.h>
316 + # include <sys/ipc.h>
317 + # include <sys/shm.h>
318 + # include <link.h>
319 +@@ -674,9 +673,7 @@
320 + os::Linux::set_glibc_version(str);
321 + } else {
322 + // _CS_GNU_LIBC_VERSION is not supported, try gnu_get_libc_version()
323 +- static char _gnu_libc_version[32];
324 +- jio_snprintf(_gnu_libc_version, sizeof(_gnu_libc_version),
325 +- "glibc %s %s", gnu_get_libc_version(), gnu_get_libc_release());
326 ++ static char _gnu_libc_version[32] = "2.9";
327 + os::Linux::set_glibc_version(_gnu_libc_version);
330 +@@ -2977,10 +2974,7 @@
331 + // If we are running with earlier version, which did not have symbol versions,
332 + // we should use the base version.
333 + void* os::Linux::libnuma_dlsym(void* handle, const char *name) {
334 +- void *f = dlvsym(handle, name, "libnuma_1.1");
335 +- if (f == NULL) {
336 +- f = dlsym(handle, name);
337 +- }
338 ++ void *f = dlsym(handle, name);
339 + return f;
342 +@@ -5665,7 +5659,21 @@
343 + // Linux doesn't yet have a (official) notion of processor sets,
344 + // so just return the system wide load average.
345 + int os::loadavg(double loadavg[], int nelem) {
346 +- return ::getloadavg(loadavg, nelem);
347 ++ FILE *LOADAVG;
348 ++ double avg[3] = { 0.0, 0.0, 0.0 };
349 ++ int i, res = -1;;
351 ++ if ((LOADAVG = fopen("/proc/loadavg", "r"))) {
352 ++ fscanf(LOADAVG, "%lf %lf %lf", &avg[0], &avg[1], &avg[2]);
353 ++ res = 0;
354 ++ fclose(LOADAVG);
355 ++ }
357 ++ for (i = 0; (i < nelem) && (i < 3); i++) {
358 ++ loadavg[i] = avg[i];
359 ++ }
361 ++ return res;
364 + void os::pause() {
365 +diff -Nur openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp
366 +--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp 2017-02-07 05:06:40.000000000 +0100
367 ++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp 2017-04-01 21:43:13.132492910 +0200
368 +@@ -36,7 +36,7 @@
370 + // Atomically copy 64 bits of data
371 + static void atomic_copy64(volatile void *src, volatile void *dst) {
372 +-#if defined(PPC32)
373 ++#if defined(PPC32) && !defined(__NO_FPRS__)
374 + double tmp;
375 + asm volatile ("lfd %0, 0(%1)\n"
376 + "stfd %0, 0(%2)\n"
377 +diff -Nur openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp
378 +--- openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2017-02-07 05:06:40.000000000 +0100
379 ++++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2017-04-01 21:43:13.132492910 +0200
380 +@@ -245,7 +245,7 @@
381 + #elif defined(__APPLE__)
382 + inline int g_isnan(double f) { return isnan(f); }
383 + #elif defined(LINUX) || defined(_ALLBSD_SOURCE)
384 +-inline int g_isnan(float f) { return isnanf(f); }
385 ++inline int g_isnan(float f) { return __isnanf(f); }
386 + inline int g_isnan(double f) { return isnan(f); }
387 + #else
388 + #error "missing platform-specific definition here"
389 +@@ -259,8 +259,8 @@
391 + // Checking for finiteness
393 +-inline int g_isfinite(jfloat f) { return finite(f); }
394 +-inline int g_isfinite(jdouble f) { return finite(f); }
395 ++inline int g_isfinite(jfloat f) { return isfinite(f); }
396 ++inline int g_isfinite(jdouble f) { return isfinite(f); }
399 + // Wide characters
400 +diff -Nur openjdk.orig/jdk/make/com/sun/java/pack/Makefile openjdk/jdk/make/com/sun/java/pack/Makefile
401 +--- openjdk.orig/jdk/make/com/sun/java/pack/Makefile 2017-02-13 04:45:45.000000000 +0100
402 ++++ openjdk/jdk/make/com/sun/java/pack/Makefile 2017-04-01 21:43:13.132492910 +0200
403 +@@ -80,7 +80,7 @@
404 + OTHER_CXXFLAGS += $(ZLIB_CFLAGS) -DSYSTEM_ZLIB
405 + endif
406 + else
407 +- OTHER_CXXFLAGS += -DNO_ZLIB -DUNPACK_JNI
408 ++ CXXFLAGS_COMMON += -DNO_ZLIB -DUNPACK_JNI
409 + OTHER_LDLIBS += $(JVMLIB)
410 + endif
412 +diff -Nur openjdk.orig/jdk/make/com/sun/nio/sctp/Makefile openjdk/jdk/make/com/sun/nio/sctp/Makefile
413 +--- openjdk.orig/jdk/make/com/sun/nio/sctp/Makefile 2017-02-13 04:45:45.000000000 +0100
414 ++++ openjdk/jdk/make/com/sun/nio/sctp/Makefile 2017-04-01 21:43:13.132492910 +0200
415 +@@ -75,8 +75,8 @@
416 + ifneq ($(COMPILER_WARNINGS_FATAL),false)
417 + COMPILER_WARNINGS_FATAL=true
418 + endif
419 +-#OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread -ldl
420 +-OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -lnio -lnet -lpthread
421 ++#OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -ljavanet -lpthread -ldl
422 ++OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -lnio -ljavanet -lpthread
423 + endif
424 + ifeq ($(PLATFORM), solaris)
425 + #LIBSCTP = -lsctp
426 +diff -Nur openjdk.orig/jdk/make/common/Defs.gmk openjdk/jdk/make/common/Defs.gmk
427 +--- openjdk.orig/jdk/make/common/Defs.gmk 2017-02-13 04:45:45.000000000 +0100
428 ++++ openjdk/jdk/make/common/Defs.gmk 2017-04-01 21:43:13.132492910 +0200
429 +@@ -207,7 +207,7 @@
430 + ifeq ($(PLATFORM), macosx)
431 + FREETYPE_HEADERS_PATH = /usr/X11R6/include
432 + else
433 +- FREETYPE_HEADERS_PATH = /usr/include
434 ++ FREETYPE_HEADERS_PATH = /usr/include/disabled
435 + endif
436 + endif
437 + endif
438 +diff -Nur openjdk.orig/jdk/make/common/Sanity.gmk openjdk/jdk/make/common/Sanity.gmk
439 +--- openjdk.orig/jdk/make/common/Sanity.gmk 2017-02-13 04:45:45.000000000 +0100
440 ++++ openjdk/jdk/make/common/Sanity.gmk 2017-04-01 21:43:13.132492910 +0200
441 +@@ -91,8 +91,7 @@
442 + sane-ld_run_path \
443 + sane-alt_bootdir \
444 + sane-bootdir \
445 +- sane-local-bootdir \
446 +- sane-alsa-headers
447 ++ sane-local-bootdir
449 + ifdef OPENJDK
450 + sanity-all:: sane-freetype
451 +diff -Nur openjdk.orig/jdk/make/common/shared/Defs-utils.gmk openjdk/jdk/make/common/shared/Defs-utils.gmk
452 +--- openjdk.orig/jdk/make/common/shared/Defs-utils.gmk 2017-02-13 04:45:45.000000000 +0100
453 ++++ openjdk/jdk/make/common/shared/Defs-utils.gmk 2017-04-01 21:43:13.132492910 +0200
454 +@@ -157,13 +157,13 @@
455 + TRUE = $(UTILS_COMMAND_PATH)true
456 + UNAME = $(UTILS_COMMAND_PATH)uname
457 + UNIQ = $(UTILS_USR_BIN_PATH)uniq
458 +-UNZIP = $(UTILS_USR_BIN_PATH)unzip
459 +-UNZIPSFX = $(UTILS_DEVTOOL_PATH)unzipsfx
460 ++UNZIP = unzip
461 ++UNZIPSFX = unzipsfx
462 + XARGS = $(UTILS_USR_BIN_PATH)xargs
463 + WC = $(UTILS_USR_BIN_PATH)wc
464 + WHICH = $(UTILS_USR_BIN_PATH)which
465 + YACC = $(UTILS_CCS_BIN_PATH)yacc
466 +-ZIPEXE = $(UTILS_DEVTOOL_PATH)zip
467 ++ZIPEXE = zip
469 + # Special cases
470 + #RM is defined by GNU Make as 'rm -f'
471 +diff -Nur openjdk.orig/jdk/make/common/shared/Platform.gmk openjdk/jdk/make/common/shared/Platform.gmk
472 +--- openjdk.orig/jdk/make/common/shared/Platform.gmk 2017-02-13 04:45:45.000000000 +0100
473 ++++ openjdk/jdk/make/common/shared/Platform.gmk 2017-04-01 21:43:13.132492910 +0200
474 +@@ -170,9 +170,6 @@
475 + else
476 + mach := $(shell uname -m)
477 + endif
478 +- ifneq (,$(wildcard /usr/bin/dpkg-architecture))
479 +- mach := $(shell (dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null || echo $(mach)) | sed 's/arm64/aarch64/;s/powerpc$$/ppc/;s/hppa/parisc/;s/ppc64el/ppc64le/')
480 +- endif
481 + archExpr = case "$(mach)" in \
482 + i[3-9]86) \
483 + echo i586 \
484 +diff -Nur openjdk.orig/jdk/make/common/shared/Sanity.gmk openjdk/jdk/make/common/shared/Sanity.gmk
485 +--- openjdk.orig/jdk/make/common/shared/Sanity.gmk 2017-02-13 04:45:45.000000000 +0100
486 ++++ openjdk/jdk/make/common/shared/Sanity.gmk 2017-04-01 21:43:13.132492910 +0200
487 +@@ -114,11 +114,6 @@
488 + elif [ -f /etc/lsb-release ] ; then \
489 + $(EGREP) DISTRIB_RELEASE /etc/lsb-release | $(SED) -e 's@.*DISTRIB_RELEASE=\(.*\)@\1@'; \
490 + fi)
491 +- ALSA_INCLUDE=/usr/include/alsa/version.h
492 +- ALSA_LIBRARY=/usr/lib/libasound.so
493 +- _ALSA_VERSION := $(shell $(EGREP) SND_LIB_VERSION_STR $(ALSA_INCLUDE) | \
494 +- $(SED) -e 's@.*"\(.*\)".*@\1@' )
495 +- ALSA_VERSION := $(call GetVersion,$(_ALSA_VERSION))
496 + endif
498 + ifeq ($(PLATFORM), macosx)
499 +@@ -225,7 +220,6 @@
500 + sane-compiler \
501 + sane-link \
502 + sane-cacerts \
503 +- sane-alsa-headers \
504 + sane-ant_version \
505 + sane-zip_version \
506 + sane-unzip_version \
507 +@@ -1381,34 +1375,6 @@
508 + endif
509 + endif
511 +-######################################################
512 +-# Check that ALSA headers and libs are installed and
513 +-# that the header has the right version. We only
514 +-# need /usr/include/alsa/version.h and /usr/lib/libasound.so
515 +-######################################################
517 +-ifdef REQUIRED_ALSA_VERSION
518 +- ALSA_CHECK := $(call CheckVersions,$(ALSA_VERSION),$(REQUIRED_ALSA_VERSION))
519 +-endif
520 +-sane-alsa-headers:
521 +-ifdef REQUIRED_ALSA_VERSION
522 +- @if [ "$(ALSA_CHECK)" != "missing" ] ; then \
523 +- if [ "$(ALSA_CHECK)" != "same" -a "$(ALSA_CHECK)" != "newer" ] ; then \
524 +- $(ECHO) "ERROR: The ALSA version must be $(REQUIRED_ALSA_VERSION) or higher. \n" \
525 +- " You have the following ALSA version installed: $${alsa_version} \n" \
526 +- " Please reinstall ALSA (drivers and lib). You can download \n" \
527 +- " the source distribution from http://www.alsa-project.org \n" \
528 +- " or go to http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \
529 +- "" >> $(ERROR_FILE) ; \
530 +- fi ; \
531 +- else \
532 +- $(ECHO) "ERROR: You seem to not have installed ALSA $(REQUIRED_ALSA_VERSION) or higher. \n" \
533 +- " Please install ALSA (drivers and lib). You can download the \n" \
534 +- " source distribution from http://www.alsa-project.org or go to \n" \
535 +- " http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \
536 +- "" >> $(ERROR_FILE) ; \
537 +- fi
538 +-endif
540 + # If a sanity file doesn't exist, just make sure it's dir exists
541 + $(SANITY_FILES):
542 +diff -Nur openjdk.orig/jdk/make/java/fdlibm/Makefile openjdk/jdk/make/java/fdlibm/Makefile
543 +--- openjdk.orig/jdk/make/java/fdlibm/Makefile 2017-02-13 04:45:45.000000000 +0100
544 ++++ openjdk/jdk/make/java/fdlibm/Makefile 2017-04-01 21:43:13.132492910 +0200
545 +@@ -81,7 +81,7 @@
547 + # Things that must be linked in.
549 +-OTHER_LDLIBS =
550 ++OTHER_LDLIBS = -lm
553 + # Files to compile.
554 +diff -Nur openjdk.orig/jdk/make/java/net/Makefile openjdk/jdk/make/java/net/Makefile
555 +--- openjdk.orig/jdk/make/java/net/Makefile 2017-02-13 04:45:45.000000000 +0100
556 ++++ openjdk/jdk/make/java/net/Makefile 2017-04-01 21:43:13.132492910 +0200
557 +@@ -25,7 +25,7 @@
559 + BUILDDIR = ../..
560 + PACKAGE = java.net
561 +-LIBRARY = net
562 ++LIBRARY = javanet
563 + PRODUCT = sun
564 + JAVAC_MAX_WARNINGS = true
565 + JAVAC_LINT_OPTIONS = -Xlint:all,-deprecation
566 +diff -Nur openjdk.orig/jdk/make/java/nio/Makefile openjdk/jdk/make/java/nio/Makefile
567 +--- openjdk.orig/jdk/make/java/nio/Makefile 2017-02-13 04:45:45.000000000 +0100
568 ++++ openjdk/jdk/make/java/nio/Makefile 2017-04-01 21:43:13.132492910 +0200
569 +@@ -409,7 +409,7 @@
570 + endif
572 + ifeq ($(PLATFORM), linux)
573 +- OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread $(LIBDL)
574 ++ OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -ljavanet -lpthread $(LIBDL)
575 + ifeq ($(SYSTEM_GIO), true)
576 + OTHER_LDLIBS += $(GIO_LIBS)
577 + OTHER_INCLUDES += $(GIO_CFLAGS) -DUSE_SYSTEM_GIO
578 +@@ -966,7 +966,7 @@
580 + $(GENSOR_EXE) : $(TEMPDIR)/$(GENSOR_SRC)
581 + $(prep-target)
582 +- ($(CD) $(TEMPDIR); $(NIO_CC) $(CPPFLAGS) $(LDDFLAGS) \
583 ++ ($(CD) $(TEMPDIR); $(HOST_CC) $(CPPFLAGS_FOR_BUILD) $(LDDFLAGS) \
584 + -o genSocketOptionRegistry$(EXE_SUFFIX) $(GENSOR_SRC))
586 + ifdef NIO_PLATFORM_CLASSES_ROOT_DIR
587 +@@ -1002,7 +1002,7 @@
589 + $(GENUC_EXE) : $(GENUC_SRC)
590 + $(prep-target)
591 +- $(NIO_CC) $(CPPFLAGS) -o $@ $(GENUC_SRC)
592 ++ $(HOST_CC) $(CPPFLAGS_FOR_BUILD) -o $@ $(GENUC_SRC)
594 + ifdef NIO_PLATFORM_CLASSES_ROOT_DIR
595 + $(SFS_GEN)/UnixConstants.java: $(NIO_PLATFORM_CLASSES_ROOT_DIR)/sun/nio/fs/UnixConstants-$(PLATFORM)-$(ARCH).java
596 +diff -Nur openjdk.orig/jdk/make/javax/sound/jsoundalsa/Makefile openjdk/jdk/make/javax/sound/jsoundalsa/Makefile
597 +--- openjdk.orig/jdk/make/javax/sound/jsoundalsa/Makefile 2017-02-13 04:45:45.000000000 +0100
598 ++++ openjdk/jdk/make/javax/sound/jsoundalsa/Makefile 2017-04-01 21:43:13.132492910 +0200
599 +@@ -72,6 +72,7 @@
600 + -DUSE_PORTS=TRUE \
601 + -DUSE_PLATFORM_MIDI_OUT=TRUE \
602 + -DUSE_PLATFORM_MIDI_IN=TRUE \
603 ++ $(ALSA_CPPFLAGS) \
604 + -I$(SHARE_SRC)/native/com/sun/media/sound
607 +diff -Nur openjdk.orig/jdk/make/sun/awt/mawt.gmk openjdk/jdk/make/sun/awt/mawt.gmk
608 +--- openjdk.orig/jdk/make/sun/awt/mawt.gmk 2017-02-13 04:45:45.000000000 +0100
609 ++++ openjdk/jdk/make/sun/awt/mawt.gmk 2017-04-01 21:43:13.136493064 +0200
610 +@@ -151,22 +151,6 @@
611 + #endif
613 + LIBXTST = -lXtst
614 +-ifeq ($(PLATFORM), linux)
615 +- ifeq ($(ARCH_DATA_MODEL), 64)
616 +- # XXX what about the rest of them?
617 +- LIBXT = -lXt
618 +- else
619 +- # Allows for builds on Debian GNU Linux, X11 is in a different place
620 +- LIBXT = $(firstword $(wildcard $(OPENWIN_LIB)/libXt.a) \
621 +- $(wildcard /usr/lib/libXt.a))
622 +- LIBSM = $(firstword $(wildcard $(OPENWIN_LIB)/libSM.a) \
623 +- $(wildcard /usr/lib/libSM.a))
624 +- LIBICE = $(firstword $(wildcard $(OPENWIN_LIB)/libICE.a) \
625 +- $(wildcard /usr/lib/libICE.a))
626 +- LIBXTST = $(firstword $(wildcard $(OPENWIN_LIB)/libXtst.a) \
627 +- $(wildcard /usr/lib/libXtst.a))
628 +- endif
629 +-endif
631 + # Use -lXmu for EditRes support
632 + LIBXMU_DBG = -lXmu
633 +@@ -181,7 +165,7 @@
634 + OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH
635 + # XXX what is this define below? Isn't it motif-related?
636 + OTHER_CFLAGS += -DXMSTRINGDEFINES=1
637 +-OTHER_LDLIBS = $(LIBXMU) $(LIBXTST) -lXext $(LIBXT) $(LIBSM) $(LIBICE) -lX11 -lXi
638 ++OTHER_LDLIBS = $(LIBXMU) $(LIBXTST) -lXext -lXt -lSM -lICE -lX11 -lXi
639 + endif
641 + endif
642 +@@ -231,11 +215,6 @@
643 + CPPFLAGS += -I$(PLATFORM_SRC)/native/common/deps/fontconfig2
644 + endif
646 +-ifndef HEADLESS
647 +-CPPFLAGS += -I$(OPENWIN_HOME)/include
648 +-LDFLAGS += -L$(OPENWIN_LIB)
650 +-endif # !HEADLESS
652 + CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
653 + -I$(SHARE_SRC)/native/$(PKGDIR)/../font \
654 +@@ -270,11 +249,6 @@
655 + endif # !HEADLESS
656 + endif # PLATFORM
658 +-ifeq ($(PLATFORM), linux)
659 +- # Checking for the X11/extensions headers at the additional location
660 +- CPPFLAGS += -I$(firstword $(wildcard $(OPENWIN_HOME)/include/X11/extensions) \
661 +- $(wildcard /usr/include/X11/extensions))
662 +-endif
664 + ifeq ($(PLATFORM), macosx)
665 + CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \
666 +diff -Nur openjdk.orig/jdk/make/sun/xawt/Makefile openjdk/jdk/make/sun/xawt/Makefile
667 +--- openjdk.orig/jdk/make/sun/xawt/Makefile 2017-02-13 04:45:45.000000000 +0100
668 ++++ openjdk/jdk/make/sun/xawt/Makefile 2017-04-01 21:43:13.136493064 +0200
669 +@@ -299,16 +299,10 @@
670 + SIZERS = $(SIZER).32
671 + SIZERS_C = $(SIZER_32_C)
672 + SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32
673 +-ifdef CROSS_COMPILE_ARCH
674 +-CFLAGS_32 = -m32
675 +-endif
676 + else # !32
677 + SIZERS = $(SIZER).64
678 + SIZERS_C = $(SIZER_64_C)
679 + SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.64
680 +-ifdef CROSS_COMPILE_ARCH
681 +-CFLAGS_64 = -m64
682 +-endif
683 + endif # 32
684 + endif # !macosx
685 + endif # solaris
686 +@@ -344,11 +338,7 @@
687 + WRAPPER_GENERATOR_CLASS=$(WRAPPER_GENERATOR_TEMPDIR)/WrapperGenerator.class
688 + XLIBTYPES=$(PLATFORM_SRC)/classes/sun/awt/X11/generator/xlibtypes.txt
690 +-ifndef CROSS_COMPILE_ARCH
691 +-SIZERS_CC = $(CC)
692 +-else
693 +-SIZERS_CC = $(HOST_CC)
694 +-endif
695 ++SIZERS_CC = $(CC) -static
697 + $(SIZERS): $(SIZERS_C)
698 + $(prep-target)
699 +@@ -371,7 +361,7 @@
700 + $(CHMOD) +w $@;\
701 + else \
702 + $(ECHO) GENERATING $@; \
703 +- $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \
704 ++ $(QEMU) $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \
705 + fi
706 + @if [ "$(DOCOMPARE)$(suffix $@)" = "true.64" ]; then \
707 + $(ECHO) COMPARING $@ and $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
708 +diff -Nur openjdk.orig/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java openjdk/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java
709 +--- openjdk.orig/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java 2017-02-13 04:45:45.000000000 +0100
710 ++++ openjdk/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java 2017-04-01 21:43:13.136493064 +0200
711 +@@ -78,7 +78,7 @@
712 + */
713 + static {
714 + java.security.AccessController.doPrivileged(
715 +- new sun.security.action.LoadLibraryAction("net"));
716 ++ new sun.security.action.LoadLibraryAction("javanet"));
719 + /**
720 +diff -Nur openjdk.orig/jdk/src/share/classes/java/net/DatagramPacket.java openjdk/jdk/src/share/classes/java/net/DatagramPacket.java
721 +--- openjdk.orig/jdk/src/share/classes/java/net/DatagramPacket.java 2017-02-13 04:45:45.000000000 +0100
722 ++++ openjdk/jdk/src/share/classes/java/net/DatagramPacket.java 2017-04-01 21:43:13.136493064 +0200
723 +@@ -47,7 +47,7 @@
724 + */
725 + static {
726 + java.security.AccessController.doPrivileged(
727 +- new sun.security.action.LoadLibraryAction("net"));
728 ++ new sun.security.action.LoadLibraryAction("javanet"));
729 + init();
732 +diff -Nur openjdk.orig/jdk/src/share/classes/java/net/InetAddress.java openjdk/jdk/src/share/classes/java/net/InetAddress.java
733 +--- openjdk.orig/jdk/src/share/classes/java/net/InetAddress.java 2017-02-13 04:45:45.000000000 +0100
734 ++++ openjdk/jdk/src/share/classes/java/net/InetAddress.java 2017-04-01 21:43:13.136493064 +0200
735 +@@ -288,7 +288,7 @@
736 + static {
737 + preferIPv6Address = java.security.AccessController.doPrivileged(
738 + new GetBooleanAction("java.net.preferIPv6Addresses")).booleanValue();
739 +- AccessController.doPrivileged(new LoadLibraryAction("net"));
740 ++ AccessController.doPrivileged(new LoadLibraryAction("javanet"));
741 + init();
744 +diff -Nur openjdk.orig/jdk/src/share/classes/java/net/NetworkInterface.java openjdk/jdk/src/share/classes/java/net/NetworkInterface.java
745 +--- openjdk.orig/jdk/src/share/classes/java/net/NetworkInterface.java 2017-02-13 04:45:45.000000000 +0100
746 ++++ openjdk/jdk/src/share/classes/java/net/NetworkInterface.java 2017-04-01 21:43:13.136493064 +0200
747 +@@ -53,7 +53,7 @@
748 + private static final int defaultIndex; /* index of defaultInterface */
750 + static {
751 +- AccessController.doPrivileged(new LoadLibraryAction("net"));
752 ++ AccessController.doPrivileged(new LoadLibraryAction("javanet"));
753 + init();
754 + defaultInterface = DefaultInterface.getDefault();
755 + if (defaultInterface != null) {
756 +diff -Nur openjdk.orig/jdk/src/share/classes/sun/net/sdp/SdpSupport.java openjdk/jdk/src/share/classes/sun/net/sdp/SdpSupport.java
757 +--- openjdk.orig/jdk/src/share/classes/sun/net/sdp/SdpSupport.java 2017-02-13 04:45:45.000000000 +0100
758 ++++ openjdk/jdk/src/share/classes/sun/net/sdp/SdpSupport.java 2017-04-01 21:43:13.136493064 +0200
759 +@@ -76,6 +76,6 @@
761 + static {
762 + AccessController.doPrivileged(
763 +- new sun.security.action.LoadLibraryAction("net"));
764 ++ new sun.security.action.LoadLibraryAction("javanet"));
767 +diff -Nur openjdk.orig/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java openjdk/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java
768 +--- openjdk.orig/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java 2017-02-13 04:45:45.000000000 +0100
769 ++++ openjdk/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java 2017-04-01 21:43:13.136493064 +0200
770 +@@ -95,7 +95,7 @@
771 + }});
772 + if (b != null && b.booleanValue()) {
773 + java.security.AccessController.doPrivileged(
774 +- new sun.security.action.LoadLibraryAction("net"));
775 ++ new sun.security.action.LoadLibraryAction("javanet"));
776 + hasSystemProxies = init();
779 +diff -Nur openjdk.orig/jdk/src/solaris/bin/mipsel/jvm.cfg openjdk/jdk/src/solaris/bin/mipsel/jvm.cfg
780 +--- openjdk.orig/jdk/src/solaris/bin/mipsel/jvm.cfg 1970-01-01 01:00:00.000000000 +0100
781 ++++ openjdk/jdk/src/solaris/bin/mipsel/jvm.cfg 2017-04-01 21:43:13.136493064 +0200
782 +@@ -0,0 +1,38 @@
783 ++# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
784 ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
786 ++# This code is free software; you can redistribute it and/or modify it
787 ++# under the terms of the GNU General Public License version 2 only, as
788 ++# published by the Free Software Foundation. Oracle designates this
789 ++# particular file as subject to the "Classpath" exception as provided
790 ++# by Oracle in the LICENSE file that accompanied this code.
792 ++# This code is distributed in the hope that it will be useful, but WITHOUT
793 ++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
794 ++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
795 ++# version 2 for more details (a copy is included in the LICENSE file that
796 ++# accompanied this code).
798 ++# You should have received a copy of the GNU General Public License version
799 ++# 2 along with this work; if not, write to the Free Software Foundation,
800 ++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
802 ++# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
803 ++# or visit www.oracle.com if you need additional information or have any
804 ++# questions.
806 ++# List of JVMs that can be used as an option to java, javac, etc.
807 ++# Order is important -- first in this list is the default JVM.
808 ++# NOTE that this both this file and its format are UNSUPPORTED and
809 ++# WILL GO AWAY in a future release.
811 ++# You may also select a JVM in an arbitrary location with the
812 ++# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
813 ++# and may not be available in a future release.
815 ++-client KNOWN
816 ++-server KNOWN
817 ++-hotspot ERROR
818 ++-classic WARN
819 ++-native ERROR
820 ++-green ERROR
821 +diff -Nur openjdk.orig/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java openjdk/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java
822 +--- openjdk.orig/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java 2017-02-13 04:45:45.000000000 +0100
823 ++++ openjdk/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java 2017-04-01 21:43:13.136493064 +0200
824 +@@ -260,7 +260,7 @@
826 + static {
827 + java.security.AccessController.doPrivileged(
828 +- new sun.security.action.LoadLibraryAction("net"));
829 ++ new sun.security.action.LoadLibraryAction("javanet"));
833 +diff -Nur openjdk.orig/jdk/src/solaris/native/sun/awt/awt_InputMethod.c openjdk/jdk/src/solaris/native/sun/awt/awt_InputMethod.c
834 +--- openjdk.orig/jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2017-02-13 04:45:45.000000000 +0100
835 ++++ openjdk/jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2017-04-01 21:43:13.136493064 +0200
836 +@@ -246,7 +246,8 @@
837 + if (wcs == NULL)
838 + return NULL;
840 +- n = len*MB_CUR_MAX + 1;
841 ++ //evil hack for uclibc
842 ++ n = len*1 + 1;
844 + mbs = (char *) malloc(n * sizeof(char));
845 + if (mbs == NULL) {
846 +diff -Nur openjdk.orig/jdk/src/solaris/native/sun/xawt/XToolkit.c openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c
847 +--- openjdk.orig/jdk/src/solaris/native/sun/xawt/XToolkit.c 2017-02-13 04:45:45.000000000 +0100
848 ++++ openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c 2017-04-01 21:43:13.136493064 +0200
849 +@@ -27,9 +27,6 @@
850 + #include <X11/Xutil.h>
851 + #include <X11/Xos.h>
852 + #include <X11/Xatom.h>
853 +-#ifdef __linux__
854 +-#include <execinfo.h>
855 +-#endif
857 + #include <jvm.h>
858 + #include <jni.h>
859 +@@ -785,25 +782,6 @@
860 + return ret;
863 +-#ifdef __linux__
864 +-void print_stack(void)
866 +- void *array[10];
867 +- size_t size;
868 +- char **strings;
869 +- size_t i;
871 +- size = backtrace (array, 10);
872 +- strings = backtrace_symbols (array, size);
874 +- fprintf (stderr, "Obtained %zd stack frames.\n", size);
876 +- for (i = 0; i < size; i++)
877 +- fprintf (stderr, "%s\n", strings[i]);
879 +- free (strings);
881 +-#endif
883 + Window get_xawt_root_shell(JNIEnv *env) {
884 + static jclass classXRootWindow = NULL;
885 +diff -Nur openjdk.orig/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java openjdk/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java
886 +--- openjdk.orig/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java 2017-02-13 04:45:45.000000000 +0100
887 ++++ openjdk/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java 2017-04-01 21:43:13.136493064 +0200
888 +@@ -161,7 +161,7 @@
890 + static {
891 + java.security.AccessController.doPrivileged(
892 +- new sun.security.action.LoadLibraryAction("net"));
893 ++ new sun.security.action.LoadLibraryAction("javanet"));
894 + init0();
896 + // start the address listener thread