提交 5b60b5aa 编写于 作者: O ohair

6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)

Summary: Changes to support building with SS12.
Reviewed-by: tbell
上级 2fad7f7d
...@@ -197,7 +197,6 @@ endif ...@@ -197,7 +197,6 @@ endif
# Lint Flags: # Lint Flags:
# -Xa ANSI C plus K&R, favor ANSI rules # -Xa ANSI C plus K&R, favor ANSI rules
# -Xarch=XXX Same as 'cc -xarch=XXX'
# -fd report on old style func defs # -fd report on old style func defs
# -errchk=structarg report on 64bit struct args by value # -errchk=structarg report on 64bit struct args by value
# -errchk=longptr64 report on 64bit to 32bit issues (ignores casts) # -errchk=longptr64 report on 64bit to 32bit issues (ignores casts)
...@@ -206,6 +205,7 @@ endif ...@@ -206,6 +205,7 @@ endif
# -x suppress unused externs # -x suppress unused externs
# -u suppress extern func/vars used/defined # -u suppress extern func/vars used/defined
# -errfmt=simple use one line errors with position info # -errfmt=simple use one line errors with position info
# $(LINT_XARCH_OPTION) See Compiler-sun.gwk
LINTFLAGS_COMMON = -Xa LINTFLAGS_COMMON = -Xa
LINTFLAGS_COMMON += -fd LINTFLAGS_COMMON += -fd
...@@ -224,42 +224,12 @@ LINTFLAGS_DBG = ...@@ -224,42 +224,12 @@ LINTFLAGS_DBG =
# Tell the compilers to never generate globalized names, all the time. # Tell the compilers to never generate globalized names, all the time.
CFLAGS_COMMON += -W0,-noglobal CFLAGS_COMMON += -W0,-noglobal
# Arch specific settings (determines type of .o files and instruction set) # If we have a specific arch value to use, add it
ifeq ($(ARCH_FAMILY), sparc) CFLAGS_COMMON += $(XARCH_OPTION)
ifdef VIS_NEEDED CXXFLAGS_COMMON += $(XARCH_OPTION)
XARCH_VALUE/32=v8plusa ASFLAGS_COMMON += $(AS_XARCH_OPTION)
XARCH_VALUE/64=v9a EXTRA_LIBS += $(XARCH_OPTION)
else LINTFLAGS_COMMON += $(LINT_XARCH_OPTION)
# Someday this should change to improve optimization on UltraSPARC
# and abandon the old v8-only machines like the SPARCstation 10.
# Indications with Mustang is that alacrity runs do not show a
# big improvement using v8plus over v8, but other benchmarks might.
XARCH_VALUE/32=v8
XARCH_VALUE/64=v9
endif
endif
ifeq ($(ARCH_FAMILY), i586)
XARCH_VALUE/64=amd64
XARCH_VALUE/32=
endif
# Arch value based on current data model being built
XARCH_VALUE=$(XARCH_VALUE/$(ARCH_DATA_MODEL))
ifneq ($(XARCH_VALUE), )
# The actual compiler -xarch options to use
XARCH_OPTION/32 = -xarch=$(XARCH_VALUE/32)
XARCH_OPTION/64 = -xarch=$(XARCH_VALUE/64)
XARCH_OPTION = $(XARCH_OPTION/$(ARCH_DATA_MODEL))
endif
# If we have a specific -xarch value to use, add it
ifdef XARCH_OPTION
CFLAGS_COMMON += $(XARCH_OPTION)
CXXFLAGS_COMMON += $(XARCH_OPTION)
ASFLAGS_COMMON += $(XARCH_OPTION)
EXTRA_LIBS += $(XARCH_OPTION)
LINTFLAGS_COMMON += -Xarch=$(XARCH_VALUE)
endif
# #
# uncomment the following to build with PERTURBALOT set # uncomment the following to build with PERTURBALOT set
......
...@@ -31,6 +31,9 @@ COMPILER_NAME=Sun Studio ...@@ -31,6 +31,9 @@ COMPILER_NAME=Sun Studio
# Sun Studio Compiler settings specific to Solaris # Sun Studio Compiler settings specific to Solaris
ifeq ($(PLATFORM), solaris) ifeq ($(PLATFORM), solaris)
# FIXUP: Change to SS12 when validated
#COMPILER_VERSION=SS12
#REQUIRED_CC_VER=5.9
COMPILER_VERSION=SS11 COMPILER_VERSION=SS11
REQUIRED_CC_VER=5.8 REQUIRED_CC_VER=5.8
CC = $(COMPILER_PATH)cc CC = $(COMPILER_PATH)cc
...@@ -51,8 +54,8 @@ endif ...@@ -51,8 +54,8 @@ endif
# Sun Studio Compiler settings specific to Linux # Sun Studio Compiler settings specific to Linux
ifeq ($(PLATFORM), linux) ifeq ($(PLATFORM), linux)
# This has not been tested # This has not been tested
COMPILER_VERSION=SS11 COMPILER_VERSION=SS12
REQUIRED_CC_VER=5.8 REQUIRED_CC_VER=5.9
CC = $(COMPILER_PATH)cc CC = $(COMPILER_PATH)cc
CPP = $(COMPILER_PATH)cc -E CPP = $(COMPILER_PATH)cc -E
CXX = $(COMPILER_PATH)CC CXX = $(COMPILER_PATH)CC
...@@ -74,3 +77,58 @@ endif ...@@ -74,3 +77,58 @@ endif
_CC_VER :=$(shell $(CC) -V 2>&1 | $(HEAD) -n 1) _CC_VER :=$(shell $(CC) -V 2>&1 | $(HEAD) -n 1)
CC_VER :=$(call GetVersion,"$(_CC_VER)") CC_VER :=$(call GetVersion,"$(_CC_VER)")
# Arch specific settings (determines type of .o files and instruction set)
# Starting in SS12 (5.9), the arch options changed.
# The assembler /usr/ccs/bin/as wants older SS11 (5.8) style options.
# Note: We need to have both 32 and 64 values at all times for awt Makefiles.
#
XARCH_OPTION_OLD/32 =
XARCH_OPTION_OLD/64 =
XARCH_OPTION_NEW/32 = -m32
XARCH_OPTION_NEW/64 = -m64
# Lint options are slightly different
LINT_XARCH_OPTION_OLD/32 =
LINT_XARCH_OPTION_OLD/64 =
LINT_XARCH_OPTION_NEW/32 = -m32
LINT_XARCH_OPTION_NEW/64 = -m64
ifeq ($(ARCH_FAMILY), sparc)
ifdef VIS_NEEDED
XARCH_OPTION_OLD/32 += -xarch=v8plusa
XARCH_OPTION_OLD/64 += -xarch=v9a
XARCH_OPTION_NEW/32 += -xarch=sparcvis
XARCH_OPTION_NEW/64 += -xarch=sparcvis
else
# Someday this should change to improve optimization on UltraSPARC
# and abandon v8, even change to sparcvis or sparcvis2, this
# abandons machines like the SPARCstation 10.
# Indications with jdk6 is that alacrity runs do not show a
# big improvement using v8plus over v8, but other benchmarks might.
XARCH_OPTION_OLD/32 += -xarch=v8
XARCH_OPTION_OLD/64 += -xarch=v9
# Note that this new option (SS12+) effectively means v8plus
XARCH_OPTION_NEW/32 += -xarch=sparc
XARCH_OPTION_NEW/64 += -xarch=sparc
endif
LINT_XARCH_OPTION_OLD/64 += -Xarch=v9
endif
ifeq ($(ARCH_FAMILY), i586)
XARCH_OPTION_OLD/64 += -xarch=amd64
LINT_XARCH_OPTION_OLD/64 += -Xarch=amd64
endif
# Pick the options we want based on the compiler being used.
ifeq ($(shell expr $(CC_VER) \>= 5.9), 1)
XARCH_OPTION/32 = $(XARCH_OPTION_NEW/32)
XARCH_OPTION/64 = $(XARCH_OPTION_NEW/64)
LINT_XARCH_OPTION/32 = $(LINT_XARCH_OPTION_NEW/32)
LINT_XARCH_OPTION/64 = $(LINT_XARCH_OPTION_NEW/64)
else
XARCH_OPTION/32 = $(XARCH_OPTION_OLD/32)
XARCH_OPTION/64 = $(XARCH_OPTION_OLD/64)
LINT_XARCH_OPTION/32 = $(LINT_XARCH_OPTION_OLD/32)
LINT_XARCH_OPTION/64 = $(LINT_XARCH_OPTION_OLD/64)
endif
XARCH_OPTION = $(XARCH_OPTION/$(ARCH_DATA_MODEL))
LINT_XARCH_OPTION = $(LINT_XARCH_OPTION/$(ARCH_DATA_MODEL))
# The /usr/ccs/bin/as assembler always wants the older SS11 (5.8) options.
AS_XARCH_OPTION = $(XARCH_OPTION_OLD/$(ARCH_DATA_MODEL))
...@@ -119,7 +119,7 @@ if [ "${osname}" = SunOS ] ; then ...@@ -119,7 +119,7 @@ if [ "${osname}" = SunOS ] ; then
# System place where JDK installed images are stored? # System place where JDK installed images are stored?
jdk_instances=/usr/jdk/instances jdk_instances=/usr/jdk/instances
# Get the SS11 compilers (and latest patches for them too) # Get the Sun Studio compilers (and latest patches for them too)
if [ "${ALT_COMPILER_PATH}" = "" ] ; then if [ "${ALT_COMPILER_PATH}" = "" ] ; then
ALT_COMPILER_PATH=/opt/SUNWspro/bin ALT_COMPILER_PATH=/opt/SUNWspro/bin
export ALT_COMPILER_PATH export ALT_COMPILER_PATH
......
...@@ -133,9 +133,15 @@ if [ "${osname}" = SunOS ] ; then ...@@ -133,9 +133,15 @@ if [ "${osname}" = SunOS ] ; then
solaris_arch=i386 solaris_arch=i386
fi fi
# Get the SS11 compilers into path (make sure it matches ALT setting) # Get the compilers into path (make sure it matches ALT setting)
compiler_path=${jdk_devtools}/${solaris_arch}/SUNWspro/SS11/bin if [ "${JPRT_SOLARIS_COMPILER_NAME}" != "" ] ; then
compiler_name=SS11 compiler_name=${JPRT_SOLARIS_COMPILER_NAME}
else
# FIXUP: Change to SS12 when validated
#compiler_name=SS12
compiler_name=SS11
fi
compiler_path=${jdk_devtools}/${solaris_arch}/SUNWspro/${compiler_name}/bin
ALT_COMPILER_PATH="${compiler_path}" ALT_COMPILER_PATH="${compiler_path}"
export ALT_COMPILER_PATH export ALT_COMPILER_PATH
dirMustExist "${compiler_path}" ALT_COMPILER_PATH dirMustExist "${compiler_path}" ALT_COMPILER_PATH
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册