annotate make/solaris/makefiles/sparcWorks.make @ 196:d1605aabd0a1 jdk7-b30

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