author | vlivanov |
Wed, 02 Mar 2016 15:42:03 +0300 | |
changeset 36349 | 6cc8e6f596b2 |
parent 36194 | d6b05b266581 |
permissions | -rw-r--r-- |
1 | 1 |
# |
35485
9ee1d7aba342
8146855: Update hotspot sources to recognize Solaris Studio 12u4 compiler
dholmes
parents:
33981
diff
changeset
|
2 |
# Copyright (c) 1998, 2016, 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. |
33957
39113ae98993
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
27875
diff
changeset
|
22 |
# |
1 | 23 |
# |
24 |
||
11955
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
11721
diff
changeset
|
25 |
# If a SPEC is not set already, then use these defaults. |
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
11721
diff
changeset
|
26 |
ifeq ($(SPEC),) |
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
11721
diff
changeset
|
27 |
# Compiler-specific flags for sparcworks. |
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
11721
diff
changeset
|
28 |
CC = cc |
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
11721
diff
changeset
|
29 |
CXX = CC |
1 | 30 |
|
11955
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
11721
diff
changeset
|
31 |
# Note that this 'as' is an older version of the Sun Studio 'fbe', and will |
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
11721
diff
changeset
|
32 |
# use the older style options. The 'fbe' options will match 'cc' and 'CC'. |
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
11721
diff
changeset
|
33 |
AS = /usr/ccs/bin/as |
1 | 34 |
|
11955
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
11721
diff
changeset
|
35 |
NM = /usr/ccs/bin/nm |
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
11721
diff
changeset
|
36 |
NAWK = /bin/nawk |
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
11721
diff
changeset
|
37 |
|
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
11721
diff
changeset
|
38 |
MCS = /usr/ccs/bin/mcs |
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
11721
diff
changeset
|
39 |
STRIP = /usr/ccs/bin/strip |
aeca8151886e
7141244: build-infra merge: Include $(SPEC) in makefiles and make variables overridable
erikj
parents:
11721
diff
changeset
|
40 |
endif |
1 | 41 |
|
33957
39113ae98993
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
27875
diff
changeset
|
42 |
# Check for the versions of C++ and C compilers ($CXX and $CC) used. |
1 | 43 |
|
44 |
# Get the last thing on the line that looks like x.x+ (x is a digit). |
|
45 |
COMPILER_REV := \ |
|
11721
dcd1f62c9caf
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
10559
diff
changeset
|
46 |
$(shell $(CXX) -V 2>&1 | sed -n 's/^.*[ ,\t]C++[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p') |
dcd1f62c9caf
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
10559
diff
changeset
|
47 |
CC_COMPILER_REV := \ |
1549
710f8deef989
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
986
diff
changeset
|
48 |
$(shell $(CC) -V 2>&1 | sed -n 's/^.*[ ,\t]C[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/p') |
1 | 49 |
|
584
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
50 |
# Pick which compiler is validated |
35485
9ee1d7aba342
8146855: Update hotspot sources to recognize Solaris Studio 12u4 compiler
dholmes
parents:
33981
diff
changeset
|
51 |
# Validated compiler for JDK9 is SS12.4 (5.13) |
9ee1d7aba342
8146855: Update hotspot sources to recognize Solaris Studio 12u4 compiler
dholmes
parents:
33981
diff
changeset
|
52 |
VALIDATED_COMPILER_REVS := 5.13 |
9ee1d7aba342
8146855: Update hotspot sources to recognize Solaris Studio 12u4 compiler
dholmes
parents:
33981
diff
changeset
|
53 |
VALIDATED_CC_COMPILER_REVS := 5.13 |
1 | 54 |
|
5542
be05c5ffe905
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
4493
diff
changeset
|
55 |
# 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
|
56 |
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
|
57 |
ifeq ($(filter ${ENFORCE_COMPILER_REV},${COMPILER_REV}),) |
be05c5ffe905
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
4493
diff
changeset
|
58 |
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
|
59 |
dummy_var_to_enforce_compiler_rev := $(shell \ |
be05c5ffe905
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
4493
diff
changeset
|
60 |
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
|
61 |
should be using version ${PRINTABLE_CC_REVS}.; \ |
be05c5ffe905
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
4493
diff
changeset
|
62 |
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
|
63 |
warning.) |
1 | 64 |
endif |
65 |
||
11721
dcd1f62c9caf
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
10559
diff
changeset
|
66 |
ENFORCE_CC_COMPILER_REV${ENFORCE_CC_COMPILER_REV} := $(strip ${VALIDATED_CC_COMPILER_REVS}) |
dcd1f62c9caf
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
10559
diff
changeset
|
67 |
ifeq ($(filter ${ENFORCE_CC_COMPILER_REV},${CC_COMPILER_REV}),) |
dcd1f62c9caf
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
10559
diff
changeset
|
68 |
PRINTABLE_C_REVS := $(subst $(shell echo ' '), or ,${ENFORCE_CC_COMPILER_REV}) |
5542
be05c5ffe905
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
4493
diff
changeset
|
69 |
dummy_var_to_enforce_c_compiler_rev := $(shell \ |
11721
dcd1f62c9caf
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
10559
diff
changeset
|
70 |
echo >&2 WARNING: You are using cc version ${CC_COMPILER_REV} and \ |
5542
be05c5ffe905
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
4493
diff
changeset
|
71 |
should be using version ${PRINTABLE_C_REVS}.; \ |
11721
dcd1f62c9caf
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
10559
diff
changeset
|
72 |
echo >&2 Set ENFORCE_CC_COMPILER_REV=${CC_COMPILER_REV} to avoid this \ |
5542
be05c5ffe905
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
4493
diff
changeset
|
73 |
warning.) |
1 | 74 |
endif |
75 |
||
1549
710f8deef989
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
986
diff
changeset
|
76 |
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
|
77 |
|
1 | 78 |
# Fail the build if __fabsf is used. __fabsf exists only in Solaris 8 2/04 |
79 |
# and newer; objects with a dependency on this symbol will not run on older |
|
80 |
# Solaris 8. |
|
81 |
JVM_FAIL_IF_UNDEFINED = __fabsf |
|
82 |
||
83 |
JVM_CHECK_SYMBOLS = $(NM) -u -p $(LIBJVM.o) | \ |
|
84 |
$(NAWK) -v f="${JVM_FAIL_IF_UNDEFINED}" \ |
|
85 |
'BEGIN { c=split(f,s); rc=0; } \ |
|
86 |
/:$$/ { file = $$1; } \ |
|
87 |
/[^:]$$/ { for(n=1;n<=c;++n) { \ |
|
88 |
if($$1==s[n]) { \ |
|
89 |
printf("JVM_CHECK_SYMBOLS: %s contains illegal symbol %s\n", \ |
|
90 |
file,$$1); \ |
|
91 |
rc=1; \ |
|
92 |
} \ |
|
93 |
} \ |
|
94 |
} \ |
|
95 |
END { exit rc; }' |
|
96 |
||
11721
dcd1f62c9caf
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
10559
diff
changeset
|
97 |
LINK_LIB.CXX/PRE_HOOK += $(JVM_CHECK_SYMBOLS) || exit 1; |
1 | 98 |
|
584
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
99 |
# 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
|
100 |
# 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
|
101 |
# 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
|
102 |
# 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
|
103 |
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
|
104 |
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
|
105 |
ARCHFLAG_OLD/sparcv9 = -xarch=v9 |
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
106 |
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
|
107 |
ARCHFLAG_OLD/i486 = |
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
108 |
ARCHFLAG_NEW/i486 = -m32 |
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
109 |
ARCHFLAG_OLD/amd64 = -xarch=amd64 |
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
110 |
ARCHFLAG_NEW/amd64 = -m64 |
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
111 |
|
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
112 |
# 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
|
113 |
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
|
114 |
ARCHFLAG/sparc = $(ARCHFLAG_NEW/sparc) |
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
115 |
ARCHFLAG/sparcv9 = $(ARCHFLAG_NEW/sparcv9) |
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
116 |
ARCHFLAG/i486 = $(ARCHFLAG_NEW/i486) |
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
117 |
ARCHFLAG/amd64 = $(ARCHFLAG_NEW/amd64) |
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
118 |
else |
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
119 |
ARCHFLAG/sparc = $(ARCHFLAG_OLD/sparc) |
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
120 |
ARCHFLAG/sparcv9 = $(ARCHFLAG_OLD/sparcv9) |
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
121 |
ARCHFLAG/i486 = $(ARCHFLAG_OLD/i486) |
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
122 |
ARCHFLAG/amd64 = $(ARCHFLAG_OLD/amd64) |
1 | 123 |
endif |
584
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
124 |
|
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
125 |
# 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
|
126 |
ARCHFLAG = $(ARCHFLAG/$(BUILDARCH)) |
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
127 |
AS_ARCHFLAG = $(ARCHFLAG_OLD/$(BUILDARCH)) |
1 | 128 |
|
129 |
# Optional sub-directory in /usr/lib where BUILDARCH libraries are kept. |
|
130 |
ISA_DIR=$(ISA_DIR/$(BUILDARCH)) |
|
131 |
ISA_DIR/sparcv9=/sparcv9 |
|
132 |
ISA_DIR/amd64=/amd64 |
|
133 |
||
134 |
# Use these to work around compiler bugs: |
|
135 |
OPT_CFLAGS/SLOWER=-xO3 |
|
136 |
OPT_CFLAGS/O2=-xO2 |
|
137 |
OPT_CFLAGS/NOOPT=-xO1 |
|
138 |
||
7397 | 139 |
# Flags for creating the dependency files. |
140 |
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1) |
|
141 |
DEPFLAGS = -xMMD -xMF $(DEP_DIR)/$(@:%=%.d) |
|
142 |
endif |
|
143 |
||
7408
c04a5c989f26
7003125: precompiled.hpp is included when precompiled headers are not used
stefank
parents:
7397
diff
changeset
|
144 |
# -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
|
145 |
CFLAGS += -DDONT_USE_PRECOMPILED_HEADER |
c04a5c989f26
7003125: precompiled.hpp is included when precompiled headers are not used
stefank
parents:
7397
diff
changeset
|
146 |
|
10537
23539f11e110
7090259: Fix hotspot sources to build with old compilers
kvn
parents:
9414
diff
changeset
|
147 |
# Compiler warnings are treated as errors |
35948
df8ecc74bf4a
8144695: --disable-warnings-as-errors does not work for HotSpot build
iignatyev
parents:
35485
diff
changeset
|
148 |
WARNINGS_ARE_ERRORS ?= -xwe |
df8ecc74bf4a
8144695: --disable-warnings-as-errors does not work for HotSpot build
iignatyev
parents:
35485
diff
changeset
|
149 |
CFLAGS_WARN = $(WARNINGS_ARE_ERRORS) |
10537
23539f11e110
7090259: Fix hotspot sources to build with old compilers
kvn
parents:
9414
diff
changeset
|
150 |
|
7397 | 151 |
################################################ |
6182
685deffe44a5
6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents:
5547
diff
changeset
|
152 |
# Begin current (>=5.9) Forte compiler options # |
685deffe44a5
6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents:
5547
diff
changeset
|
153 |
################################################# |
685deffe44a5
6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents:
5547
diff
changeset
|
154 |
|
5542
be05c5ffe905
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
4493
diff
changeset
|
155 |
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1) |
be05c5ffe905
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
4493
diff
changeset
|
156 |
ifeq ($(Platform_arch), x86) |
be05c5ffe905
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
4493
diff
changeset
|
157 |
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
|
158 |
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
|
159 |
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
|
160 |
OPT_CFLAGS/stubGenerator_x86_64.o = $(OPT_CFLAGS) -xspace |
36194
d6b05b266581
8150201: Restore missing -g flags to files with OPT_CFLAGS/per-file
ihse
parents:
35948
diff
changeset
|
161 |
# The debug flag is added to OPT_CFLAGS, but lost in case of per-file overrides |
d6b05b266581
8150201: Restore missing -g flags to files with OPT_CFLAGS/per-file
ihse
parents:
35948
diff
changeset
|
162 |
# of OPT_CFLAGS. Restore it here. |
d6b05b266581
8150201: Restore missing -g flags to files with OPT_CFLAGS/per-file
ihse
parents:
35948
diff
changeset
|
163 |
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
d6b05b266581
8150201: Restore missing -g flags to files with OPT_CFLAGS/per-file
ihse
parents:
35948
diff
changeset
|
164 |
OPT_CFLAGS/stubGenerator_x86_32.o += -g0 -xs |
d6b05b266581
8150201: Restore missing -g flags to files with OPT_CFLAGS/per-file
ihse
parents:
35948
diff
changeset
|
165 |
OPT_CFLAGS/stubGenerator_x86_64.o += -g0 -xs |
d6b05b266581
8150201: Restore missing -g flags to files with OPT_CFLAGS/per-file
ihse
parents:
35948
diff
changeset
|
166 |
endif |
5542
be05c5ffe905
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
4493
diff
changeset
|
167 |
endif # Platform_arch == x86 |
6182
685deffe44a5
6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents:
5547
diff
changeset
|
168 |
ifeq ("${Platform_arch}", "sparc") |
685deffe44a5
6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents:
5547
diff
changeset
|
169 |
OPT_CFLAGS/stubGenerator_sparc.o = $(OPT_CFLAGS) -xspace |
36194
d6b05b266581
8150201: Restore missing -g flags to files with OPT_CFLAGS/per-file
ihse
parents:
35948
diff
changeset
|
170 |
# The debug flag is added to OPT_CFLAGS, but lost in case of per-file overrides |
d6b05b266581
8150201: Restore missing -g flags to files with OPT_CFLAGS/per-file
ihse
parents:
35948
diff
changeset
|
171 |
# of OPT_CFLAGS. Restore it here. |
d6b05b266581
8150201: Restore missing -g flags to files with OPT_CFLAGS/per-file
ihse
parents:
35948
diff
changeset
|
172 |
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
d6b05b266581
8150201: Restore missing -g flags to files with OPT_CFLAGS/per-file
ihse
parents:
35948
diff
changeset
|
173 |
OPT_CFLAGS/stubGenerator_sparc.o += -g0 -xs |
d6b05b266581
8150201: Restore missing -g flags to files with OPT_CFLAGS/per-file
ihse
parents:
35948
diff
changeset
|
174 |
endif |
6182
685deffe44a5
6975049: nsk/regression/b4287029 crashes with -Xss64 on solaris-i586
kvn
parents:
5547
diff
changeset
|
175 |
endif |
5542
be05c5ffe905
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
4493
diff
changeset
|
176 |
endif # COMPILER_REV_NUMERIC >= 509 |
be05c5ffe905
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
4493
diff
changeset
|
177 |
|
1 | 178 |
################################################# |
179 |
# Begin current (>=5.6) Forte compiler options # |
|
180 |
################################################# |
|
181 |
||
1549
710f8deef989
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
986
diff
changeset
|
182 |
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 506), 1) |
1 | 183 |
|
184 |
ifeq ("${Platform_arch}", "sparc") |
|
185 |
||
186 |
# We MUST allow data alignment of 4 for sparc (sparcv9 is ok at 8s) |
|
187 |
ifndef LP64 |
|
188 |
CFLAGS += -xmemalign=4s |
|
189 |
endif |
|
190 |
||
191 |
endif |
|
192 |
||
193 |
endif |
|
194 |
||
195 |
################################################# |
|
196 |
# Begin current (>=5.5) Forte compiler options # |
|
197 |
################################################# |
|
198 |
||
1549
710f8deef989
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
986
diff
changeset
|
199 |
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 505), 1) |
1 | 200 |
|
201 |
CFLAGS += $(ARCHFLAG) |
|
202 |
AOUT_FLAGS += $(ARCHFLAG) |
|
203 |
LIB_FLAGS += $(ARCHFLAG) |
|
204 |
LFLAGS += $(ARCHFLAG) |
|
205 |
||
206 |
ifeq ("${Platform_arch}", "sparc") |
|
207 |
||
208 |
# Flags for Optimization |
|
209 |
||
210 |
# [phh] Commented out pending verification that we do indeed want |
|
211 |
# to potentially bias against u1 and u3 targets. |
|
212 |
#CFLAGS += -xchip=ultra2 |
|
213 |
||
214 |
OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS) |
|
215 |
||
216 |
endif # sparc |
|
217 |
||
218 |
ifeq ("${Platform_arch_model}", "x86_32") |
|
219 |
||
5542
be05c5ffe905
6951319: enable solaris builds using Sun Studio 12 update 1
jcoomes
parents:
4493
diff
changeset
|
220 |
OPT_CFLAGS=-xtarget=pentium -xO4 $(EXTRA_OPT_CFLAGS) |
1 | 221 |
|
222 |
endif # 32bit x86 |
|
223 |
||
224 |
ifeq ("${Platform_arch_model}", "x86_64") |
|
225 |
||
584
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
226 |
ASFLAGS += $(AS_ARCHFLAG) |
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
227 |
CFLAGS += $(ARCHFLAG/amd64) |
1 | 228 |
# this one seemed useless |
584
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
229 |
LFLAGS_VM += $(ARCHFLAG/amd64) |
1 | 230 |
# this one worked |
584
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
231 |
LFLAGS += $(ARCHFLAG/amd64) |
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
232 |
AOUT_FLAGS += $(ARCHFLAG/amd64) |
1 | 233 |
|
234 |
# -xO3 is faster than -xO4 on specjbb with SS10 compiler |
|
235 |
OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS) |
|
236 |
||
237 |
endif # 64bit x86 |
|
238 |
||
239 |
# Inline functions |
|
240 |
CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_${Platform_arch}/vm/solaris_${Platform_arch_model}.il |
|
241 |
||
242 |
# no more exceptions |
|
243 |
CFLAGS/NOEX=-features=no%except |
|
244 |
||
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
338
diff
changeset
|
245 |
|
33957
39113ae98993
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
27875
diff
changeset
|
246 |
# avoid compilation problems arising from fact that C++ compiler tries |
360
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
338
diff
changeset
|
247 |
# 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
|
248 |
# 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
|
249 |
CFLAGS += -template=no%extdef |
21d113ecbf6a
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents:
338
diff
changeset
|
250 |
|
1 | 251 |
# Reduce code bloat by reverting back to 5.0 behavior for static initializers |
252 |
CFLAGS += -features=no%split_init |
|
253 |
||
33957
39113ae98993
8085822: JEP 223: New Version-String Scheme (initial integration)
ihse
parents:
27875
diff
changeset
|
254 |
# Use -D_Crun_inline_placement so we don't get references to |
1 | 255 |
# __1c2n6FIpv_0_ or void*operator new(unsigned,void*) |
256 |
# This avoids the hard requirement of the newer Solaris C++ runtime patches. |
|
257 |
# NOTE: This is an undocumented feature of the SS10 compiler. See 6306698. |
|
258 |
CFLAGS += -D_Crun_inline_placement |
|
259 |
||
260 |
# PIC is safer for SPARC, and is considerably slower |
|
261 |
# a file foo.o which wants to compile -pic can set "PICFLAG/foo.o = -PIC" |
|
262 |
PICFLAG = -KPIC |
|
263 |
PICFLAG/DEFAULT = $(PICFLAG) |
|
264 |
# [RGV] Need to figure which files to remove to get link to work |
|
265 |
#PICFLAG/BETTER = -pic |
|
266 |
PICFLAG/BETTER = $(PICFLAG/DEFAULT) |
|
267 |
PICFLAG/BYFILE = $(PICFLAG/$@)$(PICFLAG/DEFAULT$(PICFLAG/$@)) |
|
268 |
||
269 |
# Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file. |
|
270 |
MAPFLAG = -M FILENAME |
|
271 |
||
272 |
# Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj |
|
273 |
SONAMEFLAG = -h SONAME |
|
274 |
||
275 |
# Build shared library |
|
276 |
SHARED_FLAG = -G |
|
277 |
||
278 |
# We don't need libCstd.so and librwtools7.so, only libCrun.so |
|
279 |
CFLAGS += -library=%none |
|
280 |
LFLAGS += -library=%none |
|
281 |
||
282 |
LFLAGS += -mt |
|
283 |
||
1549
710f8deef989
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
986
diff
changeset
|
284 |
endif # COMPILER_REV_NUMERIC >= 505 |
1 | 285 |
|
286 |
###################################### |
|
287 |
# End 5.5 Forte compiler options # |
|
288 |
###################################### |
|
289 |
||
290 |
###################################### |
|
291 |
# Begin 5.2 Forte compiler options # |
|
292 |
###################################### |
|
293 |
||
1549
710f8deef989
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
986
diff
changeset
|
294 |
ifeq ($(COMPILER_REV_NUMERIC), 502) |
1 | 295 |
|
296 |
CFLAGS += $(ARCHFLAG) |
|
297 |
AOUT_FLAGS += $(ARCHFLAG) |
|
298 |
LIB_FLAGS += $(ARCHFLAG) |
|
299 |
LFLAGS += $(ARCHFLAG) |
|
300 |
||
301 |
ifeq ("${Platform_arch}", "sparc") |
|
302 |
||
303 |
# Flags for Optimization |
|
304 |
||
305 |
# [phh] Commented out pending verification that we do indeed want |
|
306 |
# to potentially bias against u1 and u3 targets. |
|
307 |
#CFLAGS += -xchip=ultra2 |
|
308 |
||
309 |
ifdef LP64 |
|
310 |
# SC5.0 tools on v9 are flakey at -xO4 |
|
311 |
# [phh] Is this still true for 6.1? |
|
312 |
OPT_CFLAGS=-xO3 $(EXTRA_OPT_CFLAGS) |
|
313 |
else |
|
314 |
OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS) |
|
315 |
endif |
|
316 |
||
317 |
endif # sparc |
|
318 |
||
319 |
ifeq ("${Platform_arch_model}", "x86_32") |
|
320 |
||
321 |
OPT_CFLAGS=-xtarget=pentium $(EXTRA_OPT_CFLAGS) |
|
322 |
||
323 |
# SC5.0 tools on x86 are flakey at -xO4 |
|
324 |
# [phh] Is this still true for 6.1? |
|
325 |
OPT_CFLAGS+=-xO3 |
|
326 |
||
327 |
endif # 32bit x86 |
|
328 |
||
329 |
# no more exceptions |
|
330 |
CFLAGS/NOEX=-noex |
|
331 |
||
4493
9204129f065e
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
3261
diff
changeset
|
332 |
# Inline functions |
9204129f065e
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
3261
diff
changeset
|
333 |
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
|
334 |
|
1 | 335 |
# Reduce code bloat by reverting back to 5.0 behavior for static initializers |
336 |
CFLAGS += -Qoption ccfe -one_static_init |
|
337 |
||
338 |
# PIC is safer for SPARC, and is considerably slower |
|
339 |
# a file foo.o which wants to compile -pic can set "PICFLAG/foo.o = -PIC" |
|
340 |
PICFLAG = -KPIC |
|
341 |
PICFLAG/DEFAULT = $(PICFLAG) |
|
342 |
# [RGV] Need to figure which files to remove to get link to work |
|
343 |
#PICFLAG/BETTER = -pic |
|
344 |
PICFLAG/BETTER = $(PICFLAG/DEFAULT) |
|
345 |
PICFLAG/BYFILE = $(PICFLAG/$@)$(PICFLAG/DEFAULT$(PICFLAG/$@)) |
|
346 |
||
4493
9204129f065e
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
3261
diff
changeset
|
347 |
# 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
|
348 |
MAPFLAG = -M FILENAME |
9204129f065e
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
3261
diff
changeset
|
349 |
|
9204129f065e
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
3261
diff
changeset
|
350 |
# 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
|
351 |
SONAMEFLAG = -h SONAME |
9204129f065e
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
3261
diff
changeset
|
352 |
|
9204129f065e
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
3261
diff
changeset
|
353 |
# Build shared library |
9204129f065e
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
3261
diff
changeset
|
354 |
SHARED_FLAG = -G |
9204129f065e
6843629: Make current hotspot build part of jdk5 control build
phh
parents:
3261
diff
changeset
|
355 |
|
1 | 356 |
# Would be better if these weren't needed, since we link with CC, but |
357 |
# at present removing them causes run-time errors |
|
358 |
LFLAGS += -library=Crun |
|
359 |
LIBS += -library=Crun -lCrun |
|
360 |
||
1549
710f8deef989
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
986
diff
changeset
|
361 |
endif # COMPILER_REV_NUMERIC == 502 |
1 | 362 |
|
363 |
################################## |
|
364 |
# End 5.2 Forte compiler options # |
|
365 |
################################## |
|
366 |
||
367 |
################################## |
|
368 |
# Begin old 5.1 compiler options # |
|
369 |
################################## |
|
1549
710f8deef989
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
986
diff
changeset
|
370 |
ifeq ($(COMPILER_REV_NUMERIC), 501) |
1 | 371 |
|
372 |
_JUNK_ := $(shell echo >&2 \ |
|
373 |
"*** ERROR: sparkWorks.make incomplete for 5.1 compiler") |
|
374 |
@exit 1 |
|
375 |
endif |
|
376 |
################################## |
|
377 |
# End old 5.1 compiler options # |
|
378 |
################################## |
|
379 |
||
380 |
################################## |
|
381 |
# Begin old 5.0 compiler options # |
|
382 |
################################## |
|
383 |
||
1549
710f8deef989
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
986
diff
changeset
|
384 |
ifeq (${COMPILER_REV_NUMERIC}, 500) |
1 | 385 |
|
386 |
# Had to hoist this higher apparently because of other changes. Must |
|
387 |
# come before -xarch specification. |
|
584
02175b2b64e6
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
360
diff
changeset
|
388 |
# NOTE: native says optimize for the machine doing the compile, bad news. |
1 | 389 |
CFLAGS += -xtarget=native |
390 |
||
391 |
CFLAGS += $(ARCHFLAG) |
|
392 |
AOUT_FLAGS += $(ARCHFLAG) |
|
393 |
LIB_FLAGS += $(ARCHFLAG) |
|
394 |
LFLAGS += $(ARCHFLAG) |
|
395 |
||
396 |
CFLAGS += -library=iostream |
|
397 |
LFLAGS += -library=iostream -library=Crun |
|
398 |
LIBS += -library=iostream -library=Crun -lCrun |
|
399 |
||
400 |
# Flags for Optimization |
|
401 |
ifdef LP64 |
|
402 |
# SC5.0 tools on v9 are flakey at -xO4 |
|
403 |
OPT_CFLAGS=-xO3 $(EXTRA_OPT_CFLAGS) |
|
404 |
else |
|
405 |
OPT_CFLAGS=-xO4 $(EXTRA_OPT_CFLAGS) |
|
406 |
endif |
|
407 |
||
408 |
ifeq ("${Platform_arch}", "sparc") |
|
409 |
||
410 |
CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_sparc/vm/atomic_solaris_sparc.il |
|
411 |
||
412 |
endif # sparc |
|
413 |
||
414 |
ifeq ("${Platform_arch_model}", "x86_32") |
|
415 |
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
|
416 |
ifeq ("${COMPILER_REV_NUMERIC}", "500") |
1 | 417 |
# SC5.0 tools on x86 are flakey at -xO4 |
418 |
OPT_CFLAGS+=-xO3 |
|
419 |
else |
|
420 |
OPT_CFLAGS+=-xO4 |
|
421 |
endif |
|
422 |
||
423 |
CFLAGS += $(GAMMADIR)/src/os_cpu/solaris_x86/vm/solaris_x86_32.il |
|
424 |
||
425 |
endif # 32bit x86 |
|
426 |
||
427 |
# 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
|
428 |
#OPT_CFLAGS = -fast -O4 $(ARCHFLAG/sparc) -xchip=ultra |
1 | 429 |
|
430 |
# no more exceptions |
|
431 |
CFLAGS/NOEX=-noex |
|
432 |
||
433 |
# PIC is safer for SPARC, and is considerably slower |
|
434 |
# a file foo.o which wants to compile -pic can set "PICFLAG/foo.o = -PIC" |
|
435 |
PICFLAG = -PIC |
|
436 |
PICFLAG/DEFAULT = $(PICFLAG) |
|
437 |
# [RGV] Need to figure which files to remove to get link to work |
|
438 |
#PICFLAG/BETTER = -pic |
|
439 |
PICFLAG/BETTER = $(PICFLAG/DEFAULT) |
|
440 |
PICFLAG/BYFILE = $(PICFLAG/$@)$(PICFLAG/DEFAULT$(PICFLAG/$@)) |
|
441 |
||
1549
710f8deef989
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
986
diff
changeset
|
442 |
endif # COMPILER_REV_NUMERIC = 500 |
1 | 443 |
|
444 |
################################ |
|
445 |
# End old 5.0 compiler options # |
|
446 |
################################ |
|
447 |
||
1549
710f8deef989
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
986
diff
changeset
|
448 |
ifeq ("${COMPILER_REV_NUMERIC}", "402") |
1 | 449 |
# 4.2 COMPILERS SHOULD NO LONGER BE USED |
450 |
_JUNK_ := $(shell echo >&2 \ |
|
451 |
"*** ERROR: SC4.2 compilers are not supported by this code base!") |
|
452 |
@exit 1 |
|
453 |
endif |
|
454 |
||
455 |
# do not include shared lib path in a.outs |
|
456 |
AOUT_FLAGS += -norunpath |
|
457 |
LFLAGS_VM = -norunpath -z noversion |
|
458 |
||
459 |
# need position-indep-code for shared libraries |
|
460 |
# (ild appears to get errors on PIC code, so we'll try non-PIC for debug) |
|
461 |
ifeq ($(PICFLAGS),DEFAULT) |
|
462 |
VM_PICFLAG/LIBJVM = $(PICFLAG/DEFAULT) |
|
463 |
else |
|
464 |
VM_PICFLAG/LIBJVM = $(PICFLAG/BYFILE) |
|
465 |
endif |
|
466 |
VM_PICFLAG/AOUT = |
|
467 |
||
468 |
VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO)) |
|
469 |
CFLAGS += $(VM_PICFLAG) |
|
470 |
||
471 |
# less dynamic linking (no PLTs, please) |
|
472 |
#LIB_FLAGS += $(LINK_MODE) |
|
473 |
# %%%%% despite -znodefs, -Bsymbolic gets link errors -- Rose |
|
474 |
||
475 |
LINK_MODE = $(LINK_MODE/$(VERSION)) |
|
476 |
LINK_MODE/debug = |
|
477 |
LINK_MODE/optimized = -Bsymbolic -znodefs |
|
478 |
||
479 |
# Have thread local errnos |
|
1549
710f8deef989
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
986
diff
changeset
|
480 |
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 505), 1) |
1 | 481 |
CFLAGS += -mt |
482 |
else |
|
483 |
CFLAGS += -D_REENTRANT |
|
484 |
endif |
|
485 |
||
486 |
ifdef CC_INTERP |
|
487 |
# C++ Interpreter |
|
488 |
CFLAGS += -DCC_INTERP |
|
489 |
endif |
|
490 |
||
491 |
# Flags for Debugging |
|
10559 | 492 |
# The -g0 setting allows the C++ frontend to inline, which is a big win. |
493 |
# The -xs setting disables 'lazy debug info' which puts everything in |
|
494 |
# the .so instead of requiring the '.o' files. |
|
12501
ea7feae692ae
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
11721
diff
changeset
|
495 |
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
10559 | 496 |
OPT_CFLAGS += -g0 -xs |
497 |
endif |
|
1 | 498 |
DEBUG_CFLAGS = -g |
499 |
FASTDEBUG_CFLAGS = -g0 |
|
12501
ea7feae692ae
7102323: RFE: enable Full Debug Symbols Phase 1 on Solaris
dcubed
parents:
11721
diff
changeset
|
500 |
ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) |
10559 | 501 |
DEBUG_CFLAGS += -xs |
502 |
FASTDEBUG_CFLAGS += -xs |
|
503 |
endif |
|
1 | 504 |
|
505 |
# Enable the following CFLAGS additions if you need to compare the |
|
506 |
# built ELF objects. |
|
507 |
# |
|
508 |
# The -g option makes static data global and the "-Qoption ccfe |
|
509 |
# -xglobalstatic" option tells the compiler to not globalize static |
|
510 |
# data using a unique globalization prefix. Instead force the use of |
|
511 |
# a static globalization prefix based on the source filepath so the |
|
512 |
# objects from two identical compilations are the same. |
|
10559 | 513 |
# EXTRA_CFLAGS only covers vm_version.cpp for some reason |
514 |
#EXTRA_CFLAGS += -Qoption ccfe -xglobalstatic |
|
515 |
#OPT_CFLAGS += -Qoption ccfe -xglobalstatic |
|
1 | 516 |
#DEBUG_CFLAGS += -Qoption ccfe -xglobalstatic |
517 |
#FASTDEBUG_CFLAGS += -Qoption ccfe -xglobalstatic |
|
518 |
||
1549
710f8deef989
6769748: Fix solaris makefiles for the case when "CC -V" produces several lines
kvn
parents:
986
diff
changeset
|
519 |
ifeq (${COMPILER_REV_NUMERIC}, 502) |
11721
dcd1f62c9caf
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
10559
diff
changeset
|
520 |
COMPILER_DATE := $(shell $(CXX) -V 2>&1 | sed -n '/^.*[ ]C++[ ]\([1-9]\.[0-9][0-9]*\)/p' | awk '{ print $$NF; }') |
1 | 521 |
ifeq (${COMPILER_DATE}, 2001/01/31) |
522 |
# disable -g0 in fastdebug since SC6.1 dated 2001/01/31 seems to be buggy |
|
523 |
# use an innocuous value because it will get -g if it's empty |
|
524 |
FASTDEBUG_CFLAGS = -c |
|
525 |
endif |
|
526 |
endif |
|
527 |
||
528 |
# Uncomment or 'gmake CFLAGS_BROWSE=-sbfast' to get source browser information. |
|
529 |
# CFLAGS_BROWSE = -sbfast |
|
530 |
CFLAGS += $(CFLAGS_BROWSE) |
|
531 |
||
532 |
# 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
|
533 |
ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \< 507), 1) |
1 | 534 |
# use ild when debugging (but when optimizing we want reproducible results) |
535 |
ILDFLAG = $(ILDFLAG/$(VERSION)) |
|
536 |
ILDFLAG/debug = -xildon |
|
537 |
ILDFLAG/optimized = |
|
538 |
AOUT_FLAGS += $(ILDFLAG) |
|
539 |
endif |
|
540 |
||
541 |
# Where to put the *.o files (a.out, or shared library)? |
|
542 |
LINK_INTO = $(LINK_INTO/$(VERSION)) |
|
543 |
LINK_INTO/debug = LIBJVM |
|
544 |
LINK_INTO/optimized = LIBJVM |
|
545 |
||
546 |
# We link the debug version into the a.out because: |
|
547 |
# 1. ild works on a.out but not shared libraries, and using ild |
|
548 |
# can cut rebuild times by 25% for small changes. (ILD is gone in SS11) |
|
549 |
# 2. dbx cannot gracefully set breakpoints in shared libraries |
|
550 |
# |
|
551 |
||
552 |
# apply this setting to link into the shared library even in the debug version: |
|
553 |
ifdef LP64 |
|
554 |
LINK_INTO = LIBJVM |
|
555 |
else |
|
556 |
#LINK_INTO = LIBJVM |
|
557 |
endif |
|
558 |
||
559 |
# Also, strip debug and line number information (worth about 1.7Mb). |
|
10559 | 560 |
# If we can create .debuginfo files, then the VM is stripped in vm.make |
561 |
# and this macro is not used. |
|
11721
dcd1f62c9caf
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
10559
diff
changeset
|
562 |
STRIP_LIB.CXX/POST_HOOK = $(STRIP) -x $@ || exit 1; |
dcd1f62c9caf
7141242: build-infra merge: Rename CPP->CXX and LINK->LD
erikj
parents:
10559
diff
changeset
|
563 |
# STRIP_LIB.CXX/POST_HOOK is incorporated into LINK_LIB.CXX/POST_HOOK |
1 | 564 |
# in certain configurations, such as product.make. Other configurations, |
565 |
# such as debug.make, do not include the strip operation. |