Build changes for Solaris and gcc. Get gcc to use the proper architecture

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.
This commit is contained in:
nelsonb%netscape.com 2001-03-14 23:30:37 +00:00
Родитель f313ca90ed
Коммит 62016bed7f
2 изменённых файлов: 41 добавлений и 18 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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