openadk.patch 31 KB

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