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