diff --git a/security/coreconf/SunOS5.mk b/security/coreconf/SunOS5.mk index 1e1b1db993f..37b65293fad 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 9c963bc9872..10beb49d350 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) - @$(MAKE_OBJDIR) - $(SOLARIS_AS) -o $@ $(SOLARIS_AS_FLAGS) $*.s - $(SPARCFIX) $@ - -$(OBJDIR)/mpv_sparcv9.o $(OBJDIR)/montmulfv9.o : $(OBJDIR)/%.o : %.s +#$(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) $@ +$(OBJDIR)/mpv_sparcv9.o $(OBJDIR)/montmulfv9.o : $(OBJDIR)/%.o : %.s + @$(MAKE_OBJDIR) + $(SOLARIS_AS) -o $@ $(SOLARIS_AS_FLAGS) $*.s + $(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