summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mk/vars.mk25
-rw-r--r--package/openjdk7/Makefile21
-rw-r--r--package/openjdk7/patches/openadk.patch69
-rw-r--r--package/qemu/Makefile32
-rw-r--r--toolchain/uClibc/patches/0.9.33.2/origin.patch174
5 files changed, 255 insertions, 66 deletions
diff --git a/mk/vars.mk b/mk/vars.mk
index e7a130e8c..9cc789004 100644
--- a/mk/vars.mk
+++ b/mk/vars.mk
@@ -54,31 +54,6 @@ else
GCC_CHECK:=
endif
-ifeq ($(CPU_ARCH),arm)
-QEMU:= qemu-arm
-endif
-ifeq ($(CPU_ARCH),mipsel)
-QEMU:= qemu-mipsel
-endif
-ifeq ($(CPU_ARCH),mips64el)
-QEMU:= qemu-mipsel
-endif
-ifeq ($(CPU_ARCH),mips)
-QEMU:= qemu-mips
-endif
-ifeq ($(CPU_ARCH),i486)
-QEMU:= qemu-i386
-endif
-ifeq ($(CPU_ARCH),i586)
-QEMU:= qemu-i386
-endif
-ifeq ($(CPU_ARCH),i686)
-QEMU:= qemu-i386
-endif
-ifeq ($(CPU_ARCH),x86_64)
-QEMU:= qemu-x86_64
-endif
-
ifeq ($(ADK_NATIVE),y)
TARGET_CROSS:=
TARGET_COMPILER_PREFIX?=
diff --git a/package/openjdk7/Makefile b/package/openjdk7/Makefile
index d3b630c83..d51a80d8b 100644
--- a/package/openjdk7/Makefile
+++ b/package/openjdk7/Makefile
@@ -9,7 +9,8 @@ PKG_RELEASE:= 1
PKG_MD5SUM:= e96e5e578d442d3ae56cd332e8dbc6b6
PKG_DESCR:= OpenJDK 7 Java VM
PKG_SECTION:= lang
-PKG_BUILDDEP:= alsa-lib xproto jpeg zlib giflib libpng freetype cups
+PKG_BUILDDEP:= gettext-tiny-host glib-host flex-host bison-host qemu-host
+PKG_BUILDDEP+= alsa-lib xproto jpeg zlib giflib libpng freetype cups
PKG_BUILDDEP+= libX11 libXt libXp libXinerama libXrender libXtst libiconv-tiny
PKG_DEPENDS:= zlib libstdcxx libffi libpthread libxtst libxi libgcc
PKG_URL:= http://openjdk.org/
@@ -18,8 +19,8 @@ PKG_SITES:= http://icedtea.classpath.org/download/source/
DISTFILES:= icedtea-$(PKG_VERSION).tar.gz
WRKDIST= ${WRKDIR}/icedtea-${PKG_VERSION}
-PKG_HOST_DEPENDS:= !darwin !cygwin !openbsd !netbsd !freebsd
-PKG_ARCH_DEPENDS:= arm mips x86 x86_64
+PKG_HOST_DEPENDS:= linux
+PKG_ARCH_DEPENDS:= arm mips ppc sparc x86 x86_64
PKG_SYSTEM_DEPENDS:= !linksys-ag241 !fon-fon2100 !broadcom-bcm47xx !lemote-yeelong
PKG_SUBPKGS:= OPENJDK7
@@ -30,6 +31,7 @@ PKGCB_SHARK:= llvm
PKGCD_CACAO:= Cacao JIT backend
include $(TOPDIR)/mk/package.mk
+include $(TOPDIR)/mk/qemu.mk
$(eval $(call PKG_template,OPENJDK7,openjdk7,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
@@ -41,7 +43,7 @@ TARGET_CFLAGS:= $(subst march=atom,march=i686,$(TARGET_CFLAGS))
TARGET_CFLAGS:= $(filter-out -fhonour-copts,$(TARGET_CFLAGS))
BOOTSTRAPJDK:= ${STAGING_JAVA_HOST_DIR}/bootstrap-jdk
-JDKARCH:= $(ARCH)
+JDKARCH:= $(CPU_ARCH)
ifeq ($(ARCH),x86)
JDKARCH:= i386
endif
@@ -85,7 +87,7 @@ CONFIGURE_ARGS+= $(CONFIGURE_BACKEND)
CONFIGURE_ARGS+= $(CONFIGURE_COMMON)
CONFIGURE_ARGS+= --disable-bootstrap
-CONFIGURE_ENV+= PATH=$(STAGING_JAVA_HOST_DIR)/usr/bin:$${PATH}:${STAGING_TARGET_DIR}/usr/bin
+CONFIGURE_ENV+= PATH="$(STAGING_JAVA_HOST_DIR)/usr/bin:$${PATH}"
MAKE_ENV+= ALT_COMPILER_PATH=$(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME) \
ALT_OPENWIN_HOME=$(STAGING_DIR)/usr/ \
ALT_CUPS_HEADERS_PATH=$(STAGING_DIR)/usr/include/ \
@@ -97,8 +99,11 @@ MAKE_ENV+= ALT_COMPILER_PATH=$(STAGING_HOST_DIR)/$(REAL_GNU_TARGET_NAME) \
ALL_TARGET:= icedtea
openjdk7-install:
- $(INSTALL_DIR) $(IDIR_OPENJDK7)/usr
- $(CP) $(WRKBUILD)/openjdk.build/j2re-image/* $(IDIR_OPENJDK7)/usr
- rm -rf $(IDIR_OPENJDK7)/usr/man
+ $(INSTALL_DIR) $(IDIR_OPENJDK7)/usr/lib/jvm/jre
+ $(INSTALL_DIR) $(IDIR_OPENJDK7)/usr/bin
+ $(CP) $(WRKBUILD)/openjdk.build/j2re-image/bin $(IDIR_OPENJDK7)/usr/lib/jvm/jre
+ $(CP) $(WRKBUILD)/openjdk.build/j2re-image/lib $(IDIR_OPENJDK7)/usr/lib/jvm/jre
+ (cd $(IDIR_OPENJDK7)/usr/bin && ln -sf ../lib/jvm/jre/bin/java .)
+ (cd $(IDIR_OPENJDK7)/usr/lib/jvm/jre/lib/$(JDKARCH) && ln -sf server/libjvm.so .)
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/openjdk7/patches/openadk.patch b/package/openjdk7/patches/openadk.patch
index cc6d69dbd..25e979fce 100644
--- a/package/openjdk7/patches/openadk.patch
+++ b/package/openjdk7/patches/openadk.patch
@@ -1,6 +1,6 @@
diff -Nur icedtea-2.3.9.orig/Makefile.in icedtea-2.3.9/Makefile.in
--- icedtea-2.3.9.orig/Makefile.in 2013-04-21 22:48:31.000000000 +0200
-+++ icedtea-2.3.9/Makefile.in 2013-07-18 16:10:01.000000000 +0200
++++ icedtea-2.3.9/Makefile.in 2013-11-15 12:28:32.000000000 +0100
@@ -90,7 +90,6 @@
@WITH_ALT_HSBUILD_TRUE@ patches/hotspot/$(HSBUILD)/7089790-bsd_port.patch \
@WITH_ALT_HSBUILD_TRUE@ patches/hotspot/$(HSBUILD)/7098194-macosx_port.patch \
@@ -29,11 +29,11 @@ diff -Nur icedtea-2.3.9.orig/Makefile.in icedtea-2.3.9/Makefile.in
diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk.patch
--- icedtea-2.3.9.orig/patches/openadk.patch 1970-01-01 01:00:00.000000000 +0100
-+++ icedtea-2.3.9/patches/openadk.patch 2013-07-18 16:25:18.000000000 +0200
-@@ -0,0 +1,482 @@
++++ icedtea-2.3.9/patches/openadk.patch 2013-11-15 13:52:27.000000000 +0100
+@@ -0,0 +1,493 @@
+diff -Nur openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp 2013-03-15 17:33:37.000000000 +0100
-++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2013-07-18 16:17:07.000000000 +0200
+++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2013-11-15 13:51:09.000000000 +0100
+@@ -115,7 +115,6 @@
+ # include <string.h>
+ # include <syscall.h>
@@ -90,7 +90,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+ void os::pause() {
+diff -Nur openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp
+--- openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2013-03-15 17:33:37.000000000 +0100
-++++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2013-07-18 16:17:07.000000000 +0200
+++++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2013-11-15 13:51:57.000000000 +0100
+@@ -253,7 +253,7 @@
+ #elif defined(__APPLE__)
+ inline int g_isnan(double f) { return isnan(f); }
@@ -100,9 +100,20 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+ inline int g_isnan(double f) { return isnan(f); }
+ #else
+ #error "missing platform-specific definition here"
++@@ -267,8 +267,8 @@
++
++ // Checking for finiteness
++
++-inline int g_isfinite(jfloat f) { return finite(f); }
++-inline int g_isfinite(jdouble f) { return finite(f); }
+++inline int g_isfinite(jfloat f) { return isfinite(f); }
+++inline int g_isfinite(jdouble f) { return isfinite(f); }
++
++
++ // Wide characters
+diff -Nur openjdk.orig/jdk/make/com/sun/java/pack/Makefile openjdk/jdk/make/com/sun/java/pack/Makefile
+--- openjdk.orig/jdk/make/com/sun/java/pack/Makefile 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/make/com/sun/java/pack/Makefile 2013-07-18 16:17:07.000000000 +0200
+++++ openjdk/jdk/make/com/sun/java/pack/Makefile 2013-11-15 13:51:09.000000000 +0100
+@@ -80,7 +80,7 @@
+ LDDFLAGS += $(ZIPOBJS)
+ endif
@@ -114,7 +125,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+
+diff -Nur openjdk.orig/jdk/make/com/sun/nio/sctp/Makefile openjdk/jdk/make/com/sun/nio/sctp/Makefile
+--- openjdk.orig/jdk/make/com/sun/nio/sctp/Makefile 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/make/com/sun/nio/sctp/Makefile 2013-07-18 16:24:59.000000000 +0200
+++++ openjdk/jdk/make/com/sun/nio/sctp/Makefile 2013-11-15 13:51:09.000000000 +0100
+@@ -64,7 +64,7 @@
+ COMPILER_WARNINGS_FATAL=true
+ endif
@@ -126,7 +137,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+ #LIBSCTP = -lsctp
+diff -Nur openjdk.orig/jdk/make/common/Defs.gmk openjdk/jdk/make/common/Defs.gmk
+--- openjdk.orig/jdk/make/common/Defs.gmk 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/make/common/Defs.gmk 2013-07-18 16:17:07.000000000 +0200
+++++ openjdk/jdk/make/common/Defs.gmk 2013-11-15 13:51:09.000000000 +0100
+@@ -204,7 +204,7 @@
+ ifeq ($(PLATFORM), macosx)
+ FREETYPE_HEADERS_PATH = /usr/X11R6/include
@@ -138,7 +149,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+ endif
+diff -Nur openjdk.orig/jdk/make/common/shared/Platform.gmk openjdk/jdk/make/common/shared/Platform.gmk
+--- openjdk.orig/jdk/make/common/shared/Platform.gmk 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/make/common/shared/Platform.gmk 2013-07-18 16:17:07.000000000 +0200
+++++ openjdk/jdk/make/common/shared/Platform.gmk 2013-11-15 13:51:09.000000000 +0100
+@@ -160,9 +160,6 @@
+ else
+ mach := $(shell uname -m)
@@ -151,7 +162,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+ echo i586 \
+diff -Nur openjdk.orig/jdk/make/java/instrument/Makefile openjdk/jdk/make/java/instrument/Makefile
+--- openjdk.orig/jdk/make/java/instrument/Makefile 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/make/java/instrument/Makefile 2013-07-18 16:17:07.000000000 +0200
+++++ openjdk/jdk/make/java/instrument/Makefile 2013-11-15 13:51:09.000000000 +0100
+@@ -140,6 +140,8 @@
+ # We don't want to link against -ljava
+ JAVALIB=
@@ -163,7 +174,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+ #
+diff -Nur openjdk.orig/jdk/make/java/net/Makefile openjdk/jdk/make/java/net/Makefile
+--- openjdk.orig/jdk/make/java/net/Makefile 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/make/java/net/Makefile 2013-07-18 16:17:53.000000000 +0200
+++++ openjdk/jdk/make/java/net/Makefile 2013-11-15 13:51:09.000000000 +0100
+@@ -25,7 +25,7 @@
+
+ BUILDDIR = ../..
@@ -175,7 +186,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+
+diff -Nur openjdk.orig/jdk/make/java/nio/Makefile openjdk/jdk/make/java/nio/Makefile
+--- openjdk.orig/jdk/make/java/nio/Makefile 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/make/java/nio/Makefile 2013-07-18 16:24:27.000000000 +0200
+++++ openjdk/jdk/make/java/nio/Makefile 2013-11-15 13:51:09.000000000 +0100
+@@ -369,7 +369,7 @@
+ endif
+
@@ -205,7 +216,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+ $(SFS_GEN)/UnixConstants.java: $(NIO_PLATFORM_CLASSES_ROOT_DIR)/sun/nio/fs/UnixConstants-$(PLATFORM)-$(ARCH).java
+diff -Nur openjdk.orig/jdk/make/java/npt/Makefile openjdk/jdk/make/java/npt/Makefile
+--- openjdk.orig/jdk/make/java/npt/Makefile 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/make/java/npt/Makefile 2013-07-18 16:17:07.000000000 +0200
+++++ openjdk/jdk/make/java/npt/Makefile 2013-11-15 13:51:09.000000000 +0100
+@@ -64,6 +64,8 @@
+ # We don't want to link against -ljava
+ JAVALIB=
@@ -217,7 +228,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+ OTHER_LCF += -export:nptInitialize -export:nptTerminate
+diff -Nur openjdk.orig/jdk/make/sun/awt/mawt.gmk openjdk/jdk/make/sun/awt/mawt.gmk
+--- openjdk.orig/jdk/make/sun/awt/mawt.gmk 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/make/sun/awt/mawt.gmk 2013-07-18 16:17:07.000000000 +0200
+++++ openjdk/jdk/make/sun/awt/mawt.gmk 2013-11-15 13:51:09.000000000 +0100
+@@ -151,22 +151,6 @@
+ #endif
+
@@ -276,7 +287,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+ CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \
+diff -Nur openjdk.orig/jdk/make/sun/splashscreen/Makefile openjdk/jdk/make/sun/splashscreen/Makefile
+--- openjdk.orig/jdk/make/sun/splashscreen/Makefile 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/make/sun/splashscreen/Makefile 2013-07-18 16:17:07.000000000 +0200
+++++ openjdk/jdk/make/sun/splashscreen/Makefile 2013-11-15 13:51:09.000000000 +0100
+@@ -55,6 +55,8 @@
+
+ JAVALIB=
@@ -288,7 +299,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+ #
+diff -Nur openjdk.orig/jdk/make/sun/xawt/Makefile openjdk/jdk/make/sun/xawt/Makefile
+--- openjdk.orig/jdk/make/sun/xawt/Makefile 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/make/sun/xawt/Makefile 2013-07-18 16:17:07.000000000 +0200
+++++ openjdk/jdk/make/sun/xawt/Makefile 2013-11-15 13:51:09.000000000 +0100
+@@ -292,16 +292,10 @@
+ SIZERS = $(SIZER).32
+ SIZERS_C = $(SIZER_32_C)
@@ -330,7 +341,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+ $(ECHO) COMPARING $@ and $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \
+diff -Nur openjdk.orig/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java openjdk/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java
+--- openjdk.orig/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java 2013-07-18 16:18:23.000000000 +0200
+++++ openjdk/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java 2013-11-15 13:51:09.000000000 +0100
+@@ -69,7 +69,7 @@
+ */
+ static {
@@ -342,7 +353,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+ /**
+diff -Nur openjdk.orig/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java openjdk/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java
+--- openjdk.orig/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java 2013-07-18 16:18:54.000000000 +0200
+++++ openjdk/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java 2013-11-15 13:51:09.000000000 +0100
+@@ -78,7 +78,7 @@
+ */
+ static {
@@ -354,7 +365,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+ /**
+diff -Nur openjdk.orig/jdk/src/share/classes/java/net/DatagramPacket.java openjdk/jdk/src/share/classes/java/net/DatagramPacket.java
+--- openjdk.orig/jdk/src/share/classes/java/net/DatagramPacket.java 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/src/share/classes/java/net/DatagramPacket.java 2013-07-18 16:19:15.000000000 +0200
+++++ openjdk/jdk/src/share/classes/java/net/DatagramPacket.java 2013-11-15 13:51:09.000000000 +0100
+@@ -47,7 +47,7 @@
+ */
+ static {
@@ -366,7 +377,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+
+diff -Nur openjdk.orig/jdk/src/share/classes/java/net/InetAddress.java openjdk/jdk/src/share/classes/java/net/InetAddress.java
+--- openjdk.orig/jdk/src/share/classes/java/net/InetAddress.java 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/src/share/classes/java/net/InetAddress.java 2013-07-18 16:20:11.000000000 +0200
+++++ openjdk/jdk/src/share/classes/java/net/InetAddress.java 2013-11-15 13:51:09.000000000 +0100
+@@ -260,7 +260,7 @@
+ static {
+ preferIPv6Address = java.security.AccessController.doPrivileged(
@@ -378,7 +389,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+
+diff -Nur openjdk.orig/jdk/src/share/classes/java/net/NetworkInterface.java openjdk/jdk/src/share/classes/java/net/NetworkInterface.java
+--- openjdk.orig/jdk/src/share/classes/java/net/NetworkInterface.java 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/src/share/classes/java/net/NetworkInterface.java 2013-07-18 16:20:27.000000000 +0200
+++++ openjdk/jdk/src/share/classes/java/net/NetworkInterface.java 2013-11-15 13:51:09.000000000 +0100
+@@ -53,7 +53,7 @@
+ private static final int defaultIndex; /* index of defaultInterface */
+
@@ -390,7 +401,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+ if (defaultInterface != null) {
+diff -Nur openjdk.orig/jdk/src/share/classes/sun/net/sdp/SdpSupport.java openjdk/jdk/src/share/classes/sun/net/sdp/SdpSupport.java
+--- openjdk.orig/jdk/src/share/classes/sun/net/sdp/SdpSupport.java 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/src/share/classes/sun/net/sdp/SdpSupport.java 2013-07-18 16:22:51.000000000 +0200
+++++ openjdk/jdk/src/share/classes/sun/net/sdp/SdpSupport.java 2013-11-15 13:51:09.000000000 +0100
+@@ -76,6 +76,6 @@
+
+ static {
@@ -401,7 +412,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+ }
+diff -Nur openjdk.orig/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java openjdk/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java
+--- openjdk.orig/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java 2013-07-18 16:20:51.000000000 +0200
+++++ openjdk/jdk/src/share/classes/sun/net/spi/DefaultProxySelector.java 2013-11-15 13:51:09.000000000 +0100
+@@ -95,7 +95,7 @@
+ }});
+ if (b != null && b.booleanValue()) {
@@ -413,7 +424,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+ }
+diff -Nur openjdk.orig/jdk/src/share/classes/sun/nio/ch/Util.java openjdk/jdk/src/share/classes/sun/nio/ch/Util.java
+--- openjdk.orig/jdk/src/share/classes/sun/nio/ch/Util.java 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/src/share/classes/sun/nio/ch/Util.java 2013-07-18 16:21:22.000000000 +0200
+++++ openjdk/jdk/src/share/classes/sun/nio/ch/Util.java 2013-11-15 13:51:09.000000000 +0100
+@@ -483,7 +483,7 @@
+ return;
+ loaded = true;
@@ -425,7 +436,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+ // IOUtil must be initialized; Its native methods are called from
+diff -Nur openjdk.orig/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java openjdk/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java
+--- openjdk.orig/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java 2013-07-18 16:23:37.000000000 +0200
+++++ openjdk/jdk/src/solaris/classes/sun/net/dns/ResolverConfigurationImpl.java 2013-11-15 13:51:09.000000000 +0100
+@@ -247,7 +247,7 @@
+
+ static {
@@ -437,7 +448,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+ }
+diff -Nur openjdk.orig/jdk/src/solaris/native/sun/awt/awt_InputMethod.c openjdk/jdk/src/solaris/native/sun/awt/awt_InputMethod.c
+--- openjdk.orig/jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2013-07-18 16:17:07.000000000 +0200
+++++ openjdk/jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2013-11-15 13:51:09.000000000 +0100
+@@ -246,7 +246,8 @@
+ if (wcs == NULL)
+ return NULL;
@@ -450,7 +461,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+ if (mbs == NULL) {
+diff -Nur openjdk.orig/jdk/src/solaris/native/sun/xawt/XToolkit.c openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c
+--- openjdk.orig/jdk/src/solaris/native/sun/xawt/XToolkit.c 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c 2013-07-18 16:17:07.000000000 +0200
+++++ openjdk/jdk/src/solaris/native/sun/xawt/XToolkit.c 2013-11-15 13:51:09.000000000 +0100
+@@ -27,9 +27,6 @@
+ #include <X11/Xutil.h>
+ #include <X11/Xos.h>
@@ -489,7 +500,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+ static jclass classXRootWindow = NULL;
+diff -Nur openjdk.orig/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java openjdk/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java
+--- openjdk.orig/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java 2013-04-16 00:41:13.000000000 +0200
-++++ openjdk/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java 2013-07-18 16:23:50.000000000 +0200
+++++ openjdk/jdk/src/windows/classes/sun/net/dns/ResolverConfigurationImpl.java 2013-11-15 13:51:09.000000000 +0100
+@@ -159,7 +159,7 @@
+
+ static {
@@ -501,7 +512,7 @@ diff -Nur icedtea-2.3.9.orig/patches/openadk.patch icedtea-2.3.9/patches/openadk
+ // start the address listener thread
+diff -Nur openjdk.orig/Makefile openjdk/Makefile
+--- openjdk.orig/Makefile 2013-03-08 17:04:19.000000000 +0100
-++++ openjdk/Makefile 2013-07-18 16:17:07.000000000 +0200
+++++ openjdk/Makefile 2013-11-15 13:51:09.000000000 +0100
+@@ -53,9 +53,7 @@
+ REL_JDK_DEBUG_IMAGE_DIR = ../$(OUTPUTDIR_BASENAME-debug)/$(JDK_IMAGE_DIRNAME)
+ REL_JDK_FASTDEBUG_IMAGE_DIR = ../$(OUTPUTDIR_BASENAME-fastdebug)/$(JDK_IMAGE_DIRNAME)
diff --git a/package/qemu/Makefile b/package/qemu/Makefile
index b46c8ecde..48cb6e82b 100644
--- a/package/qemu/Makefile
+++ b/package/qemu/Makefile
@@ -4,13 +4,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:= qemu
-PKG_VERSION:= 1.3.0
+PKG_VERSION:= 1.6.1
PKG_RELEASE:= 1
-PKG_MD5SUM:= a4030ddd2ba324152a97d65d3c0b247d
+PKG_MD5SUM:= 3a897d722457c5a895cd6ac79a28fda0
PKG_DESCR:= cpu and system emulator
PKG_SECTION:= misc
PKG_DEPENDS:= zlib libsdl libpng
-PKG_BUILDDEP:= zlib sdl libpng
+PKG_BUILDDEP:= glib-host qemu-host zlib sdl libpng
PKG_URL:= http://wwww.qemu.org/
PKG_SITES:= http://wiki.qemu.org/download/
@@ -18,18 +18,41 @@ DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2
PKG_ARCH_DEPENDS:= native x86 x86_64
+include $(TOPDIR)/mk/host.mk
include $(TOPDIR)/mk/package.mk
+$(eval $(call HOST_template,QEMU,qemu,$(PKG_VERSION)-${PKG_RELEASE}))
$(eval $(call PKG_template,QEMU,qemu,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
+TARGET_LDFLAGS+= -pthread -lm -lrt
CONFIG_STYLE:= minimal
CONFIGURE_ARGS+= --host-cc=$(CC_FOR_BUILD) \
--prefix=/usr \
--sysconfdir=/etc \
--enable-kvm \
+ --disable-docs \
--bindir=/usr/bin
-TARGET_LDFLAGS+= -pthread -lm -lrt
+
+HOST_STYLE:= manual
+HOST_CONFIGURE_ARGS+= --host-cc=$(CC_FOR_BUILD) \
+ --disable-docs \
+ --disable-system \
+ --disable-sdl
+
+host-configure:
+ cd ${WRKBUILD}; rm -f config.{cache,status}; \
+ env ${HOST_CONFIGURE_ENV} \
+ ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
+ ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
+
+host-build:
+ cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
+ ${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE)
+
+qemu-hostinstall:
+ cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
+ DESTDIR='$(STAGING_HOST_DIR)' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
qemu-install:
$(INSTALL_DIR) $(IDIR_QEMU)/usr/share/qemu
@@ -39,4 +62,5 @@ qemu-install:
$(CP) $(WRKINST)/usr/share/qemu/* \
$(IDIR_QEMU)/usr/share/qemu
+include ${TOPDIR}/mk/host-bottom.mk
include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/toolchain/uClibc/patches/0.9.33.2/origin.patch b/toolchain/uClibc/patches/0.9.33.2/origin.patch
new file mode 100644
index 000000000..c0949326a
--- /dev/null
+++ b/toolchain/uClibc/patches/0.9.33.2/origin.patch
@@ -0,0 +1,174 @@
+diff -Nur uClibc-0.9.33.2.orig/ldso/ldso/dl-elf.c uClibc-0.9.33.2/ldso/ldso/dl-elf.c
+--- uClibc-0.9.33.2.orig/ldso/ldso/dl-elf.c 2012-05-15 09:20:09.000000000 +0200
++++ uClibc-0.9.33.2/ldso/ldso/dl-elf.c 2013-11-15 16:04:24.000000000 +0100
+@@ -133,53 +133,59 @@
+ * in uClibc/ldso/util/ldd.c */
+ static struct elf_resolve *
+ search_for_named_library(const char *name, unsigned rflags, const char *path_list,
+- struct dyn_elf **rpnt)
++ struct dyn_elf **rpnt, const char *origin)
+ {
+- char *path, *path_n, *mylibname;
++ char *mylibname;
++ const char *p, *pn;
+ struct elf_resolve *tpnt;
+- int done;
++ int plen;
+
+ if (path_list==NULL)
+ return NULL;
+
+- /* We need a writable copy of this string, but we don't
+- * need this allocated permanently since we don't want
+- * to leak memory, so use alloca to put path on the stack */
+- done = _dl_strlen(path_list);
+- path = alloca(done + 1);
+-
+ /* another bit of local storage */
+ mylibname = alloca(2050);
+
+- _dl_memcpy(path, path_list, done+1);
+-
+ /* Unlike ldd.c, don't bother to eliminate double //s */
+
+ /* Replace colons with zeros in path_list */
+ /* : at the beginning or end of path maps to CWD */
+ /* :: anywhere maps CWD */
+ /* "" maps to CWD */
+- done = 0;
+- path_n = path;
+- do {
+- if (*path == 0) {
+- *path = ':';
+- done = 1;
++ for (p = path_list; p != NULL; p = pn) {
++ pn = _dl_strchr(p + 1, ':');
++ if (pn != NULL) {
++ plen = pn - p;
++ pn++;
++ } else
++ plen = _dl_strlen(p);
++
++ if (plen >= 7 && _dl_memcmp(p, "$ORIGIN", 7) == 0) {
++ int olen;
++ if (rflags && plen != 7)
++ continue;
++ if (origin == NULL)
++ continue;
++ for (olen = _dl_strlen(origin) - 1; olen >= 0 && origin[olen] != '/'; olen--)
++ ;
++ if (olen <= 0)
++ continue;
++ _dl_memcpy(&mylibname[0], origin, olen);
++ _dl_memcpy(&mylibname[olen], p + 7, plen - 7);
++ mylibname[olen + plen - 7] = 0;
++ } else if (plen != 0) {
++ _dl_memcpy(mylibname, p, plen);
++ mylibname[plen] = 0;
++ } else {
++ _dl_strcpy(mylibname, ".");
+ }
+- if (*path == ':') {
+- *path = 0;
+- if (*path_n)
+- _dl_strcpy(mylibname, path_n);
+- else
+- _dl_strcpy(mylibname, "."); /* Assume current dir if empty path */
+- _dl_strcat(mylibname, "/");
+- _dl_strcat(mylibname, name);
+- if ((tpnt = _dl_load_elf_shared_library(rflags, rpnt, mylibname)) != NULL)
+- return tpnt;
+- path_n = path+1;
+- }
+- path++;
+- } while (!done);
++ _dl_strcat(mylibname, "/");
++ _dl_strcat(mylibname, name);
++
++ tpnt = _dl_load_elf_shared_library(rflags, rpnt, mylibname);
++ if (tpnt != NULL)
++ return tpnt;
++ }
+ return NULL;
+ }
+
+@@ -231,7 +237,7 @@
+ if (pnt) {
+ pnt += (unsigned long) tpnt->dynamic_info[DT_STRTAB];
+ _dl_if_debug_dprint("\tsearching RPATH='%s'\n", pnt);
+- if ((tpnt1 = search_for_named_library(libname, rflags, pnt, rpnt)) != NULL)
++ if ((tpnt1 = search_for_named_library(libname, rflags, pnt, rpnt, tpnt->libname)) != NULL)
+ return tpnt1;
+ }
+ #endif
+@@ -240,7 +246,7 @@
+ /* Check in LD_{ELF_}LIBRARY_PATH, if specified and allowed */
+ if (_dl_library_path) {
+ _dl_if_debug_dprint("\tsearching LD_LIBRARY_PATH='%s'\n", _dl_library_path);
+- if ((tpnt1 = search_for_named_library(libname, rflags, _dl_library_path, rpnt)) != NULL)
++ if ((tpnt1 = search_for_named_library(libname, rflags, _dl_library_path, rpnt, NULL)) != NULL)
+ {
+ return tpnt1;
+ }
+@@ -254,7 +260,7 @@
+ if (pnt) {
+ pnt += (unsigned long) tpnt->dynamic_info[DT_STRTAB];
+ _dl_if_debug_dprint("\tsearching RUNPATH='%s'\n", pnt);
+- if ((tpnt1 = search_for_named_library(libname, rflags, pnt, rpnt)) != NULL)
++ if ((tpnt1 = search_for_named_library(libname, rflags, pnt, rpnt, NULL)) != NULL)
+ return tpnt1;
+ }
+ #endif
+@@ -288,7 +294,7 @@
+ /* Look for libraries wherever the shared library loader
+ * was installed */
+ _dl_if_debug_dprint("\tsearching ldso dir='%s'\n", _dl_ldsopath);
+- tpnt1 = search_for_named_library(libname, rflags, _dl_ldsopath, rpnt);
++ tpnt1 = search_for_named_library(libname, rflags, _dl_ldsopath, rpnt, NULL);
+ if (tpnt1 != NULL)
+ return tpnt1;
+ #endif
+@@ -301,7 +307,7 @@
+ #ifndef __LDSO_CACHE_SUPPORT__
+ ":" UCLIBC_RUNTIME_PREFIX "usr/X11R6/lib"
+ #endif
+- , rpnt);
++ , rpnt, NULL);
+ if (tpnt1 != NULL)
+ return tpnt1;
+
+diff -Nur uClibc-0.9.33.2.orig/ldso/ldso/ldso.c uClibc-0.9.33.2/ldso/ldso/ldso.c
+--- uClibc-0.9.33.2.orig/ldso/ldso/ldso.c 2012-05-15 09:20:09.000000000 +0200
++++ uClibc-0.9.33.2/ldso/ldso/ldso.c 2013-11-15 15:49:00.000000000 +0100
+@@ -409,6 +409,20 @@
+ return p - list;
+ }
+
++static void _dl_setup_progname(const char *argv0)
++{
++ char image[PATH_MAX];
++ ssize_t s;
++
++ s = _dl_readlink("/proc/self/exe", image, sizeof(image));
++ if (s > 0 && image[0] == '/') {
++ image[s] = 0;
++ _dl_progname = _dl_strdup(image);
++ } else if (argv0) {
++ _dl_progname = argv0;
++ }
++}
++
+ void *_dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr,
+ ElfW(auxv_t) auxvt[AT_EGID + 1], char **envp, char **argv
+ DL_GET_READY_TO_RUN_EXTRA_PARMS)
+@@ -460,9 +474,7 @@
+ * been fixed up by now. Still no function calls outside of this
+ * library, since the dynamic resolver is not yet ready.
+ */
+- if (argv[0]) {
+- _dl_progname = argv[0];
+- }
++ _dl_setup_progname(argv[0]);
+
+ #ifndef __LDSO_STANDALONE_SUPPORT__
+ if (_start == (void *) auxvt[AT_ENTRY].a_un.a_val) {