Mercurial > hg > truffle
annotate make/solaris/makefiles/sparcWorks.make @ 1972:f95d63e2154a
6989984: Use standard include model for Hospot
Summary: Replaced MakeDeps and the includeDB files with more standardized solutions.
Reviewed-by: coleenp, kvn, kamg
author | stefank |
---|---|
date | Tue, 23 Nov 2010 13:22:55 -0800 |
parents | 22cace5e30b5 |
children | c760f78e0a53 |
rev | line source |
---|---|
0 | 1 # |
1972 | 2 # Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. |
0 | 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 | |
7 # published by the Free Software Foundation. | |
8 # | |
9 # This code is distributed in the hope that it will be useful, but WITHOUT | |
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
12 # version 2 for more details (a copy is included in the LICENSE file that | |
13 # accompanied this code). | |
14 # | |
15 # You should have received a copy of the GNU General Public License version | |
16 # 2 along with this work; if not, write to the Free Software Foundation, | |
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
18 # | |
1552
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1547
diff
changeset
|
19 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1547
diff
changeset
|
20 # or visit www.oracle.com if you need additional information or have any |
c18cbe5936b8
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
1547
diff
changeset
|
21 # questions. |
0 | 22 # |
23 # | |
24 | |
25 # Compiler-specific flags for sparcworks. | |
26 | |
27 # tell make which C and C++ compilers to use | |
28 CC = cc | |
29 CPP = CC | |
30 | |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
31 # Note that this 'as' is an older version of the Sun Studio 'fbe', and will |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
32 # use the older style options. The 'fbe' options will match 'cc' and 'CC'. |
0 | 33 AS = /usr/ccs/bin/as |
34 | |
35 NM = /usr/ccs/bin/nm | |
36 NAWK = /bin/nawk | |
37 | |
38 REORDER_FLAG = -xF | |
39 | |
40 # Check for the versions of C++ and C compilers ($CPP and $CC) used. | |
41 | |
42 # Get the last thing on the line that looks like x.x+ (x is a digit). | |
43 COMPILER_REV := \ | |
430
4d20a3aaf1ab
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
278
diff
changeset
|
44 $(shell $(CPP) -V 2>&1 | sed -n 's/^.*[ ,\t]C++[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p') |
0 | 45 C_COMPILER_REV := \ |
430
4d20a3aaf1ab
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
278
diff
changeset
|
46 $(shell $(CC) -V 2>&1 | sed -n 's/^.*[ ,\t]C[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p') |
0 | 47 |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
48 # Pick which compiler is validated |
724
2bf529ef0adb
6831323: Use v8plus as minimum required hardware for current Hotspot sources
kvn
parents:
430
diff
changeset
|
49 ifeq ($(JRE_RELEASE_VER),1.6.0) |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
50 # Validated compiler for JDK6 is SS11 (5.8) |
1547
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
51 VALIDATED_COMPILER_REVS := 5.8 |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
52 VALIDATED_C_COMPILER_REVS := 5.8 |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
53 else |
1834
22cace5e30b5
6983296: build sanity checks for jdk7 should require SS12u1
jcoomes
parents:
1687
diff
changeset
|
54 # Validated compiler for JDK7 is SS12 update 1 + patches (5.10) |
22cace5e30b5
6983296: build sanity checks for jdk7 should require SS12u1
jcoomes
parents:
1687
diff
changeset
|
55 VALIDATED_COMPILER_REVS := 5.10 |
22cace5e30b5
6983296: build sanity checks for jdk7 should require SS12u1
jcoomes
parents:
1687
diff
changeset
|
56 VALIDATED_C_COMPILER_REVS := 5.10 |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
57 endif |
0 | 58 |
1547
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
59 # Warning messages about not using the above validated versions |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
60 ENFORCE_COMPILER_REV${ENFORCE_COMPILER_REV} := $(strip ${VALIDATED_COMPILER_REVS}) |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
61 ifeq ($(filter ${ENFORCE_COMPILER_REV},${COMPILER_REV}),) |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
62 PRINTABLE_CC_REVS := $(subst $(shell echo ' '), or ,${ENFORCE_COMPILER_REV}) |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
63 dummy_var_to_enforce_compiler_rev := $(shell \ |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
64 echo >&2 WARNING: You are using CC version ${COMPILER_REV} and \ |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
65 should be using version ${PRINTABLE_CC_REVS}.; \ |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
66 echo >&2 Set ENFORCE_COMPILER_REV=${COMPILER_REV} to avoid this \ |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
67 warning.) |
0 | 68 endif |
69 | |
1547
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
70 ENFORCE_C_COMPILER_REV${ENFORCE_C_COMPILER_REV} := $(strip ${VALIDATED_C_COMPILER_REVS}) |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
71 ifeq ($(filter ${ENFORCE_C_COMPILER_REV},${C_COMPILER_REV}),) |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
72 PRINTABLE_C_REVS := $(subst $(shell echo ' '), or ,${ENFORCE_C_COMPILER_REV}) |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
73 dummy_var_to_enforce_c_compiler_rev := $(shell \ |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
74 echo >&2 WARNING: You are using cc version ${C_COMPILER_REV} and \ |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
75 should be using version ${PRINTABLE_C_REVS}.; \ |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
76 echo >&2 Set ENFORCE_C_COMPILER_REV=${C_COMPILER_REV} to avoid this \ |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
77 warning.) |
0 | 78 endif |
79 | |
430
4d20a3aaf1ab
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
278
diff
changeset
|
80 COMPILER_REV_NUMERIC := $(shell echo $(COMPILER_REV) | awk -F. '{ print $$1 * 100 + $$2 }') |
4d20a3aaf1ab
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
278
diff
changeset
|
81 |
0 | 82 # Fail the build if __fabsf is used. __fabsf exists only in Solaris 8 2/04 |
83 # and newer; objects with a dependency on this symbol will not run on older | |
84 # Solaris 8. | |
85 JVM_FAIL_IF_UNDEFINED = __fabsf | |
86 | |
87 JVM_CHECK_SYMBOLS = $(NM) -u -p $(LIBJVM.o) | \ | |
88 $(NAWK) -v f="${JVM_FAIL_IF_UNDEFINED}" \ | |
89 'BEGIN { c=split(f,s); rc=0; } \ | |
90 /:$$/ { file = $$1; } \ | |
91 /[^:]$$/ { for(n=1;n<=c;++n) { \ | |
92 if($$1==s[n]) { \ | |
93 printf("JVM_CHECK_SYMBOLS: %s contains illegal symbol %s\n", \ | |
94 file,$$1); \ | |
95 rc=1; \ | |
96 } \ | |
97 } \ | |
98 } \ | |
99 END { exit rc; }' | |
100 | |
101 LINK_LIB.CC/PRE_HOOK += $(JVM_CHECK_SYMBOLS) || exit 1; | |
102 | |
103 # Some interfaces (_lwp_create) changed with LP64 and Solaris 7 | |
104 SOLARIS_7_OR_LATER := \ | |
105 $(shell uname -r | awk -F. '{ if ($$2 >= 7) print "-DSOLARIS_7_OR_LATER"; }') | |
106 CFLAGS += ${SOLARIS_7_OR_LATER} | |
107 | |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
108 # New architecture options started in SS12 (5.9), we need both styles to build. |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
109 # The older arch options for SS11 (5.8) or older and also for /usr/ccs/bin/as. |
724
2bf529ef0adb
6831323: Use v8plus as minimum required hardware for current Hotspot sources
kvn
parents:
430
diff
changeset
|
110 # Note: default for 32bit sparc is now the same as v8plus, so the |
2bf529ef0adb
6831323: Use v8plus as minimum required hardware for current Hotspot sources
kvn
parents:
430
diff
changeset
|
111 # settings below have changed all 32bit sparc builds to be v8plus. |
2bf529ef0adb
6831323: Use v8plus as minimum required hardware for current Hotspot sources
kvn
parents:
430
diff
changeset
|
112 ARCHFLAG_OLD/sparc = -xarch=v8plus |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
113 ARCHFLAG_NEW/sparc = -m32 -xarch=sparc |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
114 ARCHFLAG_OLD/sparcv9 = -xarch=v9 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
115 ARCHFLAG_NEW/sparcv9 = -m64 -xarch=sparc |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
116 ARCHFLAG_OLD/i486 = |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
117 ARCHFLAG_NEW/i486 = -m32 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
118 ARCHFLAG_OLD/amd64 = -xarch=amd64 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
119 ARCHFLAG_NEW/amd64 = -m64 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
120 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
121 # Select the ARCHFLAGs and other SS12 (5.9) options |
430
4d20a3aaf1ab
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
278
diff
changeset
|
122 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1) |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
123 ARCHFLAG/sparc = $(ARCHFLAG_NEW/sparc) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
124 ARCHFLAG/sparcv9 = $(ARCHFLAG_NEW/sparcv9) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
125 ARCHFLAG/i486 = $(ARCHFLAG_NEW/i486) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
126 ARCHFLAG/amd64 = $(ARCHFLAG_NEW/amd64) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
127 else |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
128 ARCHFLAG/sparc = $(ARCHFLAG_OLD/sparc) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
129 ARCHFLAG/sparcv9 = $(ARCHFLAG_OLD/sparcv9) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
130 ARCHFLAG/i486 = $(ARCHFLAG_OLD/i486) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
131 ARCHFLAG/amd64 = $(ARCHFLAG_OLD/amd64) |
0 | 132 endif |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
133 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
134 # ARCHFLAGS for the current build arch |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
135 ARCHFLAG = $(ARCHFLAG/$(BUILDARCH)) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
136 AS_ARCHFLAG = $(ARCHFLAG_OLD/$(BUILDARCH)) |
0 | 137 |
138 # Optional sub-directory in /usr/lib where BUILDARCH libraries are kept. | |
139 ISA_DIR=$(ISA_DIR/$(BUILDARCH)) | |
140 ISA_DIR/sparcv9=/sparcv9 | |
141 ISA_DIR/amd64=/amd64 | |
142 | |
143 # Use these to work around compiler bugs: | |
144 OPT_CFLAGS/SLOWER=-xO3 | |
145 OPT_CFLAGS/O2=-xO2 | |
146 OPT_CFLAGS/NOOPT=-xO1 | |
147 | |
1972 | 148 # Flags for creating the dependency files. |
149 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1) | |
150 DEPFLAGS = -xMMD -xMF $(DEP_DIR)/$(@:%=%.d) | |
151 endif | |
152 | |
153 ################################################ | |
1687
fb8abd207dbe
6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents:
1552
diff
changeset
|
154 # Begin current (>=5.9) Forte compiler options # |
fb8abd207dbe
6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents:
1552
diff
changeset
|
155 ################################################# |
fb8abd207dbe
6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents:
1552
diff
changeset
|
156 |
1547
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
157 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1) |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
158 ifeq ($(Platform_arch), x86) |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
159 OPT_CFLAGS/NO_TAIL_CALL_OPT = -Wu,-O~yz |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
160 OPT_CCFLAGS/NO_TAIL_CALL_OPT = -Qoption ube -O~yz |
1687
fb8abd207dbe
6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents:
1552
diff
changeset
|
161 OPT_CFLAGS/stubGenerator_x86_32.o = $(OPT_CFLAGS) -xspace |
fb8abd207dbe
6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents:
1552
diff
changeset
|
162 OPT_CFLAGS/stubGenerator_x86_64.o = $(OPT_CFLAGS) -xspace |
1547
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
163 endif # Platform_arch == x86 |
1687
fb8abd207dbe
6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents:
1552
diff
changeset
|
164 ifeq ("${Platform_arch}", "sparc") |
fb8abd207dbe
6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents:
1552
diff
changeset
|
165 OPT_CFLAGS/stubGenerator_sparc.o = $(OPT_CFLAGS) -xspace |
fb8abd207dbe
6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents:
1552
diff
changeset
|
166 endif |
1547
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
167 endif # COMPILER_REV_NUMERIC >= 509 |
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
168 |
0 | 169 ################################################# |
170 # Begin current (>=5.6) Forte compiler options # | |
171 ################################################# | |
172 | |
430
4d20a3aaf1ab
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
278
diff
changeset
|
173 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 506), 1) |
0 | 174 |
175 ifeq ("${Platform_arch}", "sparc") | |
176 | |
177 # We MUST allow data alignment of 4 for sparc (sparcv9 is ok at 8s) | |
178 ifndef LP64 | |
179 CFLAGS += -xmemalign=4s | |
180 endif | |
181 | |
182 endif | |
183 | |
184 endif | |
185 | |
186 ################################################# | |
187 # Begin current (>=5.5) Forte compiler options # | |
188 ################################################# | |
189 | |
430
4d20a3aaf1ab
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
278
diff
changeset
|
190 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 505), 1) |
0 | 191 |
192 CFLAGS += $(ARCHFLAG) | |
193 AOUT_FLAGS += $(ARCHFLAG) | |
194 LIB_FLAGS += $(ARCHFLAG) | |
195 LFLAGS += $(ARCHFLAG) | |
196 | |
197 ifeq ("${Platform_arch}", "sparc") | |
198 | |
199 # Flags for Optimization | |
200 | |
201 # [phh] Commented out pending verification that we do indeed want | |
202 # to potentially bias against u1 and u3 targets. | |
203 #CFLAGS += -xchip=ultra2 | |
204 | |
205 OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS) | |
206 | |
207 endif # sparc | |
208 | |
209 ifeq ("${Platform_arch_model}", "x86_32") | |
210 | |
1547
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
211 OPT_CFLAGS=-xtarget=pentium -xO4 $(EXTRA_OPT_CFLAGS) |
0 | 212 |
213 endif # 32bit x86 | |
214 | |
215 ifeq ("${Platform_arch_model}", "x86_64") | |
216 | |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
217 ASFLAGS += $(AS_ARCHFLAG) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
218 CFLAGS += $(ARCHFLAG/amd64) |
0 | 219 # this one seemed useless |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
220 LFLAGS_VM += $(ARCHFLAG/amd64) |
0 | 221 # this one worked |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
222 LFLAGS += $(ARCHFLAG/amd64) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
223 AOUT_FLAGS += $(ARCHFLAG/amd64) |
0 | 224 |
225 # -xO3 is faster than -xO4 on specjbb with SS10 compiler | |
226 OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS) | |
227 | |
228 endif # 64bit x86 | |
229 | |
230 # Inline functions | |
231 CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_${Platform_arch}/vm/solaris_${Platform_arch_model}.il | |
232 | |
233 # no more exceptions | |
234 CFLAGS/NOEX=-features=no%except | |
235 | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
91
diff
changeset
|
236 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
91
diff
changeset
|
237 # avoid compilation problems arising from fact that C++ compiler tries |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
91
diff
changeset
|
238 # to search for external template definition by just compiling additional |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
91
diff
changeset
|
239 # source files in th same context |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
91
diff
changeset
|
240 CFLAGS += -template=no%extdef |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
91
diff
changeset
|
241 |
0 | 242 # Reduce code bloat by reverting back to 5.0 behavior for static initializers |
243 CFLAGS += -features=no%split_init | |
244 | |
245 # Use -D_Crun_inline_placement so we don't get references to | |
246 # __1c2n6FIpv_0_ or void*operator new(unsigned,void*) | |
247 # This avoids the hard requirement of the newer Solaris C++ runtime patches. | |
248 # NOTE: This is an undocumented feature of the SS10 compiler. See 6306698. | |
249 CFLAGS += -D_Crun_inline_placement | |
250 | |
251 # PIC is safer for SPARC, and is considerably slower | |
252 # a file foo.o which wants to compile -pic can set "PICFLAG/foo.o = -PIC" | |
253 PICFLAG = -KPIC | |
254 PICFLAG/DEFAULT = $(PICFLAG) | |
255 # [RGV] Need to figure which files to remove to get link to work | |
256 #PICFLAG/BETTER = -pic | |
257 PICFLAG/BETTER = $(PICFLAG/DEFAULT) | |
258 PICFLAG/BYFILE = $(PICFLAG/$@)$(PICFLAG/DEFAULT$(PICFLAG/$@)) | |
259 | |
260 # Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file. | |
261 MAPFLAG = -M FILENAME | |
262 | |
263 # Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj | |
264 SONAMEFLAG = -h SONAME | |
265 | |
266 # Build shared library | |
267 SHARED_FLAG = -G | |
268 | |
269 # We don't need libCstd.so and librwtools7.so, only libCrun.so | |
270 CFLAGS += -library=%none | |
271 LFLAGS += -library=%none | |
272 | |
273 LFLAGS += -mt | |
274 | |
430
4d20a3aaf1ab
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
278
diff
changeset
|
275 endif # COMPILER_REV_NUMERIC >= 505 |
0 | 276 |
277 ###################################### | |
278 # End 5.5 Forte compiler options # | |
279 ###################################### | |
280 | |
281 ###################################### | |
282 # Begin 5.2 Forte compiler options # | |
283 ###################################### | |
284 | |
430
4d20a3aaf1ab
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
278
diff
changeset
|
285 ifeq ($(COMPILER_REV_NUMERIC), 502) |
0 | 286 |
287 CFLAGS += $(ARCHFLAG) | |
288 AOUT_FLAGS += $(ARCHFLAG) | |
289 LIB_FLAGS += $(ARCHFLAG) | |
290 LFLAGS += $(ARCHFLAG) | |
291 | |
292 ifeq ("${Platform_arch}", "sparc") | |
293 | |
294 # Flags for Optimization | |
295 | |
296 # [phh] Commented out pending verification that we do indeed want | |
297 # to potentially bias against u1 and u3 targets. | |
298 #CFLAGS += -xchip=ultra2 | |
299 | |
300 ifdef LP64 | |
301 # SC5.0 tools on v9 are flakey at -xO4 | |
302 # [phh] Is this still true for 6.1? | |
303 OPT_CFLAGS=-xO3 $(EXTRA_OPT_CFLAGS) | |
304 else | |
305 OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS) | |
306 endif | |
307 | |
308 endif # sparc | |
309 | |
310 ifeq ("${Platform_arch_model}", "x86_32") | |
311 | |
312 OPT_CFLAGS=-xtarget=pentium $(EXTRA_OPT_CFLAGS) | |
313 | |
314 # SC5.0 tools on x86 are flakey at -xO4 | |
315 # [phh] Is this still true for 6.1? | |
316 OPT_CFLAGS+=-xO3 | |
317 | |
318 endif # 32bit x86 | |
319 | |
320 # no more exceptions | |
321 CFLAGS/NOEX=-noex | |
322 | |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
844
diff
changeset
|
323 # Inline functions |
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
844
diff
changeset
|
324 CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_${Platform_arch}/vm/solaris_${Platform_arch_model}.il |
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
844
diff
changeset
|
325 |
0 | 326 # Reduce code bloat by reverting back to 5.0 behavior for static initializers |
327 CFLAGS += -Qoption ccfe -one_static_init | |
328 | |
329 # PIC is safer for SPARC, and is considerably slower | |
330 # a file foo.o which wants to compile -pic can set "PICFLAG/foo.o = -PIC" | |
331 PICFLAG = -KPIC | |
332 PICFLAG/DEFAULT = $(PICFLAG) | |
333 # [RGV] Need to figure which files to remove to get link to work | |
334 #PICFLAG/BETTER = -pic | |
335 PICFLAG/BETTER = $(PICFLAG/DEFAULT) | |
336 PICFLAG/BYFILE = $(PICFLAG/$@)$(PICFLAG/DEFAULT$(PICFLAG/$@)) | |
337 | |
1123
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
844
diff
changeset
|
338 # Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file. |
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
844
diff
changeset
|
339 MAPFLAG = -M FILENAME |
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
844
diff
changeset
|
340 |
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
844
diff
changeset
|
341 # Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj |
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
844
diff
changeset
|
342 SONAMEFLAG = -h SONAME |
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
844
diff
changeset
|
343 |
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
844
diff
changeset
|
344 # Build shared library |
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
844
diff
changeset
|
345 SHARED_FLAG = -G |
167c2986d91b
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
844
diff
changeset
|
346 |
0 | 347 # Would be better if these weren't needed, since we link with CC, but |
348 # at present removing them causes run-time errors | |
349 LFLAGS += -library=Crun | |
350 LIBS += -library=Crun -lCrun | |
351 | |
430
4d20a3aaf1ab
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
278
diff
changeset
|
352 endif # COMPILER_REV_NUMERIC == 502 |
0 | 353 |
354 ################################## | |
355 # End 5.2 Forte compiler options # | |
356 ################################## | |
357 | |
358 ################################## | |
359 # Begin old 5.1 compiler options # | |
360 ################################## | |
430
4d20a3aaf1ab
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
278
diff
changeset
|
361 ifeq ($(COMPILER_REV_NUMERIC), 501) |
0 | 362 |
363 _JUNK_ := $(shell echo >&2 \ | |
364 "*** ERROR: sparkWorks.make incomplete for 5.1 compiler") | |
365 @exit 1 | |
366 endif | |
367 ################################## | |
368 # End old 5.1 compiler options # | |
369 ################################## | |
370 | |
371 ################################## | |
372 # Begin old 5.0 compiler options # | |
373 ################################## | |
374 | |
430
4d20a3aaf1ab
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
278
diff
changeset
|
375 ifeq (${COMPILER_REV_NUMERIC}, 500) |
0 | 376 |
377 # Had to hoist this higher apparently because of other changes. Must | |
378 # come before -xarch specification. | |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
379 # NOTE: native says optimize for the machine doing the compile, bad news. |
0 | 380 CFLAGS += -xtarget=native |
381 | |
382 CFLAGS += $(ARCHFLAG) | |
383 AOUT_FLAGS += $(ARCHFLAG) | |
384 LIB_FLAGS += $(ARCHFLAG) | |
385 LFLAGS += $(ARCHFLAG) | |
386 | |
387 CFLAGS += -library=iostream | |
388 LFLAGS += -library=iostream -library=Crun | |
389 LIBS += -library=iostream -library=Crun -lCrun | |
390 | |
391 # Flags for Optimization | |
392 ifdef LP64 | |
393 # SC5.0 tools on v9 are flakey at -xO4 | |
394 OPT_CFLAGS=-xO3 $(EXTRA_OPT_CFLAGS) | |
395 else | |
396 OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS) | |
397 endif | |
398 | |
399 ifeq ("${Platform_arch}", "sparc") | |
400 | |
401 CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.il | |
402 | |
403 endif # sparc | |
404 | |
405 ifeq ("${Platform_arch_model}", "x86_32") | |
406 OPT_CFLAGS=-xtarget=pentium $(EXTRA_OPT_CFLAGS) | |
430
4d20a3aaf1ab
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
278
diff
changeset
|
407 ifeq ("${COMPILER_REV_NUMERIC}", "500") |
0 | 408 # SC5.0 tools on x86 are flakey at -xO4 |
409 OPT_CFLAGS+=-xO3 | |
410 else | |
411 OPT_CFLAGS+=-xO4 | |
412 endif | |
413 | |
414 CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_x86/vm/solaris_x86_32.il | |
415 | |
416 endif # 32bit x86 | |
417 | |
418 # The following options run into misaligned ldd problem (raj) | |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
419 #OPT_CFLAGS = -fast -O4 $(ARCHFLAG/sparc) -xchip=ultra |
0 | 420 |
421 # no more exceptions | |
422 CFLAGS/NOEX=-noex | |
423 | |
424 # PIC is safer for SPARC, and is considerably slower | |
425 # a file foo.o which wants to compile -pic can set "PICFLAG/foo.o = -PIC" | |
426 PICFLAG = -PIC | |
427 PICFLAG/DEFAULT = $(PICFLAG) | |
428 # [RGV] Need to figure which files to remove to get link to work | |
429 #PICFLAG/BETTER = -pic | |
430 PICFLAG/BETTER = $(PICFLAG/DEFAULT) | |
431 PICFLAG/BYFILE = $(PICFLAG/$@)$(PICFLAG/DEFAULT$(PICFLAG/$@)) | |
432 | |
430
4d20a3aaf1ab
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
278
diff
changeset
|
433 endif # COMPILER_REV_NUMERIC = 500 |
0 | 434 |
435 ################################ | |
436 # End old 5.0 compiler options # | |
437 ################################ | |
438 | |
430
4d20a3aaf1ab
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
278
diff
changeset
|
439 ifeq ("${COMPILER_REV_NUMERIC}", "402") |
0 | 440 # 4.2 COMPILERS SHOULD NO LONGER BE USED |
441 _JUNK_ := $(shell echo >&2 \ | |
442 "*** ERROR: SC4.2 compilers are not supported by this code base!") | |
443 @exit 1 | |
444 endif | |
445 | |
446 # do not include shared lib path in a.outs | |
447 AOUT_FLAGS += -norunpath | |
448 LFLAGS_VM = -norunpath -z noversion | |
449 | |
450 # need position-indep-code for shared libraries | |
451 # (ild appears to get errors on PIC code, so we'll try non-PIC for debug) | |
452 ifeq ($(PICFLAGS),DEFAULT) | |
453 VM_PICFLAG/LIBJVM = $(PICFLAG/DEFAULT) | |
454 else | |
455 VM_PICFLAG/LIBJVM = $(PICFLAG/BYFILE) | |
456 endif | |
457 VM_PICFLAG/AOUT = | |
458 | |
459 VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO)) | |
460 CFLAGS += $(VM_PICFLAG) | |
461 | |
462 # less dynamic linking (no PLTs, please) | |
463 #LIB_FLAGS += $(LINK_MODE) | |
464 # %%%%% despite -znodefs, -Bsymbolic gets link errors -- Rose | |
465 | |
466 LINK_MODE = $(LINK_MODE/$(VERSION)) | |
467 LINK_MODE/debug = | |
468 LINK_MODE/optimized = -Bsymbolic -znodefs | |
469 | |
470 # Have thread local errnos | |
430
4d20a3aaf1ab
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
278
diff
changeset
|
471 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 505), 1) |
0 | 472 CFLAGS += -mt |
473 else | |
474 CFLAGS += -D_REENTRANT | |
475 endif | |
476 | |
477 ifdef CC_INTERP | |
478 # C++ Interpreter | |
479 CFLAGS += -DCC_INTERP | |
480 endif | |
481 | |
482 # Flags for Debugging | |
483 DEBUG_CFLAGS = -g | |
484 FASTDEBUG_CFLAGS = -g0 | |
485 # The -g0 setting allows the C++ frontend to inline, which is a big win. | |
486 | |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
487 # Special global options for SS12 |
1547
fb1a39993f69
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
1123
diff
changeset
|
488 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1) |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
489 # There appears to be multiple issues with the new Dwarf2 debug format, so |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
490 # we tell the compiler to use the older 'stabs' debug format all the time. |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
491 # Note that this needs to be used in optimized compiles too to be 100%. |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
492 # This is a workaround for SS12 (5.9) bug 6694600 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
493 CFLAGS += -xdebugformat=stabs |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
494 endif |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
495 |
0 | 496 # Enable the following CFLAGS additions if you need to compare the |
497 # built ELF objects. | |
498 # | |
499 # The -g option makes static data global and the "-Qoption ccfe | |
500 # -xglobalstatic" option tells the compiler to not globalize static | |
501 # data using a unique globalization prefix. Instead force the use of | |
502 # a static globalization prefix based on the source filepath so the | |
503 # objects from two identical compilations are the same. | |
504 #DEBUG_CFLAGS += -Qoption ccfe -xglobalstatic | |
505 #FASTDEBUG_CFLAGS += -Qoption ccfe -xglobalstatic | |
506 | |
430
4d20a3aaf1ab
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
278
diff
changeset
|
507 ifeq (${COMPILER_REV_NUMERIC}, 502) |
4d20a3aaf1ab
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
278
diff
changeset
|
508 COMPILER_DATE := $(shell $(CPP) -V 2>&1 | sed -n '/^.*[ ]C++[ ]\([1-9]\.[0-9][0-9]*\)/p' | awk '{ print $$NF; }') |
0 | 509 ifeq (${COMPILER_DATE}, 2001/01/31) |
510 # disable -g0 in fastdebug since SC6.1 dated 2001/01/31 seems to be buggy | |
511 # use an innocuous value because it will get -g if it's empty | |
512 FASTDEBUG_CFLAGS = -c | |
513 endif | |
514 endif | |
515 | |
516 # Uncomment or 'gmake CFLAGS_BROWSE=-sbfast' to get source browser information. | |
517 # CFLAGS_BROWSE = -sbfast | |
518 CFLAGS += $(CFLAGS_BROWSE) | |
519 | |
520 # ILD is gone as of SS11 (5.8), not supportted in SS10 (5.7) | |
430
4d20a3aaf1ab
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
278
diff
changeset
|
521 ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \< 507), 1) |
0 | 522 # use ild when debugging (but when optimizing we want reproducible results) |
523 ILDFLAG = $(ILDFLAG/$(VERSION)) | |
524 ILDFLAG/debug = -xildon | |
525 ILDFLAG/optimized = | |
526 AOUT_FLAGS += $(ILDFLAG) | |
527 endif | |
528 | |
529 # Where to put the *.o files (a.out, or shared library)? | |
530 LINK_INTO = $(LINK_INTO/$(VERSION)) | |
531 LINK_INTO/debug = LIBJVM | |
532 LINK_INTO/optimized = LIBJVM | |
533 | |
534 # We link the debug version into the a.out because: | |
535 # 1. ild works on a.out but not shared libraries, and using ild | |
536 # can cut rebuild times by 25% for small changes. (ILD is gone in SS11) | |
537 # 2. dbx cannot gracefully set breakpoints in shared libraries | |
538 # | |
539 | |
540 # apply this setting to link into the shared library even in the debug version: | |
541 ifdef LP64 | |
542 LINK_INTO = LIBJVM | |
543 else | |
544 #LINK_INTO = LIBJVM | |
545 endif | |
546 | |
547 MCS = /usr/ccs/bin/mcs | |
548 STRIP = /usr/ccs/bin/strip | |
549 | |
550 # Solaris platforms collect lots of redundant file-ident lines, | |
551 # to the point of wasting a significant percentage of file space. | |
552 # (The text is stored in ELF .comment sections, contributed by | |
553 # all "#pragma ident" directives in header and source files.) | |
554 # This command "compresses" the .comment sections simply by | |
555 # removing repeated lines. The data can be extracted from | |
556 # binaries in the field by using "mcs -p libjvm.so" or the older | |
557 # command "what libjvm.so". | |
558 LINK_LIB.CC/POST_HOOK += $(MCS) -c $@ || exit 1; | |
559 # (The exit 1 is necessary to cause a build failure if the command fails and | |
560 # multiple commands are strung together, and the final semicolon is necessary | |
561 # since the hook must terminate itself as a valid command.) | |
562 | |
563 # Also, strip debug and line number information (worth about 1.7Mb). | |
564 STRIP_LIB.CC/POST_HOOK = $(STRIP) -x $@ || exit 1; | |
565 # STRIP_LIB.CC/POST_HOOK is incorporated into LINK_LIB.CC/POST_HOOK | |
566 # in certain configurations, such as product.make. Other configurations, | |
567 # such as debug.make, do not include the strip operation. |