summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2000-12-28 02:22:33 +0000
committerwtc%netscape.com <devnull@localhost>2000-12-28 02:22:33 +0000
commitc2848ed9829bc48cc6f8188f671daaa467c3a7c1 (patch)
treea889cda0a91838a381732c7eebb75ab2f23b693a /security
parent933abbfd65d5eea4835ee34251da5c212ca32630 (diff)
downloadnss-hg-c2848ed9829bc48cc6f8188f671daaa467c3a7c1.tar.gz
More work on shared libraries for NSS.
1. Implemented a way to link all the objects in archive libraries into a shared library. I query each subdirectory for the list of objects comprising an archive library (the get_objs makefile target) and link these objects as opposed to the archive libraries. Not all linkers support the --whole-archive, -all, or -z allextract options. The *sym.c solution cannot fully control what objects in the archive libraries are pulled and what symbols are exported. 2. Moved pkcs7 from libsmime3.so to libnss3.so because certread.c in libcerthi.a (part of libnss3.so) depends on some PKCS7 functions, which creates a circular dependency between libsmime3.so and libnss3.so. This should work on all Unix platforms.
Diffstat (limited to 'security')
-rw-r--r--security/coreconf/rules.mk9
-rw-r--r--security/nss/lib/manifest.mn4
-rw-r--r--security/nss/lib/nss/config.mk33
-rw-r--r--security/nss/lib/nss/manifest.mn1
-rw-r--r--security/nss/lib/smime/config.mk8
-rw-r--r--security/nss/lib/smime/manifest.mn1
6 files changed, 41 insertions, 15 deletions
diff --git a/security/coreconf/rules.mk b/security/coreconf/rules.mk
index c710bc28d..316bc827e 100644
--- a/security/coreconf/rules.mk
+++ b/security/coreconf/rules.mk
@@ -303,6 +303,9 @@ ifneq ($(POLICY),)
-$(PLCYPATCH) $(PLCYPATCH_ARGS) $@
endif
+get_objs:
+ @echo $(OBJS)
+
$(LIBRARY): $(OBJS)
@$(MAKE_OBJDIR)
rm -f $@
@@ -314,6 +317,10 @@ $(IMPORT_LIBRARY): $(SHARED_LIBRARY)
wlib +$(SHARED_LIBRARY)
endif
+ifdef SHARED_LIBRARY_LIBS
+SUB_SHLOBJS = $(foreach dir,$(SHARED_LIBRARY_DIRS),$(addprefix $(dir)/,$(shell $(MAKE) -C $(dir) --no-print-directory get_objs)))
+endif
+
$(SHARED_LIBRARY): $(OBJS)
@$(MAKE_OBJDIR)
rm -f $@
@@ -344,7 +351,7 @@ else
$(LINK_DLL) -MAP $(DLLBASE) $(OBJS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS) $(LD_LIBS)
endif
else
- $(MKSHLIB) -o $@ $(OBJS) $(LD_LIBS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS)
+ $(MKSHLIB) -o $@ $(OBJS) $(SUB_SHLOBJS) $(LD_LIBS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS)
chmod +x $@
endif
endif
diff --git a/security/nss/lib/manifest.mn b/security/nss/lib/manifest.mn
index cc8dfc1d0..b1a98437c 100644
--- a/security/nss/lib/manifest.mn
+++ b/security/nss/lib/manifest.mn
@@ -33,11 +33,11 @@
CORE_DEPTH = ../..
DEPTH = ../..
-DIRS = crmf jar \
+DIRS = crmf jar pkcs7 \
certhigh pk11wrap cryptohi \
softoken certdb crypto \
util freebl nss pkcs12 fortcrypt \
- base ckfw pkcs7 smime ssl
+ base ckfw smime ssl
#
# these dirs are not built at the moment
#
diff --git a/security/nss/lib/nss/config.mk b/security/nss/lib/nss/config.mk
index 97ba6ba3f..1e3d5f538 100644
--- a/security/nss/lib/nss/config.mk
+++ b/security/nss/lib/nss/config.mk
@@ -78,25 +78,37 @@ else
# $(PROGRAM) has explicit dependencies on $(EXTRA_LIBS)
CRYPTOLIB=$(DIST)/lib/libfreebl.$(LIB_SUFFIX)
+CRYPTODIR=../freebl
ifdef MOZILLA_SECURITY_BUILD
CRYPTOLIB=$(DIST)/lib/libcrypto.$(LIB_SUFFIX)
+ CRYPTODIR=../crypto
endif
-ifdef MOZILLA_BSAFE_BUILD
- CRYPTOLIB+=$(DIST)/lib/libbsafe.$(LIB_SUFFIX)
- CRYPTOLIB+=$(DIST)/lib/libfreebl.$(LIB_SUFFIX)
-endif
-EXTRA_LIBS += \
+SHARED_LIBRARY_LIBS = \
+ $(DIST)/lib/libpkcs7.$(LIB_SUFFIX) \
$(DIST)/lib/libcerthi.$(LIB_SUFFIX) \
$(DIST)/lib/libpk11wrap.$(LIB_SUFFIX) \
$(DIST)/lib/libcryptohi.$(LIB_SUFFIX) \
- $(DIST)/lib/libcerthi.$(LIB_SUFFIX) \
- $(DIST)/lib/libpk11wrap.$(LIB_SUFFIX) \
$(DIST)/lib/libsoftoken.$(LIB_SUFFIX) \
$(DIST)/lib/libcertdb.$(LIB_SUFFIX) \
$(CRYPTOLIB) \
$(DIST)/lib/libsecutil.$(LIB_SUFFIX) \
+ $(NULL)
+EXTRA_LIBS += \
$(DIST)/lib/libdbm.$(LIB_SUFFIX) \
$(NULL)
+ifdef MOZILLA_BSAFE_BUILD
+ EXTRA_LIBS+=$(DIST)/lib/libbsafe.$(LIB_SUFFIX)
+endif
+SHARED_LIBRARY_DIRS = \
+ ../pkcs7 \
+ ../certhigh \
+ ../pk11wrap \
+ ../cryptohi \
+ ../softoken \
+ ../certdb \
+ $(CRYPTODIR) \
+ ../util \
+ $(NULL)
# $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
# $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX.
@@ -108,3 +120,10 @@ EXTRA_SHARED_LIBS += \
$(NULL)
endif
+#ifeq ($(OS_ARCH),SunOS)
+#MKSHLIB += -z text -M mapfile
+#endif
+
+#ifeq ($(OS_ARCH),Linux)
+#MKSHLIB += -Wl,--version-script,mapfile
+#endif
diff --git a/security/nss/lib/nss/manifest.mn b/security/nss/lib/nss/manifest.mn
index 15b630024..18dfa49cd 100644
--- a/security/nss/lib/nss/manifest.mn
+++ b/security/nss/lib/nss/manifest.mn
@@ -40,7 +40,6 @@ MODULE = security
CSRCS = \
nssinit.c \
- nsssym.c\
$(NULL)
REQUIRES = security dbm
diff --git a/security/nss/lib/smime/config.mk b/security/nss/lib/smime/config.mk
index 96e8ad386..7fb542045 100644
--- a/security/nss/lib/smime/config.mk
+++ b/security/nss/lib/smime/config.mk
@@ -48,7 +48,6 @@ ifeq ($(OS_ARCH), WINNT)
EXTRA_LIBS += \
$(DIST)/lib/pkcs12.lib \
- $(DIST)/lib/pkcs7.lib \
$(DIST)/lib/nss3.lib \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4.lib \
$(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4.lib \
@@ -59,9 +58,12 @@ else
# $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
# $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX.
-EXTRA_LIBS += \
+SHARED_LIBRARY_LIBS = \
$(DIST)/lib/libpkcs12.${LIB_SUFFIX} \
- $(DIST)/lib/libpkcs7.${LIB_SUFFIX} \
+ $(NULL)
+
+SHARED_LIBRARY_DIRS = \
+ ../pkcs12 \
$(NULL)
EXTRA_SHARED_LIBS += \
diff --git a/security/nss/lib/smime/manifest.mn b/security/nss/lib/smime/manifest.mn
index 3cf887ddf..d89241581 100644
--- a/security/nss/lib/smime/manifest.mn
+++ b/security/nss/lib/smime/manifest.mn
@@ -67,7 +67,6 @@ CSRCS = \
cmsutil.c \
smimemessage.c \
smimeutil.c \
- smimesym.c \
$(NULL)
REQUIRES = security dbm