diff -Nur icedtea-2.3.4.orig/Makefile.in icedtea-2.3.4/Makefile.in
--- icedtea-2.3.4.orig/Makefile.in	2013-01-15 10:44:02.000000000 +0100
+++ icedtea-2.3.4/Makefile.in	2013-02-11 17:32:45.000000000 +0100
@@ -640,7 +640,7 @@
 	$(am__append_14) $(am__append_15) $(DISTRIBUTION_PATCHES)
 
 # Bootstrapping patches
-ICEDTEA_BOOT_PATCHES = patches/boot/javafiles.patch \
+ICEDTEA_BOOT_PATCHES = patches/topdir-openwrt.patch patches/boot/javafiles.patch \
 	patches/boot/ant-javac.patch patches/boot/corba-idlj.patch \
 	patches/boot/corba-no-gen.patch patches/boot/corba-orb.patch \
 	patches/boot/demos.patch patches/boot/ecj-fphexconstants.patch \
@@ -2033,7 +2033,7 @@
 # Optional native ecj
 stamps/native-ecj.stamp:
 	mkdir -p stamps 
-@BUILD_NATIVE_ECJ_TRUE@	${GCJ} $(IT_CFLAGS) -Wl,-Bsymbolic -findirect-dispatch -o native-ecj \
+@BUILD_NATIVE_ECJ_TRUE@	${GCJ} -lgcj $(IT_CFLAGS) -Wl,-Bsymbolic -findirect-dispatch -o native-ecj \
 @BUILD_NATIVE_ECJ_TRUE@	    --main=org.eclipse.jdt.internal.compiler.batch.Main ${ECJ_JAR}
 	touch $@
 
diff -Nur icedtea-2.3.4.orig/patches/topdir-openwrt.patch icedtea-2.3.4/patches/topdir-openwrt.patch
--- icedtea-2.3.4.orig/patches/topdir-openwrt.patch	1970-01-01 01:00:00.000000000 +0100
+++ icedtea-2.3.4/patches/topdir-openwrt.patch	2013-02-12 09:37:29.000000000 +0100
@@ -0,0 +1,14 @@
+diff -Nur openjdk-boot.orig/Makefile icedtea7-forest-2-3-8bd8e70d4a03.2/Makefile
+--- openjdk-boot.orig/Makefile	2013-01-14 23:24:55.000000000 +0100
++++ openjdk-boot/Makefile	2013-02-11 17:28:22.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)
+ 
+-ifndef TOPDIR
+-  TOPDIR:=.
+-endif
++TOPDIR:=.
+ 
+ ifndef JDK_TOPDIR
+   JDK_TOPDIR=$(TOPDIR)/jdk
