summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2002-06-12 00:21:19 +0000
committerwtc%netscape.com <devnull@localhost>2002-06-12 00:21:19 +0000
commit46ac7a6ceb9218759caef8c6a7f163039a166be2 (patch)
treeaa05385d8291006e5af58e5218016a9140554dd1
parent436bc0d964597ecca9967bd3e5e03ce9f8e93534 (diff)
downloadnss-hg-46ac7a6ceb9218759caef8c6a7f163039a166be2.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
-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