  DSO_LDFLAGS		=
  LDFLAGS			+= $(ARCHFLAG)
  
+@@ -161,8 +164,13 @@
+ #
+ CPU_TAG = _$(CPU_ARCH)
+ 
++ifeq ($(SYSTEM_ZLIB),YES)  
++# Currently (3.12.4) only the tools modutil and signtool are linked with libz
++# If USE_SYSTEM_ZLIB is not set then the tools link statically libzlib.a which
++# is also build in nss.
+ USE_SYSTEM_ZLIB = 1
+ ZLIB_LIBS = -lz
++endif
+ 
+ # The -rpath '$$ORIGIN' linker option instructs this library to search for its
+ # dependencies in the same directory where it resides.
 --- misc/mozilla/security/coreconf/SunOS5.mk	2009-06-11 02:55:32.000000000 +0200
-+++ misc/build/mozilla/security/coreconf/SunOS5.mk	2009-09-17 10:42:17.845459669 +0200
++++ misc/build/mozilla/security/coreconf/SunOS5.mk	2009-10-20 17:03:24.786509911 +0200
 @@ -89,8 +89,12 @@
  	    # OPTIMIZER += -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer
  	endif

 	@echo $(RES) finished
 endif
--- misc/mozilla/security/nss/cmd/platlibs.mk	2009-06-18 01:01:48.000000000 +0200
+++ misc/build/mozilla/security/nss/cmd/platlibs.mk	2009-09-17 11:08:16.697236076 +0200
@@ -41,27 +41,28 @@
 ifeq ($(OS_ARCH), SunOS) 
 ifeq ($(BUILD_SUN_PKG), 1)

 ifeq (,$(filter-out WIN%,$(OS_TARGET)))
 ifndef BUILD_OPT
--- misc/mozilla/security/coreconf/rules.mk	2009-08-11 05:23:39.000000000 +0200
+++ misc/build/mozilla/security/coreconf/rules.mk	2009-10-20 17:03:24.815121351 +0200
@@ -355,7 +355,12 @@
 ifdef NS_USE_GCC
 	$(RC) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $<
