Bug 497251: build with FREEBL_NO_DEPEND=1 by default on Linux. r=rrelyea.
authorwtc%google.com
Sat, 12 Jun 2010 01:23:46 +0000
changeset 9671 b2a9d98e83a2c53305eb6b7643de3bed4d4fc482
parent 9669 748f866dd529355697850a0e9c5af3cc13467a01
child 9673 c5c919a7dd5a587b8c2155780ff2e1db15c75ed3
push idunknown
push userunknown
push dateunknown
reviewersrrelyea
bugs497251
Bug 497251: build with FREEBL_NO_DEPEND=1 by default on Linux. r=rrelyea. Modified Files: coreconf/Linux.mk nss/lib/freebl/Makefile nss/lib/freebl/config.mk nss/lib/freebl/manifest.mn
security/coreconf/Linux.mk
security/nss/lib/freebl/Makefile
security/nss/lib/freebl/config.mk
security/nss/lib/freebl/manifest.mn
--- a/security/coreconf/Linux.mk
+++ b/security/coreconf/Linux.mk
@@ -153,16 +153,24 @@ LDFLAGS			+= $(ARCHFLAG)
 # INCLUDES += -I/usr/include -Y/usr/include/linux
 G++INCLUDES		= -I/usr/include/g++
 
 #
 # Always set CPU_TAG on Linux, WINCE.
 #
 CPU_TAG = _$(CPU_ARCH)
 
+#
+# On Linux 2.6 or later, build libfreebl3.so with no NSPR and libnssutil3.so
+# dependencies.
+#
+ifeq (2.6,$(firstword $(sort 2.6 $(OS_RELEASE))))
+FREEBL_NO_DEPEND = 1
+endif
+
 USE_SYSTEM_ZLIB = 1
 ZLIB_LIBS = -lz
 
 # The -rpath '$$ORIGIN' linker option instructs this library to search for its
 # dependencies in the same directory where it resides.
 ifeq ($(BUILD_SUN_PKG), 1)
 ifeq ($(USE_64), 1)
 RPATH = -Wl,-rpath,'$$ORIGIN:/opt/sun/private/lib64:/opt/sun/private/lib'
--- a/security/nss/lib/freebl/Makefile
+++ b/security/nss/lib/freebl/Makefile
@@ -55,17 +55,17 @@ include $(CORE_DEPTH)/coreconf/config.mk
 #######################################################################
 
 
 
 #######################################################################
 # (4) Include "local" platform-dependent assignments (OPTIONAL).      #
 #######################################################################
 
--include config.mk
+include config.mk
 
 # default for all platforms
 # unset this on those that have multiple freebl libraries
 FREEBL_BUILD_SINGLE_SHLIB = 1
 
 ifdef USE_64
 	DEFINES += -DNSS_USE_64
 endif
--- a/security/nss/lib/freebl/config.mk
+++ b/security/nss/lib/freebl/config.mk
@@ -60,16 +60,25 @@ ALL_TRASH :=    $(TARGETS) $(OBJS) $(OBJ
 #
 # override these variables to prevent building a DSO/DLL.
   TARGETS        = $(LIBRARY)
   SHARED_LIBRARY =
   IMPORT_LIBRARY =
   PROGRAM        =
 
 else
+
+ifdef FREEBL_NO_DEPEND
+LOWHASH_SRCS = stubs.c nsslowhash.c
+LOWHASH_EXPORTS = nsslowhash.h
+MAPFILE_SOURCE = freebl_hash.def
+else
+MAPFILE_SOURCE = freebl.def
+endif
+
 # This is a recursive child make. We build the shared lib.
 
 TARGETS      = $(SHARED_LIBRARY)
 LIBRARY      =
 IMPORT_LIBRARY =
 PROGRAM      =
 
 ifeq ($(OS_TARGET), SunOS)
--- a/security/nss/lib/freebl/manifest.mn
+++ b/security/nss/lib/freebl/manifest.mn
@@ -65,23 +65,16 @@ ifdef FREEBL_CHILD_BUILD
   endif
 endif
 
 # if the library name contains _, we prefix the version with _
 ifneq (,$(findstring _,$(LIBRARY_NAME)))
   LIBRARY_VERSION := _$(LIBRARY_VERSION)
 endif
 
-ifdef FREEBL_NO_DEPEND
-LOWHASH_SRCS = stubs.c nsslowhash.c
-LOWHASH_EXPORTS = nsslowhash.h
-MAPFILE_SOURCE = freebl_hash.def
-else
-MAPFILE_SOURCE = freebl.def
-endif
 MAPFILE = $(OBJDIR)/$(LIBRARY_NAME).def
 
 SOFTOKEN_LIBRARY_VERSION = 3
 
 DEFINES += -DSHLIB_SUFFIX=\"$(DLL_SUFFIX)\" -DSHLIB_PREFIX=\"$(DLL_PREFIX)\" \
 	-DSHLIB_VERSION=\"$(LIBRARY_VERSION)\" \
 	-DSOFTOKEN_SHLIB_VERSION=\"$(SOFTOKEN_LIBRARY_VERSION)\"