6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
Allows for building with SS12, no longer requires SS11, warns if not SS11 for now. Once SS12 is validated and performance measurements look ok, SS12 will be the validated compiler. Reviewed-by: sspitsyn, ikrylov
This commit is contained in:
parent
7c478e3028
commit
5d322a1edf
@ -68,8 +68,23 @@ if [ "${osname}" = SunOS ] ; then
|
||||
solaris_arch=i386
|
||||
fi
|
||||
|
||||
# Get the SS11 compilers into path (make sure it matches ALT setting)
|
||||
compiler_path=${slashjava}/devtools/${solaris_arch}/SUNWspro/SS11/bin
|
||||
if [ "${JPRT_SOLARIS_COMPILER_NAME}" != "" ] ; then
|
||||
compiler_name=${JPRT_SOLARIS_COMPILER_NAME}
|
||||
else
|
||||
if [ "${JPRT_JOB_PRODUCT_RELEASE}" = "jdk6" -o \
|
||||
"${JPRT_JOB_PRODUCT_RELEASE}" = "jdk6u10" -o \
|
||||
"${JPRT_JOB_PRODUCT_RELEASE}" = "jdk6perf" ] ; then
|
||||
# All jdk6 builds use SS11
|
||||
compiler_name=SS11
|
||||
else
|
||||
# FIXUP: Change to SS12 once it has been validated.
|
||||
#compiler_name=SS12
|
||||
compiler_name=SS11
|
||||
fi
|
||||
fi
|
||||
|
||||
# Get into path (make sure it matches ALT setting)
|
||||
compiler_path=${slashjava}/devtools/${solaris_arch}/SUNWspro/${compiler_name}/bin
|
||||
dirMustExist "${compiler_path}" COMPILER_PATH
|
||||
path4sdk=${compiler_path}
|
||||
|
||||
|
@ -29,7 +29,8 @@ DEBUG_CFLAGS/DEFAULT= $(DEBUG_CFLAGS)
|
||||
DEBUG_CFLAGS/BYFILE = $(DEBUG_CFLAGS/$@)$(DEBUG_CFLAGS/DEFAULT$(DEBUG_CFLAGS/$@))
|
||||
|
||||
ifeq ("${Platform_compiler}", "sparcWorks")
|
||||
ifeq ($(shell expr $(COMPILER_REV) \>= 5.8), 1)
|
||||
|
||||
ifeq ($(COMPILER_REV),5.8)
|
||||
# SS11 SEGV when compiling with -g and -xarch=v8, using different backend
|
||||
DEBUG_CFLAGS/compileBroker.o = $(DEBUG_CFLAGS) -xO0
|
||||
DEBUG_CFLAGS/jvmtiTagMap.o = $(DEBUG_CFLAGS) -xO0
|
||||
|
@ -92,12 +92,12 @@ XARCH = $(subst sparcv9,v9,$(shell echo $(ISA)))
|
||||
$(XLIBJVM_DB): $(DTRACE_SRCDIR)/$(JVM_DB).c $(JVMOFFS).h $(LIBJVM_DB_MAPFILE)
|
||||
@echo Making $@
|
||||
$(QUIETLY) mkdir -p 64/ ; \
|
||||
$(CC) $(SYMFLAG) -xarch=$(XARCH) -D$(TYPE) -I. -I$(GENERATED) \
|
||||
$(CC) $(SYMFLAG) $(ARCHFLAG/$(XARCH)) -D$(TYPE) -I. -I$(GENERATED) \
|
||||
$(SHARED_FLAG) $(LFLAGS_JVM_DB) -o $@ $(DTRACE_SRCDIR)/$(JVM_DB).c -lc
|
||||
$(XLIBJVM_DTRACE): $(DTRACE_SRCDIR)/$(JVM_DTRACE).c $(DTRACE_SRCDIR)/$(JVM_DTRACE).h $(LIBJVM_DTRACE_MAPFILE)
|
||||
@echo Making $@
|
||||
$(QUIETLY) mkdir -p 64/ ; \
|
||||
$(CC) $(SYMFLAG) -xarch=$(XARCH) -D$(TYPE) -I. \
|
||||
$(CC) $(SYMFLAG) $(ARCHFLAG/$(XARCH)) -D$(TYPE) -I. \
|
||||
$(SHARED_FLAG) $(LFLAGS_JVM_DTRACE) -o $@ $(DTRACE_SRCDIR)/$(JVM_DTRACE).c -lc -lthread -ldoor
|
||||
endif # ifneq ("${ISA}","${BUILDARCH}")
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
# Sets make macros for making debug version of VM
|
||||
|
||||
# Compiler specific DEBUG_CFLAGS are passed in from gcc.make, sparcWorks.make
|
||||
# They may also specify FASTDEBUG_CFLAGS, but it defaults to DEBUG_FLAGS.
|
||||
# They may also specify FASTDEBUG_CFLAGS, but it defaults to DEBUG_CFLAGS.
|
||||
|
||||
FASTDEBUG_CFLAGS$(FASTDEBUG_CFLAGS) = $(DEBUG_CFLAGS)
|
||||
|
||||
@ -35,15 +35,26 @@ OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@))
|
||||
|
||||
ifeq ("${Platform_compiler}", "sparcWorks")
|
||||
OPT_CFLAGS/SLOWER = -xO2
|
||||
ifeq ($(shell expr $(COMPILER_REV) \>= 5.5), 1)
|
||||
# CC 5.5 has bug 4908364 with -xO4
|
||||
|
||||
# Problem with SS12 compiler, dtrace doesn't like the .o files (bug 6693876)
|
||||
ifeq ($(COMPILER_REV), 5.9)
|
||||
# Not clear this workaround could be skipped in some cases.
|
||||
OPT_CFLAGS/vmGCOperations.o = $(OPT_CFLAGS/SLOWER)
|
||||
OPT_CFLAGS/java.o = $(OPT_CFLAGS/SLOWER)
|
||||
OPT_CFLAGS/jni.o = $(OPT_CFLAGS/SLOWER)
|
||||
endif
|
||||
|
||||
ifeq ($(COMPILER_REV), 5.5)
|
||||
# CC 5.5 has bug 4908364 with -xO4 (Fixed in 5.6)
|
||||
OPT_CFLAGS/library_call.o = $(OPT_CFLAGS/SLOWER)
|
||||
else # COMPILER_REV >= 5.5
|
||||
endif # COMPILER_REV == 5.5
|
||||
|
||||
ifeq ($(shell expr $(COMPILER_REV) \<= 5.4), 1)
|
||||
# Compilation of *_<arch>.cpp can take an hour or more at O3. Use O2
|
||||
# See comments at top of sparc.make.
|
||||
OPT_CFLAGS/ad_$(Platform_arch).o = $(OPT_CFLAGS/SLOWER)
|
||||
OPT_CFLAGS/dfa_$(Platform_arch).o = $(OPT_CFLAGS/SLOWER)
|
||||
endif # COMPILER_REV >= 5.5
|
||||
endif # COMPILER_REV <= 5.4
|
||||
|
||||
ifeq (${COMPILER_REV}, 5.0)
|
||||
# Avoid a compiler bug caused by using -xO<level> -g<level>
|
||||
|
@ -29,7 +29,8 @@ DEBUG_CFLAGS/DEFAULT= $(DEBUG_CFLAGS)
|
||||
DEBUG_CFLAGS/BYFILE = $(DEBUG_CFLAGS/$@)$(DEBUG_CFLAGS/DEFAULT$(DEBUG_CFLAGS/$@))
|
||||
|
||||
ifeq ("${Platform_compiler}", "sparcWorks")
|
||||
ifeq ($(shell expr $(COMPILER_REV) \>= 5.8), 1)
|
||||
|
||||
ifeq ($(COMPILER_REV),5.8))
|
||||
# SS11 SEGV when compiling with -g and -xarch=v8, using different backend
|
||||
DEBUG_CFLAGS/compileBroker.o = $(DEBUG_CFLAGS) -xO0
|
||||
DEBUG_CFLAGS/jvmtiTagMap.o = $(DEBUG_CFLAGS) -xO0
|
||||
|
@ -30,12 +30,21 @@ OPT_CFLAGS/DEFAULT= $(OPT_CFLAGS)
|
||||
OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@))
|
||||
|
||||
# (OPT_CFLAGS/SLOWER is also available, to alter compilation of buggy files)
|
||||
|
||||
# Workaround SS11 bug 6345274 (all platforms)
|
||||
ifeq ("${Platform_compiler}", "sparcWorks")
|
||||
ifeq ($(shell expr $(COMPILER_REV) \>= 5.8), 1)
|
||||
|
||||
# Problem with SS12 compiler, dtrace doesn't like the .o files (bug 6693876)
|
||||
ifeq ($(COMPILER_REV),5.9)
|
||||
# Not clear this workaround could be skipped in some cases.
|
||||
OPT_CFLAGS/vmGCOperations.o = $(OPT_CFLAGS/SLOWER) -g
|
||||
OPT_CFLAGS/java.o = $(OPT_CFLAGS/SLOWER) -g
|
||||
OPT_CFLAGS/jni.o = $(OPT_CFLAGS/SLOWER) -g
|
||||
endif
|
||||
|
||||
# Workaround SS11 bug 6345274 (all platforms) (Fixed in SS11 patch and SS12)
|
||||
ifeq ($(COMPILER_REV),5.8))
|
||||
OPT_CFLAGS/ciTypeFlow.o = $(OPT_CFLAGS/O2)
|
||||
endif # COMPILER_REV >= 5.8
|
||||
endif # COMPILER_REV == 5.8
|
||||
|
||||
endif # Platform_compiler == sparcWorks
|
||||
|
||||
# If you set HOTSPARC_GENERIC=yes, you disable all OPT_CFLAGS settings
|
||||
|
@ -38,12 +38,21 @@ OPT_CFLAGS/ciEnv.o = $(OPT_CFLAGS) -xinline=no%__1cFciEnvbFpost_compiled_method_
|
||||
endif
|
||||
|
||||
# (OPT_CFLAGS/SLOWER is also available, to alter compilation of buggy files)
|
||||
|
||||
# Workaround SS11 bug 6345274 (all platforms)
|
||||
ifeq ("${Platform_compiler}", "sparcWorks")
|
||||
ifeq ($(shell expr $(COMPILER_REV) \>= 5.8), 1)
|
||||
|
||||
# Problem with SS12 compiler, dtrace doesn't like the .o files (bug 6693876)
|
||||
ifeq ($(COMPILER_REV),5.9)
|
||||
# Not clear this workaround could be skipped in some cases.
|
||||
OPT_CFLAGS/vmGCOperations.o = $(OPT_CFLAGS/SLOWER) -g
|
||||
OPT_CFLAGS/java.o = $(OPT_CFLAGS/SLOWER) -g
|
||||
OPT_CFLAGS/jni.o = $(OPT_CFLAGS/SLOWER) -g
|
||||
endif
|
||||
|
||||
# Workaround SS11 bug 6345274 (all platforms) (Fixed in SS11 patch and SS12)
|
||||
ifeq ($(COMPILER_REV),5.8)
|
||||
OPT_CFLAGS/ciTypeFlow.o = $(OPT_CFLAGS/O2)
|
||||
endif # COMPILER_REV >= 5.8
|
||||
endif # COMPILER_REV == 5.8
|
||||
|
||||
endif # Platform_compiler == sparcWorks
|
||||
|
||||
# If you set HOTSPARC_GENERIC=yes, you disable all OPT_CFLAGS settings
|
||||
|
@ -23,7 +23,7 @@
|
||||
#
|
||||
|
||||
Obj_Files += solaris_sparc.o
|
||||
ASFLAGS += $(ARCHFLAG)
|
||||
ASFLAGS += $(AS_ARCHFLAG)
|
||||
|
||||
ifeq ("${Platform_compiler}", "sparcWorks")
|
||||
ifeq ($(shell expr $(COMPILER_REV) \< 5.5), 1)
|
||||
|
@ -28,6 +28,8 @@
|
||||
CC = cc
|
||||
CPP = CC
|
||||
|
||||
# Note that this 'as' is an older version of the Sun Studio 'fbe', and will
|
||||
# use the older style options. The 'fbe' options will match 'cc' and 'CC'.
|
||||
AS = /usr/ccs/bin/as
|
||||
|
||||
NM = /usr/ccs/bin/nm
|
||||
@ -43,25 +45,33 @@ $(shell $(CPP) -V 2>&1 | sed -e 's/^.*\([1-9]\.[0-9][0-9]*\).*/\1/')
|
||||
C_COMPILER_REV := \
|
||||
$(shell $(CC) -V 2>&1 | grep -i "cc:" | sed -e 's/^.*\([1-9]\.[0-9][0-9]*\).*/\1/')
|
||||
|
||||
VALIDATED_COMPILER_REV := 5.8
|
||||
VALIDATED_C_COMPILER_REV := 5.8
|
||||
# Pick which compiler is validated
|
||||
ifeq ($(JDK_MINOR_VERSION),6)
|
||||
# Validated compiler for JDK6 is SS11 (5.8)
|
||||
VALIDATED_COMPILER_REV := 5.8
|
||||
VALIDATED_C_COMPILER_REV := 5.8
|
||||
else
|
||||
# FIXUP: Change to SS12 (5.9) once it has been validated.
|
||||
# Validated compiler for JDK7 is SS12 (5.9)
|
||||
#VALIDATED_COMPILER_REV := 5.9
|
||||
#VALIDATED_C_COMPILER_REV := 5.9
|
||||
VALIDATED_COMPILER_REV := 5.8
|
||||
VALIDATED_C_COMPILER_REV := 5.8
|
||||
endif
|
||||
|
||||
# Warning messages about not using the above validated version
|
||||
ENFORCE_COMPILER_REV${ENFORCE_COMPILER_REV} := ${VALIDATED_COMPILER_REV}
|
||||
ifneq (${COMPILER_REV},${ENFORCE_COMPILER_REV})
|
||||
dummy_target_to_enforce_compiler_rev:
|
||||
@echo "Wrong ${CPP} version: ${COMPILER_REV}. " \
|
||||
"Use version ${ENFORCE_COMPILER_REV}, or set" \
|
||||
"ENFORCE_COMPILER_REV=${COMPILER_REV}."
|
||||
@exit 1
|
||||
dummy_target_to_enforce_compiler_rev:=\
|
||||
$(info WARNING: You are using CC version ${COMPILER_REV} \
|
||||
and should be using version ${ENFORCE_COMPILER_REV})
|
||||
endif
|
||||
|
||||
ENFORCE_C_COMPILER_REV${ENFORCE_C_COMPILER_REV} := ${VALIDATED_C_COMPILER_REV}
|
||||
ifneq (${C_COMPILER_REV},${ENFORCE_C_COMPILER_REV})
|
||||
dummy_target_to_enforce_c_compiler_rev:
|
||||
@echo "Wrong ${CC} version: ${C_COMPILER_REV}. " \
|
||||
"Use version ${ENFORCE_C_COMPILER_REV}, or set" \
|
||||
"ENFORCE_C_COMPILER_REV=${C_COMPILER_REV}."
|
||||
@exit 1
|
||||
dummy_target_to_enforce_c_compiler_rev:=\
|
||||
$(info WARNING: You are using cc version ${C_COMPILER_REV} \
|
||||
and should be using version ${ENFORCE_C_COMPILER_REV})
|
||||
endif
|
||||
|
||||
# Fail the build if __fabsf is used. __fabsf exists only in Solaris 8 2/04
|
||||
@ -90,20 +100,44 @@ SOLARIS_7_OR_LATER := \
|
||||
$(shell uname -r | awk -F. '{ if ($$2 >= 7) print "-DSOLARIS_7_OR_LATER"; }')
|
||||
CFLAGS += ${SOLARIS_7_OR_LATER}
|
||||
|
||||
ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
|
||||
# set ARCHFLAG/BUILDARCH which will ultimately be ARCHFLAG
|
||||
# New architecture options started in SS12 (5.9), we need both styles to build.
|
||||
# The older arch options for SS11 (5.8) or older and also for /usr/ccs/bin/as.
|
||||
# Note: SS12 default for 32bit sparc is now the same as v8plus, so the
|
||||
# settings below have changed all SS12 32bit sparc builds to be v8plus.
|
||||
# The older SS11 (5.8) settings have remained as they always have been.
|
||||
ifeq ($(TYPE),COMPILER2)
|
||||
ARCHFLAG/sparc = -xarch=v8plus
|
||||
ARCHFLAG_OLD/sparc = -xarch=v8plus
|
||||
else
|
||||
ifeq ($(TYPE),TIERED)
|
||||
ARCHFLAG/sparc = -xarch=v8plus
|
||||
ifeq ($(TYPE),TIERED)
|
||||
ARCHFLAG_OLD/sparc = -xarch=v8plus
|
||||
else
|
||||
ARCHFLAG_OLD/sparc = -xarch=v8
|
||||
endif
|
||||
endif
|
||||
ARCHFLAG_NEW/sparc = -m32 -xarch=sparc
|
||||
ARCHFLAG_OLD/sparcv9 = -xarch=v9
|
||||
ARCHFLAG_NEW/sparcv9 = -m64 -xarch=sparc
|
||||
ARCHFLAG_OLD/i486 =
|
||||
ARCHFLAG_NEW/i486 = -m32
|
||||
ARCHFLAG_OLD/amd64 = -xarch=amd64
|
||||
ARCHFLAG_NEW/amd64 = -m64
|
||||
|
||||
# Select the ARCHFLAGs and other SS12 (5.9) options
|
||||
ifeq ($(shell expr $(COMPILER_REV) \>= 5.9), 1)
|
||||
ARCHFLAG/sparc = $(ARCHFLAG_NEW/sparc)
|
||||
ARCHFLAG/sparcv9 = $(ARCHFLAG_NEW/sparcv9)
|
||||
ARCHFLAG/i486 = $(ARCHFLAG_NEW/i486)
|
||||
ARCHFLAG/amd64 = $(ARCHFLAG_NEW/amd64)
|
||||
else
|
||||
ARCHFLAG/sparc = -xarch=v8
|
||||
ARCHFLAG/sparc = $(ARCHFLAG_OLD/sparc)
|
||||
ARCHFLAG/sparcv9 = $(ARCHFLAG_OLD/sparcv9)
|
||||
ARCHFLAG/i486 = $(ARCHFLAG_OLD/i486)
|
||||
ARCHFLAG/amd64 = $(ARCHFLAG_OLD/amd64)
|
||||
endif
|
||||
endif
|
||||
ARCHFLAG/sparcv9 = -xarch=v9
|
||||
ARCHFLAG/i486 =
|
||||
ARCHFLAG/amd64 = -xarch=amd64
|
||||
|
||||
# ARCHFLAGS for the current build arch
|
||||
ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
|
||||
AS_ARCHFLAG = $(ARCHFLAG_OLD/$(BUILDARCH))
|
||||
|
||||
# Optional sub-directory in /usr/lib where BUILDARCH libraries are kept.
|
||||
ISA_DIR=$(ISA_DIR/$(BUILDARCH))
|
||||
@ -166,13 +200,13 @@ endif # 32bit x86
|
||||
|
||||
ifeq ("${Platform_arch_model}", "x86_64")
|
||||
|
||||
ASFLAGS += -xarch=amd64
|
||||
CFLAGS += -xarch=amd64
|
||||
ASFLAGS += $(AS_ARCHFLAG)
|
||||
CFLAGS += $(ARCHFLAG/amd64)
|
||||
# this one seemed useless
|
||||
LFLAGS_VM += -xarch=amd64
|
||||
LFLAGS_VM += $(ARCHFLAG/amd64)
|
||||
# this one worked
|
||||
LFLAGS += -xarch=amd64
|
||||
AOUT_FLAGS += -xarch=amd64
|
||||
LFLAGS += $(ARCHFLAG/amd64)
|
||||
AOUT_FLAGS += $(ARCHFLAG/amd64)
|
||||
|
||||
# -xO3 is faster than -xO4 on specjbb with SS10 compiler
|
||||
OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS)
|
||||
@ -224,7 +258,7 @@ LFLAGS += -library=%none
|
||||
|
||||
LFLAGS += -mt
|
||||
|
||||
endif # COMPILER_REV >= VALIDATED_COMPILER_REV
|
||||
endif # COMPILER_REV >= 5.5
|
||||
|
||||
######################################
|
||||
# End 5.5 Forte compiler options #
|
||||
@ -293,7 +327,7 @@ PICFLAG/BYFILE = $(PICFLAG/$@)$(PICFLAG/DEFAULT$(PICFLAG/$@))
|
||||
LFLAGS += -library=Crun
|
||||
LIBS += -library=Crun -lCrun
|
||||
|
||||
endif # COMPILER_REV >= VALIDATED_COMPILER_REV
|
||||
endif # COMPILER_REV == 5.2
|
||||
|
||||
##################################
|
||||
# End 5.2 Forte compiler options #
|
||||
@ -320,6 +354,7 @@ ifeq (${COMPILER_REV}, 5.0)
|
||||
|
||||
# Had to hoist this higher apparently because of other changes. Must
|
||||
# come before -xarch specification.
|
||||
# NOTE: native says optimize for the machine doing the compile, bad news.
|
||||
CFLAGS += -xtarget=native
|
||||
|
||||
CFLAGS += $(ARCHFLAG)
|
||||
@ -359,7 +394,7 @@ CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_x86/vm/solaris_x86_32.il
|
||||
endif # 32bit x86
|
||||
|
||||
# The following options run into misaligned ldd problem (raj)
|
||||
#OPT_CFLAGS = -fast -O4 -xarch=v8 -xchip=ultra
|
||||
#OPT_CFLAGS = -fast -O4 $(ARCHFLAG/sparc) -xchip=ultra
|
||||
|
||||
# no more exceptions
|
||||
CFLAGS/NOEX=-noex
|
||||
@ -427,6 +462,15 @@ DEBUG_CFLAGS = -g
|
||||
FASTDEBUG_CFLAGS = -g0
|
||||
# The -g0 setting allows the C++ frontend to inline, which is a big win.
|
||||
|
||||
# Special global options for SS12
|
||||
ifeq ($(COMPILER_REV),5.9)
|
||||
# There appears to be multiple issues with the new Dwarf2 debug format, so
|
||||
# we tell the compiler to use the older 'stabs' debug format all the time.
|
||||
# Note that this needs to be used in optimized compiles too to be 100%.
|
||||
# This is a workaround for SS12 (5.9) bug 6694600
|
||||
CFLAGS += -xdebugformat=stabs
|
||||
endif
|
||||
|
||||
# Enable the following CFLAGS additions if you need to compare the
|
||||
# built ELF objects.
|
||||
#
|
||||
|
@ -23,7 +23,7 @@
|
||||
#
|
||||
|
||||
Obj_Files += solaris_sparc.o
|
||||
ASFLAGS += $(ARCHFLAG)
|
||||
ASFLAGS += $(AS_ARCHFLAG)
|
||||
|
||||
ifeq ("${Platform_compiler}", "sparcWorks")
|
||||
ifeq ($(shell expr $(COMPILER_REV) \< 5.5), 1)
|
||||
|
Loading…
Reference in New Issue
Block a user