summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2002-06-12 00:22:42 +0000
committerwtc%netscape.com <devnull@localhost>2002-06-12 00:22:42 +0000
commitec1e7c5ea679b8f2f6566173960e4e8da73789cd (patch)
tree6e3b6ebbad615abe3011cc3dd893fd33865d81be
parent026fc7a6f7546bc1bb28469f7c8532e2d7ffd92e (diff)
downloadnss-hg-ec1e7c5ea679b8f2f6566173960e4e8da73789cd.tar.gz
Bug 150143: use map file to limit exported symbols on Mac OS X. The patch
is contributed by Brian Ryner <bryner@netscape.com>. Modified files: Darwin.mk rules.mk Tag: NSS_3_5_BRANCH
-rw-r--r--security/coreconf/Darwin.mk2
-rw-r--r--security/coreconf/rules.mk5
2 files changed, 7 insertions, 0 deletions
diff --git a/security/coreconf/Darwin.mk b/security/coreconf/Darwin.mk
index 6c2b93c9d..59f5af8fd 100644
--- a/security/coreconf/Darwin.mk
+++ b/security/coreconf/Darwin.mk
@@ -70,5 +70,7 @@ DSO_LDOPTS = -dynamiclib -compatibility_version 1 -current_version 1 -install_na
MKSHLIB = $(CC) -arch $(CPU_ARCH) $(DSO_LDOPTS)
DLL_SUFFIX = dylib
+PROCESS_MAP_FILE = grep -v ';+' $(LIBRARY_NAME).def | grep -v ';-' | \
+ sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,^,_,' > $@
G++INCLUDES = -I/usr/include/g++
diff --git a/security/coreconf/rules.mk b/security/coreconf/rules.mk
index 76043627a..c53c1ffc5 100644
--- a/security/coreconf/rules.mk
+++ b/security/coreconf/rules.mk
@@ -364,6 +364,11 @@ endif
ifeq ($(OS_TARGET),OpenVMS)
@echo "`translate $@`" > $(@:$(DLL_SUFFIX)=vms)
endif
+ifeq ($(OS_TARGET),Darwin)
+ifdef MAPFILE
+ nmedit -s $(MAPFILE) $@
+endif
+endif
endif
endif