openadk.patch 28 KB

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