author | never |
Mon, 12 Jul 2010 22:27:18 -0700 | |
changeset 5926 | a36f90d986b6 |
parent 5506 | 202f599c92aa |
child 6373 | 23ec4a141fc9 |
permissions | -rw-r--r-- |
2 | 1 |
# |
5506 | 2 |
# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
# |
|
5 |
# This code is free software; you can redistribute it and/or modify it |
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
# published by the Free Software Foundation. Oracle designates this |
2 | 8 |
# particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
# |
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
# accompanied this code). |
|
16 |
# |
|
17 |
# You should have received a copy of the GNU General Public License version |
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
# |
|
5506 | 21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
# or visit www.oracle.com if you need additional information or have any |
|
23 |
# questions. |
|
2 | 24 |
# |
25 |
||
26 |
# |
|
27 |
# Sun Studio Compiler settings |
|
28 |
# |
|
29 |
||
30 |
# Sun Studio Compiler settings specific to Solaris |
|
31 |
ifeq ($(PLATFORM), solaris) |
|
32 |
CC = $(COMPILER_PATH)cc |
|
33 |
CPP = $(COMPILER_PATH)cc -E |
|
34 |
CXX = $(COMPILER_PATH)CC |
|
35 |
LINT = $(COMPILER_PATH)lint |
|
36 |
# Option used to create a shared library |
|
37 |
SHARED_LIBRARY_FLAG = -G |
|
2158
68869a085470
6799141: Build with --hash-style=both so that binaries can work on SuSE 10
ohair
parents:
918
diff
changeset
|
38 |
GCC =$(GCC_COMPILER_PATH)gcc |
2 | 39 |
endif |
40 |
||
41 |
# Sun Studio Compiler settings specific to Linux |
|
42 |
ifeq ($(PLATFORM), linux) |
|
43 |
# This has not been tested |
|
44 |
CC = $(COMPILER_PATH)cc |
|
45 |
CPP = $(COMPILER_PATH)cc -E |
|
46 |
CXX = $(COMPILER_PATH)CC |
|
47 |
LINT = $(COMPILER_PATH)lint |
|
48 |
# statically link libstdc++ before C++ ABI is stablized on Linux |
|
49 |
STATIC_CXX = true |
|
50 |
ifeq ($(STATIC_CXX),true) |
|
51 |
# CC always dynamically links libstdc++, even we use "-Wl,-Bstatic -lstdc++" |
|
52 |
# We need to use cc to statically link the C++ runtime. |
|
53 |
CXX = $(COMPILER_PATH)cc |
|
54 |
else |
|
55 |
CXX = $(COMPILER_PATH)CC |
|
56 |
endif |
|
57 |
# Option used to create a shared library |
|
58 |
SHARED_LIBRARY_FLAG = -G |
|
59 |
endif |
|
60 |
||
61 |
# Get compiler version |
|
62 |
_CC_VER :=$(shell $(CC) -V 2>&1 | $(HEAD) -n 1) |
|
63 |
CC_VER :=$(call GetVersion,"$(_CC_VER)") |
|
2186
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
64 |
|
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
65 |
# Name of compilers being used |
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
66 |
COMPILER_VERSION-5.7 = SS10 |
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
67 |
COMPILER_NAME-5.7 = Sun Studio 10 |
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
68 |
COMPILER_VERSION-5.8 = SS11 |
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
69 |
COMPILER_NAME-5.8 = Sun Studio 11 |
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
70 |
COMPILER_VERSION-5.9 = SS12 |
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
71 |
COMPILER_NAME-5.9 = Sun Studio 12 |
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
72 |
COMPILER_VERSION-5.10 = SS13 |
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
73 |
COMPILER_NAME-5.10 = Sun Studio 13 |
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
74 |
COMPILER_VERSION = $(COMPILER_VERSION-$(CC_VER)) |
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
75 |
COMPILER_NAME = $(COMPILER_NAME-$(CC_VER)) |
53da56fa3bf9
6816311: Changes to allow builds with latest Windows SDK 6.1 on 64bit Windows 2003
ohair
parents:
2158
diff
changeset
|
76 |
|
642
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
77 |
# Arch specific settings (determines type of .o files and instruction set) |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
78 |
# Starting in SS12 (5.9), the arch options changed. |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
79 |
# The assembler /usr/ccs/bin/as wants older SS11 (5.8) style options. |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
80 |
# Note: We need to have both 32 and 64 values at all times for awt Makefiles. |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
81 |
# |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
82 |
XARCH_OPTION_OLD/32 = |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
83 |
XARCH_OPTION_OLD/64 = |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
84 |
XARCH_OPTION_NEW/32 = -m32 |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
85 |
XARCH_OPTION_NEW/64 = -m64 |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
86 |
# Lint options are slightly different |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
87 |
LINT_XARCH_OPTION_OLD/32 = |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
88 |
LINT_XARCH_OPTION_OLD/64 = |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
89 |
LINT_XARCH_OPTION_NEW/32 = -m32 |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
90 |
LINT_XARCH_OPTION_NEW/64 = -m64 |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
91 |
ifeq ($(ARCH_FAMILY), sparc) |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
92 |
ifdef VIS_NEEDED |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
93 |
XARCH_OPTION_OLD/32 += -xarch=v8plusa |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
94 |
XARCH_OPTION_OLD/64 += -xarch=v9a |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
95 |
XARCH_OPTION_NEW/32 += -xarch=sparcvis |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
96 |
XARCH_OPTION_NEW/64 += -xarch=sparcvis |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
97 |
else |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
98 |
# Someday this should change to improve optimization on UltraSPARC |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
99 |
# and abandon v8, even change to sparcvis or sparcvis2, this |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
100 |
# abandons machines like the SPARCstation 10. |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
101 |
# Indications with jdk6 is that alacrity runs do not show a |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
102 |
# big improvement using v8plus over v8, but other benchmarks might. |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
103 |
XARCH_OPTION_OLD/32 += -xarch=v8 |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
104 |
XARCH_OPTION_OLD/64 += -xarch=v9 |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
105 |
# Note that this new option (SS12+) effectively means v8plus |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
106 |
XARCH_OPTION_NEW/32 += -xarch=sparc |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
107 |
XARCH_OPTION_NEW/64 += -xarch=sparc |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
108 |
endif |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
109 |
LINT_XARCH_OPTION_OLD/64 += -Xarch=v9 |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
110 |
endif |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
111 |
ifeq ($(ARCH_FAMILY), i586) |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
112 |
XARCH_OPTION_OLD/64 += -xarch=amd64 |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
113 |
LINT_XARCH_OPTION_OLD/64 += -Xarch=amd64 |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
114 |
endif |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
115 |
# Pick the options we want based on the compiler being used. |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
116 |
ifeq ($(shell expr $(CC_VER) \>= 5.9), 1) |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
117 |
XARCH_OPTION/32 = $(XARCH_OPTION_NEW/32) |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
118 |
XARCH_OPTION/64 = $(XARCH_OPTION_NEW/64) |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
119 |
LINT_XARCH_OPTION/32 = $(LINT_XARCH_OPTION_NEW/32) |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
120 |
LINT_XARCH_OPTION/64 = $(LINT_XARCH_OPTION_NEW/64) |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
121 |
else |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
122 |
XARCH_OPTION/32 = $(XARCH_OPTION_OLD/32) |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
123 |
XARCH_OPTION/64 = $(XARCH_OPTION_OLD/64) |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
124 |
LINT_XARCH_OPTION/32 = $(LINT_XARCH_OPTION_OLD/32) |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
125 |
LINT_XARCH_OPTION/64 = $(LINT_XARCH_OPTION_OLD/64) |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
126 |
endif |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
127 |
XARCH_OPTION = $(XARCH_OPTION/$(ARCH_DATA_MODEL)) |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
128 |
LINT_XARCH_OPTION = $(LINT_XARCH_OPTION/$(ARCH_DATA_MODEL)) |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
129 |
# The /usr/ccs/bin/as assembler always wants the older SS11 (5.8) options. |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
130 |
AS_XARCH_OPTION = $(XARCH_OPTION_OLD/$(ARCH_DATA_MODEL)) |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
2
diff
changeset
|
131 |