Skip to content

Commit

Permalink
Bug 91224: Make sure that we use Solaris ld, not GNU ld, to build NSS.
Browse files Browse the repository at this point in the history
Modified Files:
	coreconf/SunOS5.mk nss/Makefile nss/cmd/platlibs.mk
	nss/lib/freebl/Makefile
  • Loading branch information
wtc%netscape.com committed Sep 18, 2002
1 parent 8d607c1 commit 8feb62a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
3 changes: 2 additions & 1 deletion security/coreconf/SunOS5.mk
Expand Up @@ -57,7 +57,6 @@ ifeq ($(USE_64), 1)
else
ARCHFLAG=-xarch=v9
endif
LD=/usr/ccs/bin/ld
else
ifdef NS_USE_GCC
ifdef USE_HYBRID
Expand All @@ -74,6 +73,8 @@ else
endif
endif

LD=/usr/ccs/bin/ld

#
# The default implementation strategy for Solaris is classic nspr.
#
Expand Down
19 changes: 4 additions & 15 deletions security/nss/Makefile
Expand Up @@ -79,13 +79,6 @@ nss_build_all: build_coreconf build_nspr build_dbm all
build_coreconf:
cd $(CORE_DEPTH)/coreconf ; $(MAKE)

#
# NSPR has two build systems: autoconf and classic.
# The build_nspr rule needs to work with both.
#

ifdef NSPR_AUTOCONF

NSPR_CONFIG_STATUS = $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME)/config.status
NSPR_CONFIGURE = $(CORE_DEPTH)/../nsprpub/configure

Expand All @@ -105,6 +98,9 @@ endif
ifdef USE_DEBUG_RTL
NSPR_CONFIGURE_OPTS += --enable-debug-rtl
endif
ifdef NS_USE_GCC
NSPR_COMPILERS = CC=gcc CXX=g++
endif

#
# Some pwd commands on Windows (for example, the pwd
Expand All @@ -130,21 +126,14 @@ endif
$(NSPR_CONFIG_STATUS): $(NSPR_CONFIGURE)
$(NSINSTALL) -D $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME)
cd $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME) ; \
sh ../configure \
$(NSPR_COMPILERS) sh ../configure \
$(NSPR_CONFIGURE_OPTS) \
--with-dist-prefix='$(NSPR_PREFIX)' \
--with-dist-includedir='$(NSPR_PREFIX)/include'

build_nspr: $(NSPR_CONFIG_STATUS)
cd $(CORE_DEPTH)/../nsprpub/$(OBJDIR_NAME) ; $(MAKE)

else # NSPR classic build system

build_nspr:
cd $(CORE_DEPTH)/../nsprpub ; $(MAKE) OBJDIR_NAME=${OBJDIR_NAME}

endif # NSPR_AUTOCONF

build_dbm:
cd $(CORE_DEPTH)/dbm ; $(MAKE) export libs

Expand Down
7 changes: 7 additions & 0 deletions security/nss/cmd/platlibs.mk
Expand Up @@ -180,6 +180,13 @@ ifeq ($(OS_ARCH), Darwin)
EXTRA_SHARED_LIBS += -dylib_file @executable_path/libsoftokn3.dylib:$(DIST)/lib/libsoftokn3.dylib
endif

# Use the Solaris ld, which knows where to find libsoftokn3.so.
ifeq ($(OS_ARCH), SunOS)
ifdef NS_USE_GCC
EXTRA_SHARED_LIBS += -B/usr/ccs/bin/
endif
endif

# $(PROGRAM) has NO explicit dependencies on $(EXTRA_SHARED_LIBS)
# $(EXTRA_SHARED_LIBS) come before $(OS_LIBS), except on AIX.
EXTRA_SHARED_LIBS += \
Expand Down
2 changes: 1 addition & 1 deletion security/nss/lib/freebl/Makefile
Expand Up @@ -161,7 +161,7 @@ ifeq ($(SYSV_SPARC),1)
SOLARIS_AS = /usr/ccs/bin/as
ifdef NS_USE_GCC
LD = gcc
DSO_LDOPTS += -shared -Wl,-B,symbolic,-z,defs,-z,now,-z,text,-M,mapfile.Solaris
DSO_LDOPTS = -B/usr/ccs/bin/ -shared -h,$(notdir $@) -Wl,-B,symbolic,-z,defs,-z,now,-z,text,-M,mapfile.Solaris
else
MKSHLIB += -B symbolic -z defs -z now -z text -M mapfile.Solaris
endif
Expand Down

0 comments on commit 8feb62a

Please sign in to comment.