openadk.patch 37 KB

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