diff -durN openjdk-orig/jdk/make/common/shared/Sanity.gmk openjdk/jdk/make/common/shared/Sanity.gmk
--- openjdk-orig/jdk/make/common/shared/Sanity.gmk	2008-10-27 00:25:33.000000000 +0000
+++ openjdk/jdk/make/common/shared/Sanity.gmk	2008-10-28 21:42:16.000000000 +0000
@@ -1397,7 +1397,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)
diff -durN openjdk-orig/jdk/make/javax/sound/jsoundalsa/Makefile openjdk/jdk/make/javax/sound/jsoundalsa/Makefile
--- openjdk-orig/jdk/make/javax/sound/jsoundalsa/Makefile	2008-08-28 09:10:50.000000000 +0100
+++ openjdk/jdk/make/javax/sound/jsoundalsa/Makefile	2008-10-28 21:55:27.000000000 +0000
@@ -65,7 +65,7 @@
 	$(MIDIFILES_export) \
 	$(PORTFILES_export)
 
-LDFLAGS += -lasound
+OTHER_LDLIBS += -lasound
 
 CPPFLAGS += \
 	-DUSE_DAUDIO=TRUE \
diff -durN 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	2008-10-27 00:25:30.000000000 +0000
+++ openjdk/jdk/make/com/sun/java/pack/Makefile	2008-10-28 23:27:55.000000000 +0000
@@ -75,12 +75,12 @@
             $(ZIPOBJDIR)/infutil.$(OBJECT_SUFFIX) \
             $(ZIPOBJDIR)/inffast.$(OBJECT_SUFFIX)
 
-  OTHER_LDLIBS += -lz
 else
   OTHER_CXXFLAGS += -DNO_ZLIB -DUNPACK_JNI
-  OTHER_LDLIBS += -lz $(JVMLIB)
+  OTHER_LDLIBS += $(JVMLIB)
 endif
 
+OTHER_LDLIBS += -lz
 CXXFLAGS_DBG += -DFULL
 CXXFLAGS_OPT += -DPRODUCT
 CXXFLAGS_COMMON += -DFULL
@@ -100,12 +100,11 @@
   COMPILER_WARNINGS_FATAL=false
 else
   LDOUTPUT = -o #Have a space 
-  LDDFLAGS += -lz -lc
-  OTHER_LDLIBS  += $(LIBCXX)
+  OTHER_LDLIBS += $(LIBCXX) -lc
 # setup the list of libraries to link in...
 ifeq ($(PLATFORM), linux)
 ifeq ("$(CC_VER_MAJOR)", "3")
-  OTHER_LDLIBS  += -lz -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
+  OTHER_LDLIBS  += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic
 endif
 endif #LINUX
 endif #PLATFORM
@@ -142,7 +141,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)
 
 
