diff -Nru 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-08-21 20:32:57.128216515 +0100
+++ openjdk/jdk/make/com/sun/java/pack/Makefile	2014-02-01 15:58:10.921834941 +0000
@@ -144,7 +144,7 @@
 
 $(UNPACK_EXE): $(UNPACK_EXE_FILES_o) winres 
 	$(prep-target)
-	$(LINKER)  $(LDDFLAGS) $(UNPACK_EXE_FILES_o) $(RES) $(LIBCXX) $(LDOUTPUT)$(TEMPDIR)/unpack200$(EXE_SUFFIX)
+	$(LINKER)  $(LDDFLAGS) $(UNPACK_EXE_FILES_o) $(RES) $(OTHER_LDLIBS) $(LIBCXX) $(LDOUTPUT)$(TEMPDIR)/unpack200$(EXE_SUFFIX)
 	$(CP) $(TEMPDIR)/unpack200$(EXE_SUFFIX) $(UNPACK_EXE)
 
 
diff -Nru openjdk.orig/jdk/make/common/shared/Sanity.gmk openjdk/jdk/make/common/shared/Sanity.gmk
--- openjdk.orig/jdk/make/common/shared/Sanity.gmk	2014-02-01 15:43:22.344232267 +0000
+++ openjdk/jdk/make/common/shared/Sanity.gmk	2014-02-01 15:58:10.921834941 +0000
@@ -1344,7 +1344,7 @@
 ifdef ALSA_VERSION_CHECK
 $(ALSA_VERSION_CHECK): $(ALSA_VERSION_CHECK).c
 	@$(prep-target)
-	@$(CC) -lasound -o $@ $<
+	@$(CC) -o $@ $< -lasound
 
 $(ALSA_VERSION_CHECK).c:
 	@$(prep-target)
