openadk.patch 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711
  1. diff -Nur icedtea-2.5.5.orig/Makefile.in icedtea-2.5.5/Makefile.in
  2. --- icedtea-2.5.5.orig/Makefile.in 2015-04-14 19:23:00.680405957 -0500
  3. +++ icedtea-2.5.5/Makefile.in 2015-04-23 18:58:16.823684032 -0500
  4. @@ -681,7 +681,7 @@
  5. $(am__append_14) $(DISTRIBUTION_PATCHES)
  6. # Bootstrapping patches
  7. -ICEDTEA_BOOT_PATCHES = patches/boot/javafiles.patch \
  8. +ICEDTEA_BOOT_PATCHES = patches/openadk.patch patches/boot/javafiles.patch \
  9. patches/boot/corba-idlj.patch patches/boot/corba-no-gen.patch \
  10. patches/boot/corba-orb.patch patches/boot/demos.patch \
  11. patches/boot/fphexconstants.patch \
  12. @@ -2588,7 +2588,7 @@
  13. @BUILD_JAMVM_TRUE@ cd jamvm/jamvm && \
  14. @BUILD_JAMVM_TRUE@ LDFLAGS="-Xlinker -z -Xlinker noexecstack" \
  15. @BUILD_JAMVM_TRUE@ ./autogen.sh --with-java-runtime-library=openjdk7 \
  16. -@BUILD_JAMVM_TRUE@ --prefix=$(abs_top_builddir)/jamvm/install ; \
  17. +@BUILD_JAMVM_TRUE@ --prefix=$(abs_top_builddir)/jamvm/install $(CONFIGURE_ARGS); \
  18. @BUILD_JAMVM_TRUE@ $(MAKE) ; \
  19. @BUILD_JAMVM_TRUE@ $(MAKE) install
  20. @BUILD_JAMVM_TRUE@ mkdir -p $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server
  21. diff -Nur icedtea-2.5.5.orig/patches/openadk.patch icedtea-2.5.5/patches/openadk.patch
  22. --- icedtea-2.5.5.orig/patches/openadk.patch 1969-12-31 18:00:00.000000000 -0600
  23. +++ icedtea-2.5.5/patches/openadk.patch 2015-04-26 03:48:06.431684003 -0500
  24. @@ -0,0 +1,686 @@
  25. +diff -Nur openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make openjdk/hotspot/make/linux/makefiles/zeroshark.make
  26. +--- openjdk.orig/hotspot/make/linux/makefiles/zeroshark.make 2015-03-10 17:41:04.000000000 -0500
  27. ++++ openjdk/hotspot/make/linux/makefiles/zeroshark.make 2015-04-23 19:03:31.107684426 -0500
  28. +@@ -39,20 +39,20 @@
  29. +
  30. + offsets_arm.s: mkoffsets
  31. + @echo Generating assembler offsets
  32. +- ./mkoffsets > $@
  33. ++ $(QEMU) ./mkoffsets > $@
  34. +
  35. + bytecodes_arm.s: bytecodes_arm.def mkbc
  36. + @echo Generating ARM assembler bytecode sequences
  37. +- $(CXX_COMPILE) -E -x c++ - < $< | ./mkbc - $@ $(COMPILE_DONE)
  38. ++ $(CXX_COMPILE) -E -x c++ - < $< | $(QEMU) ./mkbc - $@ $(COMPILE_DONE)
  39. +
  40. + mkbc: $(GAMMADIR)/tools/mkbc.c
  41. + @echo Compiling mkbc tool
  42. +- $(CC_COMPILE) -o $@ $< $(COMPILE_DONE)
  43. ++ $(CC_COMPILE) -static -o $@ $< $(COMPILE_DONE)
  44. +
  45. + mkoffsets: asm_helper.cpp
  46. + @echo Compiling offset generator
  47. + $(QUIETLY) $(REMOVE_TARGET)
  48. +- $(CXX_COMPILE) -DSTATIC_OFFSETS -o $@ $< $(COMPILE_DONE)
  49. ++ $(CXX_COMPILE) -static -DSTATIC_OFFSETS -o $@ $< $(COMPILE_DONE)
  50. +
  51. + endif
  52. + endif
  53. +diff -Nur openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
  54. +--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp 2015-03-10 17:41:04.000000000 -0500
  55. ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2015-04-23 19:03:31.111684385 -0500
  56. +@@ -112,7 +112,6 @@
  57. + # include <string.h>
  58. + # include <syscall.h>
  59. + # include <sys/sysinfo.h>
  60. +-# include <gnu/libc-version.h>
  61. + # include <sys/ipc.h>
  62. + # include <sys/shm.h>
  63. + # include <link.h>
  64. +@@ -664,9 +663,7 @@
  65. + os::Linux::set_glibc_version(str);
  66. + } else {
  67. + // _CS_GNU_LIBC_VERSION is not supported, try gnu_get_libc_version()
  68. +- static char _gnu_libc_version[32];
  69. +- jio_snprintf(_gnu_libc_version, sizeof(_gnu_libc_version),
  70. +- "glibc %s %s", gnu_get_libc_version(), gnu_get_libc_release());
  71. ++ static char _gnu_libc_version[32] = "2.9";
  72. + os::Linux::set_glibc_version(_gnu_libc_version);
  73. + }
  74. +
  75. +@@ -2959,10 +2956,7 @@
  76. + // If we are running with earlier version, which did not have symbol versions,
  77. + // we should use the base version.
  78. + void* os::Linux::libnuma_dlsym(void* handle, const char *name) {
  79. +- void *f = dlvsym(handle, name, "libnuma_1.1");
  80. +- if (f == NULL) {
  81. +- f = dlsym(handle, name);
  82. +- }
  83. ++ void *f = dlsym(handle, name);
  84. + return f;
  85. + }
  86. +
  87. +@@ -5623,7 +5617,21 @@
  88. + // Linux doesn't yet have a (official) notion of processor sets,
  89. + // so just return the system wide load average.
  90. + int os::loadavg(double loadavg[], int nelem) {
  91. +- return ::getloadavg(loadavg, nelem);
  92. ++ FILE *LOADAVG;
  93. ++ double avg[3] = { 0.0, 0.0, 0.0 };
  94. ++ int i, res = -1;;
  95. ++
  96. ++ if ((LOADAVG = fopen("/proc/loadavg", "r"))) {
  97. ++ fscanf(LOADAVG, "%lf %lf %lf", &avg[0], &avg[1], &avg[2]);
  98. ++ res = 0;
  99. ++ fclose(LOADAVG);
  100. ++ }
  101. ++
  102. ++ for (i = 0; (i < nelem) && (i < 3); i++) {
  103. ++ loadavg[i] = avg[i];
  104. ++ }
  105. ++
  106. ++ return res;
  107. + }
  108. +
  109. + void os::pause() {
  110. +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
  111. +--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp 2015-03-10 17:41:04.000000000 -0500
  112. ++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp 2015-04-25 03:58:26.519684003 -0500
  113. +@@ -36,7 +36,7 @@
  114. +
  115. + // Atomically copy 64 bits of data
  116. + static void atomic_copy64(volatile void *src, volatile void *dst) {
  117. +-#if defined(PPC32)
  118. ++#if defined(PPC32) && !defined(__NO_FPRS__)
  119. + double tmp;
  120. + asm volatile ("lfd %0, 0(%1)\n"
  121. + "stfd %0, 0(%2)\n"
  122. +diff -Nur openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp
  123. +--- openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2015-03-10 17:41:04.000000000 -0500
  124. ++++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2015-04-23 19:03:31.111684385 -0500
  125. +@@ -253,7 +253,7 @@
  126. + #elif defined(__APPLE__)
  127. + inline int g_isnan(double f) { return isnan(f); }
  128. + #elif defined(LINUX) || defined(_ALLBSD_SOURCE)
  129. +-inline int g_isnan(float f) { return isnanf(f); }
  130. ++inline int g_isnan(float f) { return __isnanf(f); }
  131. + inline int g_isnan(double f) { return isnan(f); }
  132. + #else
  133. + #error "missing platform-specific definition here"
  134. +@@ -267,8 +267,8 @@
  135. +
  136. + // Checking for finiteness
  137. +
  138. +-inline int g_isfinite(jfloat f) { return finite(f); }
  139. +-inline int g_isfinite(jdouble f) { return finite(f); }
  140. ++inline int g_isfinite(jfloat f) { return isfinite(f); }
  141. ++inline int g_isfinite(jdouble f) { return isfinite(f); }
  142. +
  143. +
  144. + // Wide characters
  145. +diff -Nur openjdk.orig/jdk/make/com/sun/java/pack/Makefile openjdk/jdk/make/com/sun/java/pack/Makefile
  146. +--- openjdk.orig/jdk/make/com/sun/java/pack/Makefile 2014-11-10 18:58:03.000000000 -0600
  147. ++++ openjdk/jdk/make/com/sun/java/pack/Makefile 2015-04-23 19:03:31.131683949 -0500
  148. +@@ -79,7 +79,7 @@
  149. + OTHER_CXXFLAGS += $(ZLIB_CFLAGS) -DSYSTEM_ZLIB
  150. + endif
  151. + else
  152. +- OTHER_CXXFLAGS += -DNO_ZLIB -DUNPACK_JNI
  153. ++ CXXFLAGS_COMMON += -DNO_ZLIB -DUNPACK_JNI
  154. + OTHER_LDLIBS += $(JVMLIB)
  155. + endif
  156. +
  157. +diff -Nur openjdk.orig/jdk/make/com/sun/nio/sctp/Makefile openjdk/jdk/make/com/sun/nio/sctp/Makefile
  158. +--- openjdk.orig/jdk/make/com/sun/nio/sctp/Makefile 2014-11-10 18:58:03.000000000 -0600
  159. ++++ openjdk/jdk/make/com/sun/nio/sctp/Makefile 2015-04-23 19:03:31.131683949 -0500
  160. +@@ -64,7 +64,7 @@
  161. + COMPILER_WARNINGS_FATAL=true
  162. + endif
  163. + #OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread -ldl
  164. +-OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -lnio -lnet -lpthread -ldl
  165. ++OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -lnio -ljavanet -lpthread -ldl
  166. + endif
  167. + ifeq ($(PLATFORM), solaris)
  168. + #LIBSCTP = -lsctp
  169. +diff -Nur openjdk.orig/jdk/make/common/Defs.gmk openjdk/jdk/make/common/Defs.gmk
  170. +--- openjdk.orig/jdk/make/common/Defs.gmk 2014-11-10 18:58:03.000000000 -0600
  171. ++++ openjdk/jdk/make/common/Defs.gmk 2015-04-23 19:03:31.131683949 -0500
  172. +@@ -207,7 +207,7 @@
  173. + ifeq ($(PLATFORM), macosx)
  174. + FREETYPE_HEADERS_PATH = /usr/X11R6/include
  175. + else
  176. +- FREETYPE_HEADERS_PATH = /usr/include
  177. ++ FREETYPE_HEADERS_PATH = /usr/include/disabled
  178. + endif
  179. + endif
  180. + endif
  181. +diff -Nur openjdk.orig/jdk/make/common/Sanity.gmk openjdk/jdk/make/common/Sanity.gmk
  182. +--- openjdk.orig/jdk/make/common/Sanity.gmk 2014-11-10 18:58:03.000000000 -0600
  183. ++++ openjdk/jdk/make/common/Sanity.gmk 2015-04-23 19:03:31.131683949 -0500
  184. +@@ -91,8 +91,7 @@
  185. + sane-ld_run_path \
  186. + sane-alt_bootdir \
  187. + sane-bootdir \
  188. +- sane-local-bootdir \
  189. +- sane-alsa-headers
  190. ++ sane-local-bootdir
  191. +
  192. + ifdef OPENJDK
  193. + sanity-all:: sane-freetype
  194. +diff -Nur openjdk.orig/jdk/make/common/shared/Defs-utils.gmk openjdk/jdk/make/common/shared/Defs-utils.gmk
  195. +--- openjdk.orig/jdk/make/common/shared/Defs-utils.gmk 2014-11-10 18:58:03.000000000 -0600
  196. ++++ openjdk/jdk/make/common/shared/Defs-utils.gmk 2015-04-23 19:03:31.131683949 -0500
  197. +@@ -157,13 +157,13 @@
  198. + TRUE = $(UTILS_COMMAND_PATH)true
  199. + UNAME = $(UTILS_COMMAND_PATH)uname
  200. + UNIQ = $(UTILS_USR_BIN_PATH)uniq
  201. +-UNZIP = $(UTILS_USR_BIN_PATH)unzip
  202. ++UNZIP = unzip
  203. + UNZIPSFX = $(UTILS_DEVTOOL_PATH)unzipsfx
  204. + XARGS = $(UTILS_USR_BIN_PATH)xargs
  205. + WC = $(UTILS_USR_BIN_PATH)wc
  206. + WHICH = $(UTILS_USR_BIN_PATH)which
  207. + YACC = $(UTILS_CCS_BIN_PATH)yacc
  208. +-ZIPEXE = $(UTILS_DEVTOOL_PATH)zip
  209. ++ZIPEXE = zip
  210. +
  211. + # Special cases
  212. + #RM is defined by GNU Make as 'rm -f'
  213. +diff -Nur openjdk.orig/jdk/make/common/shared/Platform.gmk openjdk/jdk/make/common/shared/Platform.gmk
  214. +--- openjdk.orig/jdk/make/common/shared/Platform.gmk 2014-11-10 18:58:03.000000000 -0600
  215. ++++ openjdk/jdk/make/common/shared/Platform.gmk 2015-04-23 19:03:31.131683949 -0500
  216. +@@ -170,9 +170,6 @@
  217. + else
  218. + mach := $(shell uname -m)
  219. + endif
  220. +- ifneq (,$(wildcard /usr/bin/dpkg-architecture))
  221. +- 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/')
  222. +- endif
  223. + archExpr = case "$(mach)" in \
  224. + i[3-9]86) \
  225. + echo i586 \
  226. +diff -Nur openjdk.orig/jdk/make/common/shared/Sanity.gmk openjdk/jdk/make/common/shared/Sanity.gmk
  227. +--- openjdk.orig/jdk/make/common/shared/Sanity.gmk 2014-11-10 18:58:03.000000000 -0600
  228. ++++ openjdk/jdk/make/common/shared/Sanity.gmk 2015-04-23 19:03:31.135683915 -0500
  229. +@@ -114,11 +114,6 @@
  230. + elif [ -f /etc/lsb-release ] ; then \
  231. + $(EGREP) DISTRIB_RELEASE /etc/lsb-release | $(SED) -e 's@.*DISTRIB_RELEASE=\(.*\)@\1@'; \
  232. + fi)
  233. +- ALSA_INCLUDE=/usr/include/alsa/version.h
  234. +- ALSA_LIBRARY=/usr/lib/libasound.so
  235. +- _ALSA_VERSION := $(shell $(EGREP) SND_LIB_VERSION_STR $(ALSA_INCLUDE) | \
  236. +- $(SED) -e 's@.*"\(.*\)".*@\1@' )
  237. +- ALSA_VERSION := $(call GetVersion,$(_ALSA_VERSION))
  238. + endif
  239. +
  240. + ifeq ($(PLATFORM), macosx)
  241. +@@ -225,7 +220,6 @@
  242. + sane-compiler \
  243. + sane-link \
  244. + sane-cacerts \
  245. +- sane-alsa-headers \
  246. + sane-ant_version \
  247. + sane-zip_version \
  248. + sane-unzip_version \
  249. +@@ -1381,34 +1375,6 @@
  250. + endif
  251. + endif
  252. +
  253. +-######################################################
  254. +-# Check that ALSA headers and libs are installed and
  255. +-# that the header has the right version. We only
  256. +-# need /usr/include/alsa/version.h and /usr/lib/libasound.so
  257. +-######################################################
  258. +-
  259. +-ifdef REQUIRED_ALSA_VERSION
  260. +- ALSA_CHECK := $(call CheckVersions,$(ALSA_VERSION),$(REQUIRED_ALSA_VERSION))
  261. +-endif
  262. +-sane-alsa-headers:
  263. +-ifdef REQUIRED_ALSA_VERSION
  264. +- @if [ "$(ALSA_CHECK)" != "missing" ] ; then \
  265. +- if [ "$(ALSA_CHECK)" != "same" -a "$(ALSA_CHECK)" != "newer" ] ; then \
  266. +- $(ECHO) "ERROR: The ALSA version must be $(REQUIRED_ALSA_VERSION) or higher. \n" \
  267. +- " You have the following ALSA version installed: $${alsa_version} \n" \
  268. +- " Please reinstall ALSA (drivers and lib). You can download \n" \
  269. +- " the source distribution from http://www.alsa-project.org \n" \
  270. +- " or go to http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \
  271. +- "" >> $(ERROR_FILE) ; \
  272. +- fi ; \
  273. +- else \
  274. +- $(ECHO) "ERROR: You seem to not have installed ALSA $(REQUIRED_ALSA_VERSION) or higher. \n" \
  275. +- " Please install ALSA (drivers and lib). You can download the \n" \
  276. +- " source distribution from http://www.alsa-project.org or go to \n" \
  277. +- " http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \
  278. +- "" >> $(ERROR_FILE) ; \
  279. +- fi
  280. +-endif
  281. +
  282. + # If a sanity file doesn't exist, just make sure it's dir exists
  283. + $(SANITY_FILES):
  284. +diff -Nur openjdk.orig/jdk/make/java/fdlibm/Makefile openjdk/jdk/make/java/fdlibm/Makefile
  285. +--- openjdk.orig/jdk/make/java/fdlibm/Makefile 2014-11-10 18:58:03.000000000 -0600
  286. ++++ openjdk/jdk/make/java/fdlibm/Makefile 2015-04-26 03:42:52.079684003 -0500
  287. +@@ -81,7 +81,7 @@
  288. + #
  289. + # Things that must be linked in.
  290. + #
  291. +-OTHER_LDLIBS =
  292. ++OTHER_LDLIBS = -lm
  293. +
  294. + #
  295. + # Files to compile.
  296. +diff -Nur openjdk.orig/jdk/make/java/net/Makefile openjdk/jdk/make/java/net/Makefile
  297. +--- openjdk.orig/jdk/make/java/net/Makefile 2014-11-10 18:58:03.000000000 -0600
  298. ++++ openjdk/jdk/make/java/net/Makefile 2015-04-23 19:03:31.135683915 -0500
  299. +@@ -25,7 +25,7 @@
  300. +
  301. + BUILDDIR = ../..
  302. + PACKAGE = java.net
  303. +-LIBRARY = net
  304. ++LIBRARY = javanet
  305. + PRODUCT = sun
  306. + include $(BUILDDIR)/common/Defs.gmk
  307. +
  308. +diff -Nur openjdk.orig/jdk/make/java/nio/Makefile openjdk/jdk/make/java/nio/Makefile
  309. +--- openjdk.orig/jdk/make/java/nio/Makefile 2014-11-10 18:58:03.000000000 -0600
  310. ++++ openjdk/jdk/make/java/nio/Makefile 2015-04-23 19:03:31.135683915 -0500
  311. +@@ -403,7 +403,7 @@
  312. + endif
  313. +
  314. + ifeq ($(PLATFORM), linux)
  315. +- OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread $(LIBDL)
  316. ++ OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -ljavanet -lpthread $(LIBDL)
  317. + ifeq ($(SYSTEM_GIO), true)
  318. + OTHER_LDLIBS += $(GIO_LIBS)
  319. + OTHER_INCLUDES += $(GIO_CFLAGS) -DUSE_SYSTEM_GIO
  320. +@@ -960,7 +960,7 @@
  321. +
  322. + $(GENSOR_EXE) : $(TEMPDIR)/$(GENSOR_SRC)
  323. + $(prep-target)
  324. +- ($(CD) $(TEMPDIR); $(NIO_CC) $(CPPFLAGS) $(LDDFLAGS) \
  325. ++ ($(CD) $(TEMPDIR); $(HOST_CC) $(CPPFLAGS_FOR_BUILD) $(LDDFLAGS) \
  326. + -o genSocketOptionRegistry$(EXE_SUFFIX) $(GENSOR_SRC))
  327. +
  328. + ifdef NIO_PLATFORM_CLASSES_ROOT_DIR
  329. +@@ -996,7 +996,7 @@
  330. +
  331. + $(GENUC_EXE) : $(GENUC_SRC)
  332. + $(prep-target)
  333. +- $(NIO_CC) $(CPPFLAGS) -o $@ $(GENUC_SRC)
  334. ++ $(HOST_CC) $(CPPFLAGS_FOR_BUILD) -o $@ $(GENUC_SRC)
  335. +
  336. + ifdef NIO_PLATFORM_CLASSES_ROOT_DIR
  337. + $(SFS_GEN)/UnixConstants.java: $(NIO_PLATFORM_CLASSES_ROOT_DIR)/sun/nio/fs/UnixConstants-$(PLATFORM)-$(ARCH).java
  338. +diff -Nur openjdk.orig/jdk/make/sun/awt/mawt.gmk openjdk/jdk/make/sun/awt/mawt.gmk
  339. +--- openjdk.orig/jdk/make/sun/awt/mawt.gmk 2014-11-10 18:58:03.000000000 -0600
  340. ++++ openjdk/jdk/make/sun/awt/mawt.gmk 2015-04-23 19:03:31.135683915 -0500
  341. +@@ -151,22 +151,6 @@
  342. + #endif
  343. +
  344. + LIBXTST = -lXtst
  345. +-ifeq ($(PLATFORM), linux)
  346. +- ifeq ($(ARCH_DATA_MODEL), 64)
  347. +- # XXX what about the rest of them?
  348. +- LIBXT = -lXt
  349. +- else
  350. +- # Allows for builds on Debian GNU Linux, X11 is in a different place
  351. +- LIBXT = $(firstword $(wildcard $(OPENWIN_LIB)/libXt.a) \
  352. +- $(wildcard /usr/lib/libXt.a))
  353. +- LIBSM = $(firstword $(wildcard $(OPENWIN_LIB)/libSM.a) \
  354. +- $(wildcard /usr/lib/libSM.a))
  355. +- LIBICE = $(firstword $(wildcard $(OPENWIN_LIB)/libICE.a) \
  356. +- $(wildcard /usr/lib/libICE.a))
  357. +- LIBXTST = $(firstword $(wildcard $(OPENWIN_LIB)/libXtst.a) \
  358. +- $(wildcard /usr/lib/libXtst.a))
  359. +- endif
  360. +-endif
  361. +
  362. + # Use -lXmu for EditRes support
  363. + LIBXMU_DBG = -lXmu
  364. +@@ -181,7 +165,7 @@
  365. + OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH
  366. + # XXX what is this define below? Isn't it motif-related?
  367. + OTHER_CFLAGS += -DXMSTRINGDEFINES=1
  368. +-OTHER_LDLIBS = $(LIBXMU) $(LIBXTST) -lXext $(LIBXT) $(LIBSM) $(LIBICE) -lX11 -lXi
  369. ++OTHER_LDLIBS = $(LIBXMU) $(LIBXTST) -lXext -lXt -lSM -lICE -lX11 -lXi
  370. + endif
  371. +
  372. + endif
  373. +@@ -231,11 +215,6 @@
  374. + CPPFLAGS += -I$(PLATFORM_SRC)/native/common/deps/fontconfig2
  375. + endif
  376. +
  377. +-ifndef HEADLESS
  378. +-CPPFLAGS += -I$(OPENWIN_HOME)/include
  379. +-LDFLAGS += -L$(OPENWIN_LIB)
  380. +-
  381. +-endif # !HEADLESS
  382. +
  383. + CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
  384. + -I$(SHARE_SRC)/native/$(PKGDIR)/../font \
  385. +@@ -270,11 +249,6 @@
  386. + endif # !HEADLESS
  387. + endif # PLATFORM
  388. +
  389. +-ifeq ($(PLATFORM), linux)
  390. +- # Checking for the X11/extensions headers at the additional location
  391. +- CPPFLAGS += -I$(firstword $(wildcard $(OPENWIN_HOME)/include/X11/extensions) \
  392. +- $(wildcard /usr/include/X11/extensions))
  393. +-endif
  394. +
  395. + ifeq ($(PLATFORM), macosx)
  396. + CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \
  397. +diff -Nur openjdk.orig/jdk/make/sun/xawt/Makefile openjdk/jdk/make/sun/xawt/Makefile
  398. +--- openjdk.orig/jdk/make/sun/xawt/Makefile 2014-11-10 18:58:03.000000000 -0600
  399. ++++ openjdk/jdk/make/sun/xawt/Makefile 2015-04-23 19:03:31.135683915 -0500
  400. +@@ -295,16 +295,10 @@
  401. + SIZERS = $(SIZER).32
  402. + SIZERS_C = $(SIZER_32_C)
  403. + SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32
  404. +-ifdef CROSS_COMPILE_ARCH
  405. +-CFLAGS_32 = -m32
  406. +-endif
  407. + else # !32
  408. + SIZERS = $(SIZER).64
  409. + SIZERS_C = $(SIZER_64_C)
  410. + SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.64
  411. +-ifdef CROSS_COMPILE_ARCH
  412. +-CFLAGS_64 = -m64
  413. +-endif
  414. + endif # 32
  415. + endif # !macosx
  416. + endif # solaris
  417. +@@ -340,11 +334,7 @@
  418. + WRAPPER_GENERATOR_CLASS=$(WRAPPER_GENERATOR_TEMPDIR)/WrapperGenerator.class
  419. + XLIBTYPES=$(PLATFORM_SRC)/classes/sun/awt/X11/generator/xlibtypes.txt
  420. +
  421. +-ifndef CROSS_COMPILE_ARCH
  422. +-SIZERS_CC = $(CC)
  423. +-else
  424. +-SIZERS_CC = $(HOST_CC)
  425. +-endif
  426. ++SIZERS_CC = $(CC) -static
  427. +
  428. + $(SIZERS): $(SIZERS_C)
  429. + $(prep-target)
  430. +@@ -367,7 +357,7 @@
  431. + $(CHMOD) +w $@;\
  432. + else \
  433. + $(ECHO) GENERATING $@; \
  434. +- $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \
  435. ++ $(QEMU) $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \
  436. + fi
  437. + @if [ "$(DOCOMPARE)$(suffix $@)" = "true.64" ]; then \
  438. + $(ECHO) COMPARING $@ and $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
  439. +diff -Nur openjdk.orig/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java openjdk/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java
  440. +--- openjdk.orig/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java 2014-11-10 18:58:03.000000000 -0600
  441. ++++ openjdk/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java 2015-04-23 19:03:31.135683915 -0500
  442. +@@ -69,7 +69,7 @@
  443. + */
  444. + static {
  445. + java.security.AccessController.doPrivileged(
  446. +- new sun.security.action.LoadLibraryAction("net"));
  447. ++ new sun.security.action.LoadLibraryAction("javanet"));
  448. + init();
  449. + }
  450. +
  451. +diff -Nur openjdk.orig/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java openjdk/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java
  452. +--- openjdk.orig/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java 2014-11-10 18:58:03.000000000 -0600
  453. ++++ openjdk/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java 2015-04-23 19:03:31.139683967 -0500
  454. +@@ -78,7 +78,7 @@
  455. + */
  456. + static {
  457. + java.security.AccessController.doPrivileged(
  458. +- new sun.security.action.LoadLibraryAction("net"));
  459. ++ new sun.security.action.LoadLibraryAction("javanet"));
  460. + }
  461. +
  462. + /**
  463. +diff -Nur openjdk.orig/jdk/src/share/classes/java/net/DatagramPacket.java openjdk/jdk/src/share/classes/java/net/DatagramPacket.java
  464. +--- openjdk.orig/jdk/src/share/classes/java/net/DatagramPacket.java 2014-11-10 18:58:03.000000000 -0600
  465. ++++ openjdk/jdk/src/share/classes/java/net/DatagramPacket.java 2015-04-23 19:03:31.139683967 -0500
  466. +@@ -47,7 +47,7 @@
  467. + */
  468. + static {
  469. + java.security.AccessController.doPrivileged(
  470. +- new sun.security.action.LoadLibraryAction("net"));
  471. ++ new sun.security.action.LoadLibraryAction("javanet"));
  472. + init();
  473. + }
  474. +
  475. +diff -Nur openjdk.orig/jdk/src/share/classes/java/net/InetAddress.java openjdk/jdk/src/share/classes/java/net/InetAddress.java
  476. +--- openjdk.orig/jdk/src/share/classes/java/net/InetAddress.java 2014-11-10 18:58:03.000000000 -0600
  477. ++++ openjdk/jdk/src/share/classes/java/net/InetAddress.java 2015-04-23 19:03:31.139683967 -0500
  478. +@@ -267,7 +267,7 @@
  479. + static {
  480. + preferIPv6Address = java.security.AccessController.doPrivileged(
  481. + new GetBooleanAction("java.net.preferIPv6Addresses")).booleanValue();
  482. +- AccessController.doPrivileged(new LoadLibraryAction("net"));
  483. ++ AccessController.doPrivileged(new LoadLibraryAction("javanet"));
  484. + init();
  485. + }
  486. +
  487. +diff -Nur openjdk.orig/jdk/src/share/classes/java/net/NetworkInterface.java openjdk/jdk/src/share/classes/java/net/NetworkInterface.java
  488. +--- openjdk.orig/jdk/src/share/classes/java/net/NetworkInterface.java 2014-11-10 18:58:03.000000000 -0600
  489. ++++ openjdk/jdk/src/share/classes/java/net/NetworkInterface.java 2015-04-23 19:03:31.139683967 -0500
  490. +@@ -53,7 +53,7 @@
  491. + private static final int defaultIndex; /* index of defaultInterface */
  492. +
  493. + static {
  494. +- AccessController.doPrivileged(new LoadLibraryAction("net"));
  495. ++ AccessController.doPrivileged(new LoadLibraryAction("javanet"));
  496. + init();
  497. + defaultInterface = DefaultInterface.getDefault();
  498. + if (defaultInterface != null) {
  499. +diff -Nur openjdk.orig/jdk/src/share/classes/sun/net/sdp/SdpSupport.java openjdk/jdk/src/share/classes/sun/net/sdp/SdpSupport.java
  500. +--- openjdk.orig/jdk/src/share/classes/sun/net/sdp/SdpSupport.java 2014-11-10 18:58:03.000000000 -0600
  501. ++++ openjdk/jdk/src/share/classes/sun/net/sdp/SdpSupport.java 2015-04-23 19:03:33.355684492 -0500
  502. +@@ -76,6 +76,6 @@
  503. +
  504. + static {
  505. + AccessController.doPrivileged(
  506. +- new sun.security.action.LoadLibraryAction("net"));
  507. ++ new sun.security.action.LoadLibraryAction("javanet"));
  508. + }
  509. + }
  510. +diff -Nur openjdk.orig/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java openjdk/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java
  511. +--- openjdk.orig/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java 2014-11-10 18:58:03.000000000 -0600
  512. ++++ openjdk/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java 2015-04-23 19:03:33.355684492 -0500
  513. +@@ -95,7 +95,7 @@
  514. + }});
  515. + if (b != null && b.booleanValue()) {
  516. + java.security.AccessController.doPrivileged(
  517. +- new sun.security.action.LoadLibraryAction("net"));
  518. ++ new sun.security.action.LoadLibraryAction("javanet"));
  519. + hasSystemProxies = init();
  520. + }
  521. + }
  522. +diff -Nur openjdk.orig/jdk/src/share/classes/sun/nio/ch/Util.java openjdk/jdk/src/share/classes/sun/nio/ch/Util.java
  523. +--- openjdk.orig/jdk/src/share/classes/sun/nio/ch/Util.java 2014-11-10 18:58:03.000000000 -0600
  524. ++++ openjdk/jdk/src/share/classes/sun/nio/ch/Util.java 2015-04-23 19:03:33.355684492 -0500
  525. +@@ -483,7 +483,7 @@
  526. + return;
  527. + loaded = true;
  528. + java.security.AccessController
  529. +- .doPrivileged(new sun.security.action.LoadLibraryAction("net"));
  530. ++ .doPrivileged(new sun.security.action.LoadLibraryAction("javanet"));
  531. + java.security.AccessController
  532. + .doPrivileged(new sun.security.action.LoadLibraryAction("nio"));
  533. + // IOUtil must be initialized; Its native methods are called from
  534. +diff -Nur openjdk.orig/jdk/src/solaris/bin/mipsel/jvm.cfg openjdk/jdk/src/solaris/bin/mipsel/jvm.cfg
  535. +--- openjdk.orig/jdk/src/solaris/bin/mipsel/jvm.cfg 1969-12-31 18:00:00.000000000 -0600
  536. ++++ openjdk/jdk/src/solaris/bin/mipsel/jvm.cfg 2015-04-23 19:03:34.091683603 -0500
  537. +@@ -0,0 +1,38 @@
  538. ++# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
  539. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  540. ++#
  541. ++# This code is free software; you can redistribute it and/or modify it
  542. ++# under the terms of the GNU General Public License version 2 only, as
  543. ++# published by the Free Software Foundation. Oracle designates this
  544. ++# particular file as subject to the "Classpath" exception as provided
  545. ++# by Oracle in the LICENSE file that accompanied this code.
  546. ++#
  547. ++# This code is distributed in the hope that it will be useful, but WITHOUT
  548. ++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  549. ++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  550. ++# version 2 for more details (a copy is included in the LICENSE file that
  551. ++# accompanied this code).
  552. ++#
  553. ++# You should have received a copy of the GNU General Public License version
  554. ++# 2 along with this work; if not, write to the Free Software Foundation,
  555. ++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  556. ++#
  557. ++# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  558. ++# or visit www.oracle.com if you need additional information or have any
  559. ++# questions.
  560. ++#
  561. ++# List of JVMs that can be used as an option to java, javac, etc.
  562. ++# Order is important -- first in this list is the default JVM.
  563. ++# NOTE that this both this file and its format are UNSUPPORTED and
  564. ++# WILL GO AWAY in a future release.
  565. ++#
  566. ++# You may also select a JVM in an arbitrary location with the
  567. ++# "-XXaltjvm=<jvm_dir>" option, but that too is unsupported
  568. ++# and may not be available in a future release.
  569. ++#
  570. ++-client KNOWN
  571. ++-server KNOWN
  572. ++-hotspot ERROR
  573. ++-classic WARN
  574. ++-native ERROR
  575. ++-green ERROR
  576. +diff -Nur openjdk.orig/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java openjdk/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java
  577. +--- openjdk.orig/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java 2014-11-10 18:58:03.000000000 -0600
  578. ++++ openjdk/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java 2015-04-23 19:03:34.091683603 -0500
  579. +@@ -247,7 +247,7 @@
  580. +
  581. + static {
  582. + java.security.AccessController.doPrivileged(
  583. +- new sun.security.action.LoadLibraryAction("net"));
  584. ++ new sun.security.action.LoadLibraryAction("javanet"));
  585. + }
  586. +
  587. + }
  588. +diff -Nur openjdk.orig/jdk/src/solaris/native/sun/awt/awt_InputMethod.c openjdk/jdk/src/solaris/native/sun/awt/awt_InputMethod.c
  589. +--- openjdk.orig/jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2014-11-10 18:58:03.000000000 -0600
  590. ++++ openjdk/jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2015-04-23 19:03:34.091683603 -0500
  591. +@@ -246,7 +246,8 @@
  592. + if (wcs == NULL)
  593. + return NULL;
  594. +
  595. +- n = len*MB_CUR_MAX + 1;
  596. ++ //evil hack for uclibc
  597. ++ n = len*1 + 1;
  598. +
  599. + mbs = (char *) malloc(n * sizeof(char));
  600. + if (mbs == NULL) {
  601. +diff -Nur openjdk.orig/jdk/src/solaris/native/sun/xawt/XToolkit.c openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c
  602. +--- openjdk.orig/jdk/src/solaris/native/sun/xawt/XToolkit.c 2014-11-10 18:58:03.000000000 -0600
  603. ++++ openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c 2015-04-23 19:03:34.091683603 -0500
  604. +@@ -27,9 +27,6 @@
  605. + #include <X11/Xutil.h>
  606. + #include <X11/Xos.h>
  607. + #include <X11/Xatom.h>
  608. +-#ifdef __linux__
  609. +-#include <execinfo.h>
  610. +-#endif
  611. +
  612. + #include <jvm.h>
  613. + #include <jni.h>
  614. +@@ -785,25 +782,6 @@
  615. + return ret;
  616. + }
  617. +
  618. +-#ifdef __linux__
  619. +-void print_stack(void)
  620. +-{
  621. +- void *array[10];
  622. +- size_t size;
  623. +- char **strings;
  624. +- size_t i;
  625. +-
  626. +- size = backtrace (array, 10);
  627. +- strings = backtrace_symbols (array, size);
  628. +-
  629. +- fprintf (stderr, "Obtained %zd stack frames.\n", size);
  630. +-
  631. +- for (i = 0; i < size; i++)
  632. +- fprintf (stderr, "%s\n", strings[i]);
  633. +-
  634. +- free (strings);
  635. +-}
  636. +-#endif
  637. +
  638. + Window get_xawt_root_shell(JNIEnv *env) {
  639. + static jclass classXRootWindow = NULL;
  640. +diff -Nur openjdk.orig/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java openjdk/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java
  641. +--- openjdk.orig/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java 2014-11-10 18:58:03.000000000 -0600
  642. ++++ openjdk/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java 2015-04-23 19:03:34.091683603 -0500
  643. +@@ -159,7 +159,7 @@
  644. +
  645. + static {
  646. + java.security.AccessController.doPrivileged(
  647. +- new sun.security.action.LoadLibraryAction("net"));
  648. ++ new sun.security.action.LoadLibraryAction("javanet"));
  649. + init0();
  650. +
  651. + // start the address listener thread
  652. +diff -Nur openjdk-boot.orig/corba/make/common/shared/Defs-utils.gmk openjdk-boot/corba/make/common/shared/Defs-utils.gmk
  653. +--- openjdk-boot.orig/corba/make/common/shared/Defs-utils.gmk 2015-03-10 17:40:57.000000000 -0500
  654. ++++ openjdk-boot/corba/make/common/shared/Defs-utils.gmk 2015-04-23 19:02:00.471683852 -0500
  655. +@@ -136,12 +136,12 @@
  656. + TRUE = $(UTILS_COMMAND_PATH)true
  657. + UNAME = $(UTILS_COMMAND_PATH)uname
  658. + UNIQ = $(UTILS_USR_BIN_PATH)uniq
  659. +-UNZIP = $(UTILS_USR_BIN_PATH)unzip
  660. +-UNZIPSFX = $(UTILS_DEVTOOL_PATH)unzipsfx
  661. ++UNZIP = unzip
  662. ++UNZIPSFX = unzipsfx
  663. + WC = $(UTILS_USR_BIN_PATH)wc
  664. + WHICH = $(UTILS_USR_BIN_PATH)which
  665. + YACC = $(UTILS_CCS_BIN_PATH)yacc
  666. +-ZIPEXE = $(UTILS_DEVTOOL_PATH)zip
  667. ++ZIPEXE = zip
  668. +
  669. + # Special cases
  670. + #RM is defined by GNU Make as 'rm -f'
  671. +diff -Nur openjdk-boot.orig/hotspot/make/linux/makefiles/zero.make openjdk-boot/hotspot/make/linux/makefiles/zero.make
  672. +--- openjdk-boot.orig/hotspot/make/linux/makefiles/zero.make 2015-03-10 17:41:04.000000000 -0500
  673. ++++ openjdk-boot/hotspot/make/linux/makefiles/zero.make 2015-04-23 19:02:00.471683852 -0500
  674. +@@ -33,4 +33,4 @@
  675. +
  676. + # Make sure libffi is included
  677. + CFLAGS += $(LIBFFI_CFLAGS)
  678. +-LIBS_VM += $(LIBFFI_LIBS)
  679. ++LIBS_VM += $(FFI_LDFLAGS) -Wl,-Bstatic $(LIBFFI_LIBS) -Wl,-Bdynamic
  680. +diff -Nur openjdk-boot.orig/jdk/make/common/shared/Defs-utils.gmk openjdk-boot/jdk/make/common/shared/Defs-utils.gmk
  681. +--- openjdk-boot.orig/jdk/make/common/shared/Defs-utils.gmk 2014-11-10 18:58:03.000000000 -0600
  682. ++++ openjdk-boot/jdk/make/common/shared/Defs-utils.gmk 2015-04-23 19:02:00.471683852 -0500
  683. +@@ -157,13 +157,13 @@
  684. + TRUE = $(UTILS_COMMAND_PATH)true
  685. + UNAME = $(UTILS_COMMAND_PATH)uname
  686. + UNIQ = $(UTILS_USR_BIN_PATH)uniq
  687. +-UNZIP = $(UTILS_USR_BIN_PATH)unzip
  688. +-UNZIPSFX = $(UTILS_DEVTOOL_PATH)unzipsfx
  689. ++UNZIP = unzip
  690. ++UNZIPSFX = unzipsfx
  691. + XARGS = $(UTILS_USR_BIN_PATH)xargs
  692. + WC = $(UTILS_USR_BIN_PATH)wc
  693. + WHICH = $(UTILS_USR_BIN_PATH)which
  694. + YACC = $(UTILS_CCS_BIN_PATH)yacc
  695. +-ZIPEXE = $(UTILS_DEVTOOL_PATH)zip
  696. ++ZIPEXE = zip
  697. +
  698. + # Special cases
  699. + #RM is defined by GNU Make as 'rm -f'
  700. +diff -Nur openjdk-boot.orig/jdk/make/javax/sound/jsoundalsa/Makefile openjdk-boot/jdk/make/javax/sound/jsoundalsa/Makefile
  701. +--- openjdk-boot.orig/jdk/make/javax/sound/jsoundalsa/Makefile 2014-11-10 18:58:03.000000000 -0600
  702. ++++ openjdk-boot/jdk/make/javax/sound/jsoundalsa/Makefile 2015-04-23 19:02:00.471683852 -0500
  703. +@@ -72,6 +72,7 @@
  704. + -DUSE_PORTS=TRUE \
  705. + -DUSE_PLATFORM_MIDI_OUT=TRUE \
  706. + -DUSE_PLATFORM_MIDI_IN=TRUE \
  707. ++ $(ALSA_CPPFLAGS) \
  708. + -I$(SHARE_SRC)/native/com/sun/media/sound
  709. +
  710. + #