summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornelsonb%netscape.com <devnull@localhost>2001-03-14 23:30:37 +0000
committernelsonb%netscape.com <devnull@localhost>2001-03-14 23:30:37 +0000
commit50fbf2ed9c277623fc1014197175409bfbf9933a (patch)
treec759d4e669e2e1f013f6c138fdd089727c6be3c9
parentd0f49010700deb53e9b941d1158f63eaa84c2ed8 (diff)
downloadnss-hg-50fbf2ed9c277623fc1014197175409bfbf9933a.tar.gz
Build changes for Solaris and gcc. Get gcc to use the proper architectureNSS_3_2_BASE
flags when building v8plus code on Solaris/Ultrasparc. Use gcc instead of ld to build the freebl DSOs when using gcc on Solaris. And stop using the "sparkfix" program on Solaris. It is no longer needed. Bug 69052.
-rw-r--r--security/coreconf/SunOS5.mk41
-rw-r--r--security/nss/lib/freebl/Makefile12
2 files changed, 38 insertions, 15 deletions
diff --git a/security/coreconf/SunOS5.mk b/security/coreconf/SunOS5.mk
index 1e1b1db99..37b65293f 100644
--- a/security/coreconf/SunOS5.mk
+++ b/security/coreconf/SunOS5.mk
@@ -35,17 +35,6 @@
include $(CORE_DEPTH)/coreconf/UNIX.mk
-ifeq ($(USE_64), 1)
- ARCHFLAG=-xarch=v9
- LD=/usr/ccs/bin/ld
-else
- ifdef USE_HYBRID
- ARCHFLAG=-xarch=v8plus
- else
- ARCHFLAG=-xarch=v8
- endif
-endif
-
#
# Temporary define for the Client; to be removed when binary release is used
#
@@ -56,6 +45,35 @@ ifdef MOZILLA_CLIENT
endif
endif
+# Sun's WorkShop defines v8, v8plus and v9 architectures.
+# gcc on Solaris defines v8 and v9 "cpus".
+# gcc's v9 is equivalent to Workshop's v8plus.
+# gcc apparently has no equivalent to Workshop's v9
+# We always use Sun's assembler and linker, which use Sun's naming convention.
+
+ifeq ($(USE_64), 1)
+ ifdef NS_USE_GCC
+ ARCHFLAG= UNKNOWN
+ else
+ ARCHFLAG=-xarch=v9
+ endif
+ LD=/usr/ccs/bin/ld
+else
+ ifdef NS_USE_GCC
+ ifdef USE_HYBRID
+ ARCHFLAG=-mcpu=v9 -Wa,-xarch=v8plus
+ else
+ ARCHFLAG=-mcpu=v8
+ endif
+ else
+ ifdef USE_HYBRID
+ ARCHFLAG=-xarch=v8plus
+ else
+ ARCHFLAG=-xarch=v8
+ endif
+ endif
+endif
+
#
# The default implementation strategy for Solaris is classic nspr.
#
@@ -87,6 +105,7 @@ ifdef NS_USE_GCC
else
OS_CFLAGS += $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
endif
+ OS_CFLAGS += $(ARCHFLAG)
else
CC = cc
CCC = CC
diff --git a/security/nss/lib/freebl/Makefile b/security/nss/lib/freebl/Makefile
index 9c963bc98..10beb49d3 100644
--- a/security/nss/lib/freebl/Makefile
+++ b/security/nss/lib/freebl/Makefile
@@ -154,7 +154,12 @@ ifeq ($(OS_RELEASE),5.8)
endif
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
+else
MKSHLIB += -B symbolic -z defs -z now -z text -M mapfile.Solaris
+endif
ifdef USE_PURE_32
# this builds for Sparc v8 pure 32-bit architecture
DEFINES += -DMP_USE_LONG_LONG_MULTIPLY -DMP_USE_UINT_DIGIT -DMP_NO_MP_WORD
@@ -269,20 +274,19 @@ $(SPARCFIX): sparcfix.c
@$(MAKE_OBJDIR)
$(CC) -o $@ -O sparcfix.c -lelf
-$(OBJDIR)/mpv_sparcv8.o $(OBJDIR)/montmulfv8.o : $(OBJDIR)/%.o : %.s $(SPARCFIX)
+#$(OBJDIR)/mpv_sparcv8.o $(OBJDIR)/montmulfv8.o : $(OBJDIR)/%.o : %.s $(SPARCFIX)
+$(OBJDIR)/mpv_sparcv8.o $(OBJDIR)/montmulfv8.o : $(OBJDIR)/%.o : %.s
@$(MAKE_OBJDIR)
$(SOLARIS_AS) -o $@ $(SOLARIS_AS_FLAGS) $*.s
- $(SPARCFIX) $@
+# $(SPARCFIX) $@
$(OBJDIR)/mpv_sparcv9.o $(OBJDIR)/montmulfv9.o : $(OBJDIR)/%.o : %.s
@$(MAKE_OBJDIR)
$(SOLARIS_AS) -o $@ $(SOLARIS_AS_FLAGS) $*.s
-# $(SPARCFIX) $@
$(OBJDIR)/mpv_sparc.o: vis_64.il vis_proto.h mpv_sparc.c
@$(MAKE_OBJDIR)
$(CC) -o $@ $(SOLARIS_FLAGS) -c vis_64.il mpv_sparc.c
-# $(SPARCFIX) $@
$(OBJDIR)/mpmontg.o: mpmontg.c montmulf.h
endif