Mercurial > hg > truffle
annotate make/solaris/makefiles/sparcWorks.make @ 419:0bf25c4807f9
6761594: framesize rounding code rounds using wrong units leading to slightly oversized frames
Reviewed-by: rasbold, kvn
author | never |
---|---|
date | Thu, 06 Nov 2008 20:00:03 -0800 |
parents | 4852f4a82e58 |
children | 4d20a3aaf1ab |
rev | line source |
---|---|
0 | 1 # |
196 | 2 # Copyright 1998-2008 Sun Microsystems, Inc. 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 # | |
19 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, | |
20 # CA 95054 USA or visit www.sun.com if you need additional information or | |
21 # have any questions. | |
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 := \ | |
44 $(shell $(CPP) -V 2>&1 | sed -e 's/^.*\([1-9]\.[0-9][0-9]*\).*/\1/') | |
45 C_COMPILER_REV := \ | |
46 $(shell $(CC) -V 2>&1 | grep -i "cc:" | sed -e 's/^.*\([1-9]\.[0-9][0-9]*\).*/\1/') | |
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 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
49 ifeq ($(JDK_MINOR_VERSION),6) |
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) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
51 VALIDATED_COMPILER_REV := 5.8 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
52 VALIDATED_C_COMPILER_REV := 5.8 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
53 else |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
54 # Validated compiler for JDK7 is SS12 (5.9) |
278
4852f4a82e58
6724668: Hotspot: Official change to Sun Studio 12 compilers on Solaris
ohair
parents:
196
diff
changeset
|
55 VALIDATED_COMPILER_REV := 5.9 |
4852f4a82e58
6724668: Hotspot: Official change to Sun Studio 12 compilers on Solaris
ohair
parents:
196
diff
changeset
|
56 VALIDATED_C_COMPILER_REV := 5.9 |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
57 endif |
0 | 58 |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
59 # Warning messages about not using the above validated version |
0 | 60 ENFORCE_COMPILER_REV${ENFORCE_COMPILER_REV} := ${VALIDATED_COMPILER_REV} |
61 ifneq (${COMPILER_REV},${ENFORCE_COMPILER_REV}) | |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
62 dummy_target_to_enforce_compiler_rev:=\ |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
63 $(info WARNING: You are using CC version ${COMPILER_REV} \ |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
64 and should be using version ${ENFORCE_COMPILER_REV}) |
0 | 65 endif |
66 | |
67 ENFORCE_C_COMPILER_REV${ENFORCE_C_COMPILER_REV} := ${VALIDATED_C_COMPILER_REV} | |
68 ifneq (${C_COMPILER_REV},${ENFORCE_C_COMPILER_REV}) | |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
69 dummy_target_to_enforce_c_compiler_rev:=\ |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
70 $(info WARNING: You are using cc version ${C_COMPILER_REV} \ |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
71 and should be using version ${ENFORCE_C_COMPILER_REV}) |
0 | 72 endif |
73 | |
74 # Fail the build if __fabsf is used. __fabsf exists only in Solaris 8 2/04 | |
75 # and newer; objects with a dependency on this symbol will not run on older | |
76 # Solaris 8. | |
77 JVM_FAIL_IF_UNDEFINED = __fabsf | |
78 | |
79 JVM_CHECK_SYMBOLS = $(NM) -u -p $(LIBJVM.o) | \ | |
80 $(NAWK) -v f="${JVM_FAIL_IF_UNDEFINED}" \ | |
81 'BEGIN { c=split(f,s); rc=0; } \ | |
82 /:$$/ { file = $$1; } \ | |
83 /[^:]$$/ { for(n=1;n<=c;++n) { \ | |
84 if($$1==s[n]) { \ | |
85 printf("JVM_CHECK_SYMBOLS: %s contains illegal symbol %s\n", \ | |
86 file,$$1); \ | |
87 rc=1; \ | |
88 } \ | |
89 } \ | |
90 } \ | |
91 END { exit rc; }' | |
92 | |
93 LINK_LIB.CC/PRE_HOOK += $(JVM_CHECK_SYMBOLS) || exit 1; | |
94 | |
95 # Some interfaces (_lwp_create) changed with LP64 and Solaris 7 | |
96 SOLARIS_7_OR_LATER := \ | |
97 $(shell uname -r | awk -F. '{ if ($$2 >= 7) print "-DSOLARIS_7_OR_LATER"; }') | |
98 CFLAGS += ${SOLARIS_7_OR_LATER} | |
99 | |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
100 # 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
|
101 # The older arch options for SS11 (5.8) or older and also for /usr/ccs/bin/as. |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
102 # Note: SS12 default for 32bit sparc is now the same as v8plus, so the |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
103 # settings below have changed all SS12 32bit sparc builds to be v8plus. |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
104 # The older SS11 (5.8) settings have remained as they always have been. |
0 | 105 ifeq ($(TYPE),COMPILER2) |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
106 ARCHFLAG_OLD/sparc = -xarch=v8plus |
0 | 107 else |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
108 ifeq ($(TYPE),TIERED) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
109 ARCHFLAG_OLD/sparc = -xarch=v8plus |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
110 else |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
111 ARCHFLAG_OLD/sparc = -xarch=v8 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
112 endif |
0 | 113 endif |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
114 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
|
115 ARCHFLAG_OLD/sparcv9 = -xarch=v9 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
116 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
|
117 ARCHFLAG_OLD/i486 = |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
118 ARCHFLAG_NEW/i486 = -m32 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
119 ARCHFLAG_OLD/amd64 = -xarch=amd64 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
120 ARCHFLAG_NEW/amd64 = -m64 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
121 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
122 # Select the ARCHFLAGs and other SS12 (5.9) options |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
123 ifeq ($(shell expr $(COMPILER_REV) \>= 5.9), 1) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
124 ARCHFLAG/sparc = $(ARCHFLAG_NEW/sparc) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
125 ARCHFLAG/sparcv9 = $(ARCHFLAG_NEW/sparcv9) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
126 ARCHFLAG/i486 = $(ARCHFLAG_NEW/i486) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
127 ARCHFLAG/amd64 = $(ARCHFLAG_NEW/amd64) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
128 else |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
129 ARCHFLAG/sparc = $(ARCHFLAG_OLD/sparc) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
130 ARCHFLAG/sparcv9 = $(ARCHFLAG_OLD/sparcv9) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
131 ARCHFLAG/i486 = $(ARCHFLAG_OLD/i486) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
132 ARCHFLAG/amd64 = $(ARCHFLAG_OLD/amd64) |
0 | 133 endif |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
134 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
135 # 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
|
136 ARCHFLAG = $(ARCHFLAG/$(BUILDARCH)) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
137 AS_ARCHFLAG = $(ARCHFLAG_OLD/$(BUILDARCH)) |
0 | 138 |
139 # Optional sub-directory in /usr/lib where BUILDARCH libraries are kept. | |
140 ISA_DIR=$(ISA_DIR/$(BUILDARCH)) | |
141 ISA_DIR/sparcv9=/sparcv9 | |
142 ISA_DIR/amd64=/amd64 | |
143 | |
144 # Use these to work around compiler bugs: | |
145 OPT_CFLAGS/SLOWER=-xO3 | |
146 OPT_CFLAGS/O2=-xO2 | |
147 OPT_CFLAGS/NOOPT=-xO1 | |
148 | |
149 ################################################# | |
150 # Begin current (>=5.6) Forte compiler options # | |
151 ################################################# | |
152 | |
153 ifeq ($(shell expr $(COMPILER_REV) \>= 5.6), 1) | |
154 | |
155 ifeq ("${Platform_arch}", "sparc") | |
156 | |
157 # We MUST allow data alignment of 4 for sparc (sparcv9 is ok at 8s) | |
158 ifndef LP64 | |
159 CFLAGS += -xmemalign=4s | |
160 endif | |
161 | |
162 endif | |
163 | |
164 endif | |
165 | |
166 ################################################# | |
167 # Begin current (>=5.5) Forte compiler options # | |
168 ################################################# | |
169 | |
170 ifeq ($(shell expr $(COMPILER_REV) \>= 5.5), 1) | |
171 | |
172 CFLAGS += $(ARCHFLAG) | |
173 AOUT_FLAGS += $(ARCHFLAG) | |
174 LIB_FLAGS += $(ARCHFLAG) | |
175 LFLAGS += $(ARCHFLAG) | |
176 | |
177 ifeq ("${Platform_arch}", "sparc") | |
178 | |
179 # Flags for Optimization | |
180 | |
181 # [phh] Commented out pending verification that we do indeed want | |
182 # to potentially bias against u1 and u3 targets. | |
183 #CFLAGS += -xchip=ultra2 | |
184 | |
185 OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS) | |
186 | |
187 endif # sparc | |
188 | |
189 ifeq ("${Platform_arch_model}", "x86_32") | |
190 | |
191 OPT_CFLAGS=-xtarget=pentium $(EXTRA_OPT_CFLAGS) | |
192 | |
193 # UBE (CC 5.5) has bug 4923569 with -xO4 | |
194 OPT_CFLAGS+=-xO3 | |
195 | |
196 endif # 32bit x86 | |
197 | |
198 ifeq ("${Platform_arch_model}", "x86_64") | |
199 | |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
200 ASFLAGS += $(AS_ARCHFLAG) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
201 CFLAGS += $(ARCHFLAG/amd64) |
0 | 202 # this one seemed useless |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
203 LFLAGS_VM += $(ARCHFLAG/amd64) |
0 | 204 # this one worked |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
205 LFLAGS += $(ARCHFLAG/amd64) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
206 AOUT_FLAGS += $(ARCHFLAG/amd64) |
0 | 207 |
208 # -xO3 is faster than -xO4 on specjbb with SS10 compiler | |
209 OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS) | |
210 | |
211 endif # 64bit x86 | |
212 | |
213 # Inline functions | |
214 CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_${Platform_arch}/vm/solaris_${Platform_arch_model}.il | |
215 | |
216 # no more exceptions | |
217 CFLAGS/NOEX=-features=no%except | |
218 | |
113
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
91
diff
changeset
|
219 |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
91
diff
changeset
|
220 # 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
|
221 # 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
|
222 # 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
|
223 CFLAGS += -template=no%extdef |
ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
91
diff
changeset
|
224 |
0 | 225 # Reduce code bloat by reverting back to 5.0 behavior for static initializers |
226 CFLAGS += -features=no%split_init | |
227 | |
228 # Use -D_Crun_inline_placement so we don't get references to | |
229 # __1c2n6FIpv_0_ or void*operator new(unsigned,void*) | |
230 # This avoids the hard requirement of the newer Solaris C++ runtime patches. | |
231 # NOTE: This is an undocumented feature of the SS10 compiler. See 6306698. | |
232 CFLAGS += -D_Crun_inline_placement | |
233 | |
234 # PIC is safer for SPARC, and is considerably slower | |
235 # a file foo.o which wants to compile -pic can set "PICFLAG/foo.o = -PIC" | |
236 PICFLAG = -KPIC | |
237 PICFLAG/DEFAULT = $(PICFLAG) | |
238 # [RGV] Need to figure which files to remove to get link to work | |
239 #PICFLAG/BETTER = -pic | |
240 PICFLAG/BETTER = $(PICFLAG/DEFAULT) | |
241 PICFLAG/BYFILE = $(PICFLAG/$@)$(PICFLAG/DEFAULT$(PICFLAG/$@)) | |
242 | |
243 # Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file. | |
244 MAPFLAG = -M FILENAME | |
245 | |
246 # Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj | |
247 SONAMEFLAG = -h SONAME | |
248 | |
249 # Build shared library | |
250 SHARED_FLAG = -G | |
251 | |
252 # We don't need libCstd.so and librwtools7.so, only libCrun.so | |
253 CFLAGS += -library=%none | |
254 LFLAGS += -library=%none | |
255 | |
256 LFLAGS += -mt | |
257 | |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
258 endif # COMPILER_REV >= 5.5 |
0 | 259 |
260 ###################################### | |
261 # End 5.5 Forte compiler options # | |
262 ###################################### | |
263 | |
264 ###################################### | |
265 # Begin 5.2 Forte compiler options # | |
266 ###################################### | |
267 | |
268 ifeq ($(COMPILER_REV), 5.2) | |
269 | |
270 CFLAGS += $(ARCHFLAG) | |
271 AOUT_FLAGS += $(ARCHFLAG) | |
272 LIB_FLAGS += $(ARCHFLAG) | |
273 LFLAGS += $(ARCHFLAG) | |
274 | |
275 ifeq ("${Platform_arch}", "sparc") | |
276 | |
277 # Flags for Optimization | |
278 | |
279 # [phh] Commented out pending verification that we do indeed want | |
280 # to potentially bias against u1 and u3 targets. | |
281 #CFLAGS += -xchip=ultra2 | |
282 | |
283 ifdef LP64 | |
284 # SC5.0 tools on v9 are flakey at -xO4 | |
285 # [phh] Is this still true for 6.1? | |
286 OPT_CFLAGS=-xO3 $(EXTRA_OPT_CFLAGS) | |
287 else | |
288 OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS) | |
289 endif | |
290 | |
291 CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_sparc/vm/solaris_sparc.il | |
292 | |
293 endif # sparc | |
294 | |
295 ifeq ("${Platform_arch_model}", "x86_32") | |
296 | |
297 OPT_CFLAGS=-xtarget=pentium $(EXTRA_OPT_CFLAGS) | |
298 | |
299 # SC5.0 tools on x86 are flakey at -xO4 | |
300 # [phh] Is this still true for 6.1? | |
301 OPT_CFLAGS+=-xO3 | |
302 | |
303 CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_x86/vm/solaris_x86_32.il | |
304 | |
305 endif # 32bit x86 | |
306 | |
307 # no more exceptions | |
308 CFLAGS/NOEX=-noex | |
309 | |
310 # Reduce code bloat by reverting back to 5.0 behavior for static initializers | |
311 CFLAGS += -Qoption ccfe -one_static_init | |
312 | |
313 # PIC is safer for SPARC, and is considerably slower | |
314 # a file foo.o which wants to compile -pic can set "PICFLAG/foo.o = -PIC" | |
315 PICFLAG = -KPIC | |
316 PICFLAG/DEFAULT = $(PICFLAG) | |
317 # [RGV] Need to figure which files to remove to get link to work | |
318 #PICFLAG/BETTER = -pic | |
319 PICFLAG/BETTER = $(PICFLAG/DEFAULT) | |
320 PICFLAG/BYFILE = $(PICFLAG/$@)$(PICFLAG/DEFAULT$(PICFLAG/$@)) | |
321 | |
322 # Would be better if these weren't needed, since we link with CC, but | |
323 # at present removing them causes run-time errors | |
324 LFLAGS += -library=Crun | |
325 LIBS += -library=Crun -lCrun | |
326 | |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
327 endif # COMPILER_REV == 5.2 |
0 | 328 |
329 ################################## | |
330 # End 5.2 Forte compiler options # | |
331 ################################## | |
332 | |
333 ################################## | |
334 # Begin old 5.1 compiler options # | |
335 ################################## | |
336 ifeq ($(COMPILER_REV), 5.1) | |
337 | |
338 _JUNK_ := $(shell echo >&2 \ | |
339 "*** ERROR: sparkWorks.make incomplete for 5.1 compiler") | |
340 @exit 1 | |
341 endif | |
342 ################################## | |
343 # End old 5.1 compiler options # | |
344 ################################## | |
345 | |
346 ################################## | |
347 # Begin old 5.0 compiler options # | |
348 ################################## | |
349 | |
350 ifeq (${COMPILER_REV}, 5.0) | |
351 | |
352 # Had to hoist this higher apparently because of other changes. Must | |
353 # come before -xarch specification. | |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
354 # NOTE: native says optimize for the machine doing the compile, bad news. |
0 | 355 CFLAGS += -xtarget=native |
356 | |
357 CFLAGS += $(ARCHFLAG) | |
358 AOUT_FLAGS += $(ARCHFLAG) | |
359 LIB_FLAGS += $(ARCHFLAG) | |
360 LFLAGS += $(ARCHFLAG) | |
361 | |
362 CFLAGS += -library=iostream | |
363 LFLAGS += -library=iostream -library=Crun | |
364 LIBS += -library=iostream -library=Crun -lCrun | |
365 | |
366 # Flags for Optimization | |
367 ifdef LP64 | |
368 # SC5.0 tools on v9 are flakey at -xO4 | |
369 OPT_CFLAGS=-xO3 $(EXTRA_OPT_CFLAGS) | |
370 else | |
371 OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS) | |
372 endif | |
373 | |
374 ifeq ("${Platform_arch}", "sparc") | |
375 | |
376 CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.il | |
377 | |
378 endif # sparc | |
379 | |
380 ifeq ("${Platform_arch_model}", "x86_32") | |
381 OPT_CFLAGS=-xtarget=pentium $(EXTRA_OPT_CFLAGS) | |
382 ifeq ("${COMPILER_REV}", "5.0") | |
383 # SC5.0 tools on x86 are flakey at -xO4 | |
384 OPT_CFLAGS+=-xO3 | |
385 else | |
386 OPT_CFLAGS+=-xO4 | |
387 endif | |
388 | |
389 CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_x86/vm/solaris_x86_32.il | |
390 | |
391 endif # 32bit x86 | |
392 | |
393 # 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
|
394 #OPT_CFLAGS = -fast -O4 $(ARCHFLAG/sparc) -xchip=ultra |
0 | 395 |
396 # no more exceptions | |
397 CFLAGS/NOEX=-noex | |
398 | |
399 # PIC is safer for SPARC, and is considerably slower | |
400 # a file foo.o which wants to compile -pic can set "PICFLAG/foo.o = -PIC" | |
401 PICFLAG = -PIC | |
402 PICFLAG/DEFAULT = $(PICFLAG) | |
403 # [RGV] Need to figure which files to remove to get link to work | |
404 #PICFLAG/BETTER = -pic | |
405 PICFLAG/BETTER = $(PICFLAG/DEFAULT) | |
406 PICFLAG/BYFILE = $(PICFLAG/$@)$(PICFLAG/DEFAULT$(PICFLAG/$@)) | |
407 | |
408 endif # COMPILER_REV = 5.0 | |
409 | |
410 ################################ | |
411 # End old 5.0 compiler options # | |
412 ################################ | |
413 | |
414 ifeq ("${COMPILER_REV}", "4.2") | |
415 # 4.2 COMPILERS SHOULD NO LONGER BE USED | |
416 _JUNK_ := $(shell echo >&2 \ | |
417 "*** ERROR: SC4.2 compilers are not supported by this code base!") | |
418 @exit 1 | |
419 endif | |
420 | |
421 # do not include shared lib path in a.outs | |
422 AOUT_FLAGS += -norunpath | |
423 LFLAGS_VM = -norunpath -z noversion | |
424 | |
425 # need position-indep-code for shared libraries | |
426 # (ild appears to get errors on PIC code, so we'll try non-PIC for debug) | |
427 ifeq ($(PICFLAGS),DEFAULT) | |
428 VM_PICFLAG/LIBJVM = $(PICFLAG/DEFAULT) | |
429 else | |
430 VM_PICFLAG/LIBJVM = $(PICFLAG/BYFILE) | |
431 endif | |
432 VM_PICFLAG/AOUT = | |
433 | |
434 VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO)) | |
435 CFLAGS += $(VM_PICFLAG) | |
436 | |
437 # less dynamic linking (no PLTs, please) | |
438 #LIB_FLAGS += $(LINK_MODE) | |
439 # %%%%% despite -znodefs, -Bsymbolic gets link errors -- Rose | |
440 | |
441 LINK_MODE = $(LINK_MODE/$(VERSION)) | |
442 LINK_MODE/debug = | |
443 LINK_MODE/optimized = -Bsymbolic -znodefs | |
444 | |
445 # Have thread local errnos | |
446 ifeq ($(shell expr $(COMPILER_REV) \>= 5.5), 1) | |
447 CFLAGS += -mt | |
448 else | |
449 CFLAGS += -D_REENTRANT | |
450 endif | |
451 | |
452 ifdef CC_INTERP | |
453 # C++ Interpreter | |
454 CFLAGS += -DCC_INTERP | |
455 endif | |
456 | |
457 # Flags for Debugging | |
458 DEBUG_CFLAGS = -g | |
459 FASTDEBUG_CFLAGS = -g0 | |
460 # The -g0 setting allows the C++ frontend to inline, which is a big win. | |
461 | |
158
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
462 # Special global options for SS12 |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
463 ifeq ($(COMPILER_REV),5.9) |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
464 # 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
|
465 # 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
|
466 # 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
|
467 # 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
|
468 CFLAGS += -xdebugformat=stabs |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
469 endif |
a49545cab84a
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
113
diff
changeset
|
470 |
0 | 471 # Enable the following CFLAGS additions if you need to compare the |
472 # built ELF objects. | |
473 # | |
474 # The -g option makes static data global and the "-Qoption ccfe | |
475 # -xglobalstatic" option tells the compiler to not globalize static | |
476 # data using a unique globalization prefix. Instead force the use of | |
477 # a static globalization prefix based on the source filepath so the | |
478 # objects from two identical compilations are the same. | |
479 #DEBUG_CFLAGS += -Qoption ccfe -xglobalstatic | |
480 #FASTDEBUG_CFLAGS += -Qoption ccfe -xglobalstatic | |
481 | |
482 ifeq (${COMPILER_REV}, 5.2) | |
483 COMPILER_DATE := $(shell $(CPP) -V 2>&1 | awk '{ print $$NF; }') | |
484 ifeq (${COMPILER_DATE}, 2001/01/31) | |
485 # disable -g0 in fastdebug since SC6.1 dated 2001/01/31 seems to be buggy | |
486 # use an innocuous value because it will get -g if it's empty | |
487 FASTDEBUG_CFLAGS = -c | |
488 endif | |
489 endif | |
490 | |
491 # Uncomment or 'gmake CFLAGS_BROWSE=-sbfast' to get source browser information. | |
492 # CFLAGS_BROWSE = -sbfast | |
493 CFLAGS += $(CFLAGS_BROWSE) | |
494 | |
495 # ILD is gone as of SS11 (5.8), not supportted in SS10 (5.7) | |
496 ifeq ($(shell expr $(COMPILER_REV) \< 5.7), 1) | |
497 # use ild when debugging (but when optimizing we want reproducible results) | |
498 ILDFLAG = $(ILDFLAG/$(VERSION)) | |
499 ILDFLAG/debug = -xildon | |
500 ILDFLAG/optimized = | |
501 AOUT_FLAGS += $(ILDFLAG) | |
502 endif | |
503 | |
504 # Where to put the *.o files (a.out, or shared library)? | |
505 LINK_INTO = $(LINK_INTO/$(VERSION)) | |
506 LINK_INTO/debug = LIBJVM | |
507 LINK_INTO/optimized = LIBJVM | |
508 | |
509 # We link the debug version into the a.out because: | |
510 # 1. ild works on a.out but not shared libraries, and using ild | |
511 # can cut rebuild times by 25% for small changes. (ILD is gone in SS11) | |
512 # 2. dbx cannot gracefully set breakpoints in shared libraries | |
513 # | |
514 | |
515 # apply this setting to link into the shared library even in the debug version: | |
516 ifdef LP64 | |
517 LINK_INTO = LIBJVM | |
518 else | |
519 #LINK_INTO = LIBJVM | |
520 endif | |
521 | |
522 MCS = /usr/ccs/bin/mcs | |
523 STRIP = /usr/ccs/bin/strip | |
524 | |
525 # Solaris platforms collect lots of redundant file-ident lines, | |
526 # to the point of wasting a significant percentage of file space. | |
527 # (The text is stored in ELF .comment sections, contributed by | |
528 # all "#pragma ident" directives in header and source files.) | |
529 # This command "compresses" the .comment sections simply by | |
530 # removing repeated lines. The data can be extracted from | |
531 # binaries in the field by using "mcs -p libjvm.so" or the older | |
532 # command "what libjvm.so". | |
533 LINK_LIB.CC/POST_HOOK += $(MCS) -c $@ || exit 1; | |
534 # (The exit 1 is necessary to cause a build failure if the command fails and | |
535 # multiple commands are strung together, and the final semicolon is necessary | |
536 # since the hook must terminate itself as a valid command.) | |
537 | |
538 # Also, strip debug and line number information (worth about 1.7Mb). | |
539 STRIP_LIB.CC/POST_HOOK = $(STRIP) -x $@ || exit 1; | |
540 # STRIP_LIB.CC/POST_HOOK is incorporated into LINK_LIB.CC/POST_HOOK | |
541 # in certain configurations, such as product.make. Other configurations, | |
542 # such as debug.make, do not include the strip operation. |