openadk.patch 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518
  1. diff -Nur icedtea-2.3.11.orig/Makefile.in icedtea-2.3.11/Makefile.in
  2. --- icedtea-2.3.11.orig/Makefile.in 2013-07-25 02:39:55.000000000 +0200
  3. +++ icedtea-2.3.11/Makefile.in 2013-12-08 15:43:27.000000000 +0100
  4. @@ -695,7 +695,7 @@
  5. $(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/ecj-fphexconstants.patch \
  12. @@ -2090,7 +2090,7 @@
  13. # Optional native ecj
  14. stamps/native-ecj.stamp:
  15. mkdir -p stamps
  16. -@BUILD_NATIVE_ECJ_TRUE@ ${GCJ} $(IT_CFLAGS) -Wl,-Bsymbolic -findirect-dispatch -o native-ecj \
  17. +@BUILD_NATIVE_ECJ_TRUE@ ${GCJ} -lgcj -Wl,-Bsymbolic -findirect-dispatch -o native-ecj \
  18. @BUILD_NATIVE_ECJ_TRUE@ --main=org.eclipse.jdt.internal.compiler.batch.Main ${ECJ_JAR}
  19. touch $@
  20. diff -Nur icedtea-2.3.11.orig/patches/openadk.patch icedtea-2.3.11/patches/openadk.patch
  21. --- icedtea-2.3.11.orig/patches/openadk.patch 1970-01-01 01:00:00.000000000 +0100
  22. +++ icedtea-2.3.11/patches/openadk.patch 2013-12-08 16:22:41.000000000 +0100
  23. @@ -0,0 +1,493 @@
  24. +diff -Nur openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
  25. +--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp 2013-07-17 20:14:46.000000000 +0200
  26. ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2013-12-08 15:44:03.000000000 +0100
  27. +@@ -115,7 +115,6 @@
  28. + # include <string.h>
  29. + # include <syscall.h>
  30. + # include <sys/sysinfo.h>
  31. +-# include <gnu/libc-version.h>
  32. + # include <sys/ipc.h>
  33. + # include <sys/shm.h>
  34. + # include <link.h>
  35. +@@ -649,9 +648,7 @@
  36. + os::Linux::set_glibc_version(str);
  37. + } else {
  38. + // _CS_GNU_LIBC_VERSION is not supported, try gnu_get_libc_version()
  39. +- static char _gnu_libc_version[32];
  40. +- jio_snprintf(_gnu_libc_version, sizeof(_gnu_libc_version),
  41. +- "glibc %s %s", gnu_get_libc_version(), gnu_get_libc_release());
  42. ++ static char _gnu_libc_version[32] = "2.9";
  43. + os::Linux::set_glibc_version(_gnu_libc_version);
  44. + }
  45. +
  46. +@@ -2648,10 +2645,7 @@
  47. + // If we are running with earlier version, which did not have symbol versions,
  48. + // we should use the base version.
  49. + void* os::Linux::libnuma_dlsym(void* handle, const char *name) {
  50. +- void *f = dlvsym(handle, name, "libnuma_1.1");
  51. +- if (f == NULL) {
  52. +- f = dlsym(handle, name);
  53. +- }
  54. ++ void *f = dlsym(handle, name);
  55. + return f;
  56. + }
  57. +
  58. +@@ -4916,7 +4910,21 @@
  59. + // Linux doesn't yet have a (official) notion of processor sets,
  60. + // so just return the system wide load average.
  61. + int os::loadavg(double loadavg[], int nelem) {
  62. +- return ::getloadavg(loadavg, nelem);
  63. ++ FILE *LOADAVG;
  64. ++ double avg[3] = { 0.0, 0.0, 0.0 };
  65. ++ int i, res = -1;;
  66. ++
  67. ++ if ((LOADAVG = fopen("/proc/loadavg", "r"))) {
  68. ++ fscanf(LOADAVG, "%lf %lf %lf", &avg[0], &avg[1], &avg[2]);
  69. ++ res = 0;
  70. ++ fclose(LOADAVG);
  71. ++ }
  72. ++
  73. ++ for (i = 0; (i < nelem) && (i < 3); i++) {
  74. ++ loadavg[i] = avg[i];
  75. ++ }
  76. ++
  77. ++ return res;
  78. + }
  79. +
  80. + void os::pause() {
  81. +diff -Nur openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp
  82. +--- openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2013-07-17 20:14:46.000000000 +0200
  83. ++++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2013-12-08 15:44:03.000000000 +0100
  84. +@@ -253,7 +253,7 @@
  85. + #elif defined(__APPLE__)
  86. + inline int g_isnan(double f) { return isnan(f); }
  87. + #elif defined(LINUX) || defined(_ALLBSD_SOURCE)
  88. +-inline int g_isnan(float f) { return isnanf(f); }
  89. ++inline int g_isnan(float f) { return __isnanf(f); }
  90. + inline int g_isnan(double f) { return isnan(f); }
  91. + #else
  92. + #error "missing platform-specific definition here"
  93. +@@ -267,8 +267,8 @@
  94. +
  95. + // Checking for finiteness
  96. +
  97. +-inline int g_isfinite(jfloat f) { return finite(f); }
  98. +-inline int g_isfinite(jdouble f) { return finite(f); }
  99. ++inline int g_isfinite(jfloat f) { return isfinite(f); }
  100. ++inline int g_isfinite(jdouble f) { return isfinite(f); }
  101. +
  102. +
  103. + // Wide characters
  104. +diff -Nur openjdk.orig/jdk/make/com/sun/java/pack/Makefile openjdk/jdk/make/com/sun/java/pack/Makefile
  105. +--- openjdk.orig/jdk/make/com/sun/java/pack/Makefile 2013-06-23 17:54:05.000000000 +0200
  106. ++++ openjdk/jdk/make/com/sun/java/pack/Makefile 2013-12-08 15:44:03.000000000 +0100
  107. +@@ -80,7 +80,7 @@
  108. + LDDFLAGS += $(ZIPOBJS)
  109. + endif
  110. + else
  111. +- OTHER_CXXFLAGS += -DNO_ZLIB -DUNPACK_JNI
  112. ++ CXXFLAGS_COMMON += -DNO_ZLIB -DUNPACK_JNI
  113. + OTHER_LDLIBS += $(JVMLIB)
  114. + endif
  115. +
  116. +diff -Nur openjdk.orig/jdk/make/com/sun/nio/sctp/Makefile openjdk/jdk/make/com/sun/nio/sctp/Makefile
  117. +--- openjdk.orig/jdk/make/com/sun/nio/sctp/Makefile 2013-06-23 17:54:05.000000000 +0200
  118. ++++ openjdk/jdk/make/com/sun/nio/sctp/Makefile 2013-12-08 15:44:03.000000000 +0100
  119. +@@ -64,7 +64,7 @@
  120. + COMPILER_WARNINGS_FATAL=true
  121. + endif
  122. + #OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread -ldl
  123. +-OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -lnio -lnet -lpthread -ldl
  124. ++OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -lnio -ljavanet -lpthread -ldl
  125. + endif
  126. + ifeq ($(PLATFORM), solaris)
  127. + #LIBSCTP = -lsctp
  128. +diff -Nur openjdk.orig/jdk/make/common/Defs.gmk openjdk/jdk/make/common/Defs.gmk
  129. +--- openjdk.orig/jdk/make/common/Defs.gmk 2013-06-23 17:54:05.000000000 +0200
  130. ++++ openjdk/jdk/make/common/Defs.gmk 2013-12-08 15:44:03.000000000 +0100
  131. +@@ -204,7 +204,7 @@
  132. + ifeq ($(PLATFORM), macosx)
  133. + FREETYPE_HEADERS_PATH = /usr/X11R6/include
  134. + else
  135. +- FREETYPE_HEADERS_PATH = /usr/include
  136. ++ FREETYPE_HEADERS_PATH = /usr/include/disabled
  137. + endif
  138. + endif
  139. + endif
  140. +diff -Nur openjdk.orig/jdk/make/common/shared/Platform.gmk openjdk/jdk/make/common/shared/Platform.gmk
  141. +--- openjdk.orig/jdk/make/common/shared/Platform.gmk 2013-06-23 17:54:05.000000000 +0200
  142. ++++ openjdk/jdk/make/common/shared/Platform.gmk 2013-12-08 15:44:03.000000000 +0100
  143. +@@ -160,9 +160,6 @@
  144. + else
  145. + mach := $(shell uname -m)
  146. + endif
  147. +- ifneq (,$(wildcard /usr/bin/dpkg-architecture))
  148. +- mach := $(shell (dpkg-architecture -qDEB_BUILD_ARCH_CPU 2>/dev/null || echo $(mach)) | sed 's/powerpc$$/ppc/;s/hppa/parisc/')
  149. +- endif
  150. + archExpr = case "$(mach)" in \
  151. + i[3-9]86) \
  152. + echo i586 \
  153. +diff -Nur openjdk.orig/jdk/make/java/instrument/Makefile openjdk/jdk/make/java/instrument/Makefile
  154. +--- openjdk.orig/jdk/make/java/instrument/Makefile 2013-06-23 17:54:05.000000000 +0200
  155. ++++ openjdk/jdk/make/java/instrument/Makefile 2013-12-08 15:44:04.000000000 +0100
  156. +@@ -140,6 +140,8 @@
  157. + # We don't want to link against -ljava
  158. + JAVALIB=
  159. +
  160. ++OTHER_LDLIBS += -liconv
  161. ++
  162. + #
  163. + # Add to ambient vpath so we pick up the library files
  164. + #
  165. +diff -Nur openjdk.orig/jdk/make/java/net/Makefile openjdk/jdk/make/java/net/Makefile
  166. +--- openjdk.orig/jdk/make/java/net/Makefile 2013-06-23 17:54:05.000000000 +0200
  167. ++++ openjdk/jdk/make/java/net/Makefile 2013-12-08 15:44:04.000000000 +0100
  168. +@@ -25,7 +25,7 @@
  169. +
  170. + BUILDDIR = ../..
  171. + PACKAGE = java.net
  172. +-LIBRARY = net
  173. ++LIBRARY = javanet
  174. + PRODUCT = sun
  175. + include $(BUILDDIR)/common/Defs.gmk
  176. +
  177. +diff -Nur openjdk.orig/jdk/make/java/nio/Makefile openjdk/jdk/make/java/nio/Makefile
  178. +--- openjdk.orig/jdk/make/java/nio/Makefile 2013-06-23 17:54:05.000000000 +0200
  179. ++++ openjdk/jdk/make/java/nio/Makefile 2013-12-08 15:44:04.000000000 +0100
  180. +@@ -369,7 +369,7 @@
  181. + endif
  182. +
  183. + ifeq ($(PLATFORM), linux)
  184. +- OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread $(LIBDL)
  185. ++ OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -ljavanet -lpthread $(LIBDL)
  186. + ifdef USE_SYSTEM_GIO
  187. + OTHER_LDLIBS += $(GIO_LIBS)
  188. + OTHER_INCLUDES += $(GIO_CFLAGS) -DUSE_SYSTEM_GIO
  189. +@@ -923,7 +923,7 @@
  190. +
  191. + $(GENSOR_EXE) : $(TEMPDIR)/$(GENSOR_SRC)
  192. + $(prep-target)
  193. +- ($(CD) $(TEMPDIR); $(NIO_CC) $(CPPFLAGS) $(LDDFLAGS) \
  194. ++ ($(CD) $(TEMPDIR); $(HOST_CC) $(CPPFLAGS_FOR_BUILD) $(LDDFLAGS) \
  195. + -o genSocketOptionRegistry$(EXE_SUFFIX) $(GENSOR_SRC))
  196. +
  197. + ifdef NIO_PLATFORM_CLASSES_ROOT_DIR
  198. +@@ -959,7 +959,7 @@
  199. +
  200. + $(GENUC_EXE) : $(GENUC_SRC)
  201. + $(prep-target)
  202. +- $(NIO_CC) $(CPPFLAGS) -o $@ $(GENUC_SRC)
  203. ++ $(HOST_CC) $(CPPFLAGS_FOR_BUILD) -o $@ $(GENUC_SRC)
  204. +
  205. + ifdef NIO_PLATFORM_CLASSES_ROOT_DIR
  206. + $(SFS_GEN)/UnixConstants.java: $(NIO_PLATFORM_CLASSES_ROOT_DIR)/sun/nio/fs/UnixConstants-$(PLATFORM)-$(ARCH).java
  207. +diff -Nur openjdk.orig/jdk/make/java/npt/Makefile openjdk/jdk/make/java/npt/Makefile
  208. +--- openjdk.orig/jdk/make/java/npt/Makefile 2013-06-23 17:54:05.000000000 +0200
  209. ++++ openjdk/jdk/make/java/npt/Makefile 2013-12-08 15:44:04.000000000 +0100
  210. +@@ -64,6 +64,8 @@
  211. + # We don't want to link against -ljava
  212. + JAVALIB=
  213. +
  214. ++OTHER_LDLIBS += -liconv
  215. ++
  216. + # Add -export options to explicitly spell exported symbols
  217. + ifeq ($(PLATFORM), windows)
  218. + OTHER_LCF += -export:nptInitialize -export:nptTerminate
  219. +diff -Nur openjdk.orig/jdk/make/sun/awt/mawt.gmk openjdk/jdk/make/sun/awt/mawt.gmk
  220. +--- openjdk.orig/jdk/make/sun/awt/mawt.gmk 2013-06-23 17:54:05.000000000 +0200
  221. ++++ openjdk/jdk/make/sun/awt/mawt.gmk 2013-12-08 15:44:04.000000000 +0100
  222. +@@ -151,22 +151,6 @@
  223. + #endif
  224. +
  225. + LIBXTST = -lXtst
  226. +-ifeq ($(PLATFORM), linux)
  227. +- ifeq ($(ARCH_DATA_MODEL), 64)
  228. +- # XXX what about the rest of them?
  229. +- LIBXT = -lXt
  230. +- else
  231. +- # Allows for builds on Debian GNU Linux, X11 is in a different place
  232. +- LIBXT = $(firstword $(wildcard $(OPENWIN_LIB)/libXt.a) \
  233. +- $(wildcard /usr/lib/libXt.a))
  234. +- LIBSM = $(firstword $(wildcard $(OPENWIN_LIB)/libSM.a) \
  235. +- $(wildcard /usr/lib/libSM.a))
  236. +- LIBICE = $(firstword $(wildcard $(OPENWIN_LIB)/libICE.a) \
  237. +- $(wildcard /usr/lib/libICE.a))
  238. +- LIBXTST = $(firstword $(wildcard $(OPENWIN_LIB)/libXtst.a) \
  239. +- $(wildcard /usr/lib/libXtst.a))
  240. +- endif
  241. +-endif
  242. +
  243. + # Use -lXmu for EditRes support
  244. + LIBXMU_DBG = -lXmu
  245. +@@ -181,7 +165,7 @@
  246. + OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH
  247. + # XXX what is this define below? Isn't it motif-related?
  248. + OTHER_CFLAGS += -DXMSTRINGDEFINES=1
  249. +-OTHER_LDLIBS = $(LIBXMU) $(LIBXTST) -lXext $(LIBXT) $(LIBSM) $(LIBICE) -lX11 -lXi
  250. ++OTHER_LDLIBS = $(LIBXMU) $(LIBXTST) -lXext -lXt -lSM -lICE -lX11 -lXi
  251. + endif
  252. +
  253. + endif
  254. +@@ -230,11 +214,6 @@
  255. + CPPFLAGS += -I$(PLATFORM_SRC)/native/common/deps/fontconfig2
  256. + endif
  257. +
  258. +-ifndef HEADLESS
  259. +-CPPFLAGS += -I$(OPENWIN_HOME)/include
  260. +-LDFLAGS += -L$(OPENWIN_LIB)
  261. +-
  262. +-endif # !HEADLESS
  263. +
  264. + CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
  265. + -I$(SHARE_SRC)/native/$(PKGDIR)/../font \
  266. +@@ -269,11 +248,6 @@
  267. + endif # !HEADLESS
  268. + endif # PLATFORM
  269. +
  270. +-ifeq ($(PLATFORM), linux)
  271. +- # Checking for the X11/extensions headers at the additional location
  272. +- CPPFLAGS += -I$(firstword $(wildcard $(OPENWIN_HOME)/include/X11/extensions) \
  273. +- $(wildcard /usr/include/X11/extensions))
  274. +-endif
  275. +
  276. + ifeq ($(PLATFORM), macosx))
  277. + CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \
  278. +diff -Nur openjdk.orig/jdk/make/sun/splashscreen/Makefile openjdk/jdk/make/sun/splashscreen/Makefile
  279. +--- openjdk.orig/jdk/make/sun/splashscreen/Makefile 2013-06-23 17:54:05.000000000 +0200
  280. ++++ openjdk/jdk/make/sun/splashscreen/Makefile 2013-12-08 15:44:04.000000000 +0100
  281. +@@ -55,6 +55,8 @@
  282. +
  283. + JAVALIB=
  284. +
  285. ++OTHER_LDLIBS += -liconv
  286. ++
  287. + #
  288. + # C Flags
  289. + #
  290. +diff -Nur openjdk.orig/jdk/make/sun/xawt/Makefile openjdk/jdk/make/sun/xawt/Makefile
  291. +--- openjdk.orig/jdk/make/sun/xawt/Makefile 2013-06-23 17:54:05.000000000 +0200
  292. ++++ openjdk/jdk/make/sun/xawt/Makefile 2013-12-08 15:44:04.000000000 +0100
  293. +@@ -292,16 +292,10 @@
  294. + SIZERS = $(SIZER).32
  295. + SIZERS_C = $(SIZER_32_C)
  296. + SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32
  297. +-ifdef CROSS_COMPILE_ARCH
  298. +-CFLAGS_32 = -m32
  299. +-endif
  300. + else # !32
  301. + SIZERS = $(SIZER).64
  302. + SIZERS_C = $(SIZER_64_C)
  303. + SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.64
  304. +-ifdef CROSS_COMPILE_ARCH
  305. +-CFLAGS_64 = -m64
  306. +-endif
  307. + endif # 32
  308. + endif # !macosx
  309. + endif # solaris
  310. +@@ -337,11 +331,7 @@
  311. + WRAPPER_GENERATOR_CLASS=$(WRAPPER_GENERATOR_TEMPDIR)/WrapperGenerator.class
  312. + XLIBTYPES=$(PLATFORM_SRC)/classes/sun/awt/X11/generator/xlibtypes.txt
  313. +
  314. +-ifndef CROSS_COMPILE_ARCH
  315. +-SIZERS_CC = $(CC)
  316. +-else
  317. +-SIZERS_CC = $(HOST_CC)
  318. +-endif
  319. ++SIZERS_CC = $(CC) -static
  320. +
  321. + $(SIZERS): $(SIZERS_C)
  322. + $(prep-target)
  323. +@@ -364,7 +354,7 @@
  324. + $(CHMOD) +w $@;\
  325. + else \
  326. + $(ECHO) GENERATING $@; \
  327. +- $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \
  328. ++ $(QEMU) $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \
  329. + fi
  330. + @if [ "$(DOCOMPARE)$(suffix $@)" = "true.64" ]; then \
  331. + $(ECHO) COMPARING $@ and $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
  332. +diff -Nur openjdk.orig/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java openjdk/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java
  333. +--- openjdk.orig/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java 2013-06-23 17:54:05.000000000 +0200
  334. ++++ openjdk/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java 2013-12-08 15:44:04.000000000 +0100
  335. +@@ -69,7 +69,7 @@
  336. + */
  337. + static {
  338. + java.security.AccessController.doPrivileged(
  339. +- new sun.security.action.LoadLibraryAction("net"));
  340. ++ new sun.security.action.LoadLibraryAction("javanet"));
  341. + }
  342. +
  343. + /**
  344. +diff -Nur openjdk.orig/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java openjdk/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java
  345. +--- openjdk.orig/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java 2013-06-23 17:54:05.000000000 +0200
  346. ++++ openjdk/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java 2013-12-08 15:44:04.000000000 +0100
  347. +@@ -78,7 +78,7 @@
  348. + */
  349. + static {
  350. + java.security.AccessController.doPrivileged(
  351. +- new sun.security.action.LoadLibraryAction("net"));
  352. ++ new sun.security.action.LoadLibraryAction("javanet"));
  353. + }
  354. +
  355. + /**
  356. +diff -Nur openjdk.orig/jdk/src/share/classes/java/net/DatagramPacket.java openjdk/jdk/src/share/classes/java/net/DatagramPacket.java
  357. +--- openjdk.orig/jdk/src/share/classes/java/net/DatagramPacket.java 2013-06-23 17:54:05.000000000 +0200
  358. ++++ openjdk/jdk/src/share/classes/java/net/DatagramPacket.java 2013-12-08 15:44:04.000000000 +0100
  359. +@@ -47,7 +47,7 @@
  360. + */
  361. + static {
  362. + java.security.AccessController.doPrivileged(
  363. +- new sun.security.action.LoadLibraryAction("net"));
  364. ++ new sun.security.action.LoadLibraryAction("javanet"));
  365. + init();
  366. + }
  367. +
  368. +diff -Nur openjdk.orig/jdk/src/share/classes/java/net/InetAddress.java openjdk/jdk/src/share/classes/java/net/InetAddress.java
  369. +--- openjdk.orig/jdk/src/share/classes/java/net/InetAddress.java 2013-06-23 17:54:05.000000000 +0200
  370. ++++ openjdk/jdk/src/share/classes/java/net/InetAddress.java 2013-12-08 15:44:04.000000000 +0100
  371. +@@ -260,7 +260,7 @@
  372. + static {
  373. + preferIPv6Address = java.security.AccessController.doPrivileged(
  374. + new GetBooleanAction("java.net.preferIPv6Addresses")).booleanValue();
  375. +- AccessController.doPrivileged(new LoadLibraryAction("net"));
  376. ++ AccessController.doPrivileged(new LoadLibraryAction("javanet"));
  377. + init();
  378. + }
  379. +
  380. +diff -Nur openjdk.orig/jdk/src/share/classes/java/net/NetworkInterface.java openjdk/jdk/src/share/classes/java/net/NetworkInterface.java
  381. +--- openjdk.orig/jdk/src/share/classes/java/net/NetworkInterface.java 2013-06-23 17:54:05.000000000 +0200
  382. ++++ openjdk/jdk/src/share/classes/java/net/NetworkInterface.java 2013-12-08 15:44:04.000000000 +0100
  383. +@@ -53,7 +53,7 @@
  384. + private static final int defaultIndex; /* index of defaultInterface */
  385. +
  386. + static {
  387. +- AccessController.doPrivileged(new LoadLibraryAction("net"));
  388. ++ AccessController.doPrivileged(new LoadLibraryAction("javanet"));
  389. + init();
  390. + defaultInterface = DefaultInterface.getDefault();
  391. + if (defaultInterface != null) {
  392. +diff -Nur openjdk.orig/jdk/src/share/classes/sun/net/sdp/SdpSupport.java openjdk/jdk/src/share/classes/sun/net/sdp/SdpSupport.java
  393. +--- openjdk.orig/jdk/src/share/classes/sun/net/sdp/SdpSupport.java 2013-06-23 17:54:05.000000000 +0200
  394. ++++ openjdk/jdk/src/share/classes/sun/net/sdp/SdpSupport.java 2013-12-08 15:44:04.000000000 +0100
  395. +@@ -76,6 +76,6 @@
  396. +
  397. + static {
  398. + AccessController.doPrivileged(
  399. +- new sun.security.action.LoadLibraryAction("net"));
  400. ++ new sun.security.action.LoadLibraryAction("javanet"));
  401. + }
  402. + }
  403. +diff -Nur openjdk.orig/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java openjdk/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java
  404. +--- openjdk.orig/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java 2013-06-23 17:54:05.000000000 +0200
  405. ++++ openjdk/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java 2013-12-08 15:44:04.000000000 +0100
  406. +@@ -95,7 +95,7 @@
  407. + }});
  408. + if (b != null && b.booleanValue()) {
  409. + java.security.AccessController.doPrivileged(
  410. +- new sun.security.action.LoadLibraryAction("net"));
  411. ++ new sun.security.action.LoadLibraryAction("javanet"));
  412. + hasSystemProxies = init();
  413. + }
  414. + }
  415. +diff -Nur openjdk.orig/jdk/src/share/classes/sun/nio/ch/Util.java openjdk/jdk/src/share/classes/sun/nio/ch/Util.java
  416. +--- openjdk.orig/jdk/src/share/classes/sun/nio/ch/Util.java 2013-06-23 17:54:05.000000000 +0200
  417. ++++ openjdk/jdk/src/share/classes/sun/nio/ch/Util.java 2013-12-08 15:44:04.000000000 +0100
  418. +@@ -483,7 +483,7 @@
  419. + return;
  420. + loaded = true;
  421. + java.security.AccessController
  422. +- .doPrivileged(new sun.security.action.LoadLibraryAction("net"));
  423. ++ .doPrivileged(new sun.security.action.LoadLibraryAction("javanet"));
  424. + java.security.AccessController
  425. + .doPrivileged(new sun.security.action.LoadLibraryAction("nio"));
  426. + // IOUtil must be initialized; Its native methods are called from
  427. +diff -Nur openjdk.orig/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java openjdk/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java
  428. +--- openjdk.orig/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java 2013-06-23 17:54:05.000000000 +0200
  429. ++++ openjdk/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java 2013-12-08 15:44:04.000000000 +0100
  430. +@@ -247,7 +247,7 @@
  431. +
  432. + static {
  433. + java.security.AccessController.doPrivileged(
  434. +- new sun.security.action.LoadLibraryAction("net"));
  435. ++ new sun.security.action.LoadLibraryAction("javanet"));
  436. + }
  437. +
  438. + }
  439. +diff -Nur openjdk.orig/jdk/src/solaris/native/sun/awt/awt_InputMethod.c openjdk/jdk/src/solaris/native/sun/awt/awt_InputMethod.c
  440. +--- openjdk.orig/jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2013-06-23 17:54:05.000000000 +0200
  441. ++++ openjdk/jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2013-12-08 15:44:04.000000000 +0100
  442. +@@ -246,7 +246,8 @@
  443. + if (wcs == NULL)
  444. + return NULL;
  445. +
  446. +- n = len*MB_CUR_MAX + 1;
  447. ++ //evil hack for uclibc
  448. ++ n = len*1 + 1;
  449. +
  450. + mbs = (char *) malloc(n * sizeof(char));
  451. + if (mbs == NULL) {
  452. +diff -Nur openjdk.orig/jdk/src/solaris/native/sun/xawt/XToolkit.c openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c
  453. +--- openjdk.orig/jdk/src/solaris/native/sun/xawt/XToolkit.c 2013-06-23 17:54:05.000000000 +0200
  454. ++++ openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c 2013-12-08 15:44:04.000000000 +0100
  455. +@@ -27,9 +27,6 @@
  456. + #include <X11/Xutil.h>
  457. + #include <X11/Xos.h>
  458. + #include <X11/Xatom.h>
  459. +-#ifdef __linux__
  460. +-#include <execinfo.h>
  461. +-#endif
  462. +
  463. + #include <jvm.h>
  464. + #include <jni.h>
  465. +@@ -785,25 +782,6 @@
  466. + return ret;
  467. + }
  468. +
  469. +-#ifdef __linux__
  470. +-void print_stack(void)
  471. +-{
  472. +- void *array[10];
  473. +- size_t size;
  474. +- char **strings;
  475. +- size_t i;
  476. +-
  477. +- size = backtrace (array, 10);
  478. +- strings = backtrace_symbols (array, size);
  479. +-
  480. +- fprintf (stderr, "Obtained %zd stack frames.\n", size);
  481. +-
  482. +- for (i = 0; i < size; i++)
  483. +- fprintf (stderr, "%s\n", strings[i]);
  484. +-
  485. +- free (strings);
  486. +-}
  487. +-#endif
  488. +
  489. + Window get_xawt_root_shell(JNIEnv *env) {
  490. + static jclass classXRootWindow = NULL;
  491. +diff -Nur openjdk.orig/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java openjdk/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java
  492. +--- openjdk.orig/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java 2013-06-23 17:54:05.000000000 +0200
  493. ++++ openjdk/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java 2013-12-08 15:44:04.000000000 +0100
  494. +@@ -159,7 +159,7 @@
  495. +
  496. + static {
  497. + java.security.AccessController.doPrivileged(
  498. +- new sun.security.action.LoadLibraryAction("net"));
  499. ++ new sun.security.action.LoadLibraryAction("javanet"));
  500. + init0();
  501. +
  502. + // start the address listener thread
  503. +diff -Nur openjdk.orig/Makefile openjdk/Makefile
  504. +--- openjdk.orig/Makefile 2013-06-23 17:53:43.000000000 +0200
  505. ++++ openjdk/Makefile 2013-12-08 15:44:04.000000000 +0100
  506. +@@ -53,9 +53,7 @@
  507. + REL_JDK_DEBUG_IMAGE_DIR = ../$(OUTPUTDIR_BASENAME-debug)/$(JDK_IMAGE_DIRNAME)
  508. + REL_JDK_FASTDEBUG_IMAGE_DIR = ../$(OUTPUTDIR_BASENAME-fastdebug)/$(JDK_IMAGE_DIRNAME)
  509. +
  510. +-ifndef TOPDIR
  511. +- TOPDIR:=.
  512. +-endif
  513. ++TOPDIR:=.
  514. +
  515. + ifndef JDK_TOPDIR
  516. + JDK_TOPDIR=$(TOPDIR)/jdk