author | alanb |
Tue, 07 Sep 2010 08:36:10 +0100 | |
changeset 6532 | 46e43203603e |
parent 5801 | 8008ed6e4a37 |
child 7485 | e9e65ce0013a |
permissions | -rw-r--r-- |
2 | 1 |
# |
5506 | 2 |
# Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved. |
2 | 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 |
|
5506 | 7 |
# published by the Free Software Foundation. Oracle designates this |
2 | 8 |
# particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
# by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
# |
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
# accompanied this code). |
|
16 |
# |
|
17 |
# You should have received a copy of the GNU General Public License version |
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
# |
|
5506 | 21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
# or visit www.oracle.com if you need additional information or have any |
|
23 |
# questions. |
|
2 | 24 |
# |
25 |
||
26 |
# |
|
27 |
# Makefile to specify compiler flags for programs and libraries |
|
28 |
# targeted to Solaris. Should not contain any rules. |
|
29 |
# |
|
30 |
# WARNING: This file is shared with other workspaces. |
|
31 |
# So when it includes other files, it must use JDK_TOPDIR. |
|
32 |
# |
|
33 |
||
34 |
# Warning: the following variables are overridden by Defs.gmk. Set |
|
35 |
# values will be silently ignored: |
|
36 |
# CFLAGS (set $(OTHER_CFLAGS) instead) |
|
37 |
# CPPFLAGS (set $(OTHER_CPPFLAGS) instead) |
|
38 |
# CXXFLAGS (set $(OTHER_CXXFLAGS) instead) |
|
39 |
# LDFLAGS (set $(OTHER_LDFAGS) instead) |
|
40 |
# LDLIBS (set $(EXTRA_LIBS) instead) |
|
41 |
# LDLIBS_COMMON (set $(EXTRA_LIBS) instead) |
|
42 |
# LINTFLAGS (set $(OTHER_LINTFLAGS) instead) |
|
849
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
43 |
# |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
44 |
# Note: CPPFLAGS are used in C and C++ compiles. |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
45 |
# |
2 | 46 |
|
47 |
# Get shared JDK settings |
|
48 |
include $(JDK_MAKE_SHARED_DIR)/Defs.gmk |
|
49 |
||
50 |
ifndef PLATFORM_SRC |
|
30
7ea1edf98bfe
6668781: Openjdk windows cygwin build failure: no rule to make linker_md.obj target
ohair
parents:
2
diff
changeset
|
51 |
PLATFORM_SRC = $(BUILDDIR)/../src/solaris |
2 | 52 |
endif # PLATFORM_SRC |
53 |
||
54 |
# Platform specific closed sources |
|
55 |
ifndef OPENJDK |
|
56 |
ifndef CLOSED_PLATFORM_SRC |
|
30
7ea1edf98bfe
6668781: Openjdk windows cygwin build failure: no rule to make linker_md.obj target
ohair
parents:
2
diff
changeset
|
57 |
CLOSED_PLATFORM_SRC = $(BUILDDIR)/../src/closed/solaris |
2 | 58 |
endif |
59 |
endif |
|
60 |
||
61 |
# platform specific include files |
|
62 |
PLATFORM_INCLUDE_NAME = $(PLATFORM) |
|
63 |
PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME) |
|
64 |
||
65 |
# suffix used for make dependencies files |
|
66 |
DEPEND_SUFFIX = d |
|
67 |
# suffix used for lint files |
|
68 |
LINT_SUFFIX = ln |
|
69 |
# The suffix applied to the library name for FDLIBM |
|
70 |
FDDLIBM_SUFFIX = a |
|
71 |
# The suffix applied to scripts (.bat for windows, nothing for unix) |
|
72 |
SCRIPT_SUFFIX = |
|
73 |
# CC compiler object code output directive flag value |
|
74 |
CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required! |
|
75 |
CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required! |
|
76 |
||
77 |
# |
|
78 |
# Default HPI libraries. Build will build only native unless |
|
79 |
# overriden at the make command line. This makes it convenient for |
|
80 |
# people doing, say, a pthreads port -- they can create a posix |
|
81 |
# directory here, and say "gnumake HPIS=posix" at the top |
|
82 |
# level. |
|
83 |
# |
|
84 |
HPIS = native |
|
85 |
||
86 |
# |
|
87 |
# Java default optimization (-x04/-O2) etc. Applies to the VM. |
|
88 |
# |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
89 |
ifndef OPTIMIZATION_LEVEL |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
90 |
ifeq ($(PRODUCT), java) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
91 |
OPTIMIZATION_LEVEL = HIGHER |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
92 |
else |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
93 |
OPTIMIZATION_LEVEL = LOWER |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
94 |
endif |
2 | 95 |
endif |
2398
b0e6622ee72e
6604458: linux_x64-fastdebug-c2 fails on hyperbolic trig tests
ohair
parents:
919
diff
changeset
|
96 |
ifndef FASTDEBUG_OPTIMIZATION_LEVEL |
b0e6622ee72e
6604458: linux_x64-fastdebug-c2 fails on hyperbolic trig tests
ohair
parents:
919
diff
changeset
|
97 |
FASTDEBUG_OPTIMIZATION_LEVEL = LOWER |
b0e6622ee72e
6604458: linux_x64-fastdebug-c2 fails on hyperbolic trig tests
ohair
parents:
919
diff
changeset
|
98 |
endif |
2 | 99 |
|
100 |
# |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
101 |
# If -Xa is in CFLAGS_COMMON it will end up ahead of $(CC_OPT) for the |
2 | 102 |
# optimized build, and that ordering of the flags completely freaks |
103 |
# out cc. Hence, -Xa is instead in each CFLAGS variant. |
|
104 |
# |
|
105 |
# The more unusual options to the Sun C compiler: |
|
106 |
# -v Stricter type checking, more error checking |
|
107 |
# (To turn ALL warnings into fatals, use -errwarn=%all) |
|
108 |
# -xstrconst Place string literals and constants in read-only area |
|
109 |
# (means you can't write on your string literals) |
|
110 |
# -xs Force debug information (stabs) into the .so or a.out |
|
111 |
# (makes the library/executable debuggable without the |
|
112 |
# .o files needing to be around, but at a space cost) |
|
113 |
# -g & -O If you add the -g option to the optimized compiles |
|
114 |
# you will get better stack retraces, the code is |
|
115 |
# still optimized. This includes a space cost too. |
|
116 |
# -xc99=%none Do NOT allow for c99 extensions to be used. |
|
117 |
# e.g. declarations must precede statements |
|
118 |
# -xCC Allow the C++ style of comments in C: // |
|
119 |
# Required with many of the source files. |
|
120 |
# -mt Assume multi-threaded (important) |
|
121 |
# |
|
849
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
122 |
# The more unusual options to the Sun C compiler: |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
123 |
# +w Print more warnings |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
124 |
# +w2 Maximum warnings |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
125 |
# |
2 | 126 |
|
127 |
# |
|
128 |
# Debug flag for C and C++ compiler |
|
129 |
# |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
130 |
CFLAGS_DEBUG_OPTION = -g $(CC_OPT/NONE) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
131 |
CXXFLAGS_DEBUG_OPTION = -g $(CXX_OPT/NONE) |
2 | 132 |
|
133 |
# Turn off -g if we are doing tcov build |
|
134 |
ifdef TCOV_BUILD |
|
135 |
CFLAGS_DEBUG_OPTION= |
|
136 |
CXXFLAGS_DEBUG_OPTION= |
|
137 |
endif |
|
138 |
||
139 |
# FASTDEBUG: Optimize the -g builds, gives us a faster debug java |
|
140 |
# If true adds -O to the debug compiles. This allows for any assert |
|
141 |
# tests to remain and debug checking. The resulting code is faster |
|
142 |
# but less debuggable. Stack traces are still valid, although only |
|
143 |
# approximate line numbers are given. Printing of local variables |
|
144 |
# during a debugging session is not possible, but stepping and |
|
145 |
# printing of global or static variables should be possible. |
|
146 |
# Performance/size of files should be about the same, maybe smaller. |
|
147 |
# |
|
148 |
ifeq ($(FASTDEBUG), true) |
|
2398
b0e6622ee72e
6604458: linux_x64-fastdebug-c2 fails on hyperbolic trig tests
ohair
parents:
919
diff
changeset
|
149 |
CFLAGS_DEBUG_OPTION = -g $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL)) |
b0e6622ee72e
6604458: linux_x64-fastdebug-c2 fails on hyperbolic trig tests
ohair
parents:
919
diff
changeset
|
150 |
CXXFLAGS_DEBUG_OPTION = -g0 $(CXX_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL)) |
2 | 151 |
endif |
152 |
||
849
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
153 |
CFLAGS_COMMON = -L$(OBJDIR) |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
154 |
|
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
155 |
# Do not allow C99 language features like declarations in code etc. |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
156 |
CFLAGS_COMMON += -xc99=%none |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
157 |
|
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
158 |
# Allow C++ comments in C code |
2 | 159 |
CFLAGS_COMMON += -xCC |
849
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
160 |
|
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
161 |
# Show error message tags on errors |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
162 |
CFLAGS_COMMON += -errshort=tags |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
163 |
CXXFLAGS_COMMON += -errtags=yes |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
164 |
|
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
165 |
# Optimization flags |
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
166 |
CFLAGS_OPT = $(CC_OPT) |
849
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
167 |
|
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
168 |
# Debug version flags |
2 | 169 |
CFLAGS_DBG = $(CFLAGS_DEBUG_OPTION) |
849
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
170 |
|
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
171 |
# Required C compiler flags |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
172 |
CFLAGS_COMMON += -Xa $(CFLAGS_REQUIRED) |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
173 |
|
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
174 |
# Maximum warnings all the time |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
175 |
CXXFLAGS_COMMON += +w |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
176 |
CFLAGS_COMMON += -v |
2 | 177 |
|
178 |
# Assume MT behavior all the time (important) |
|
849
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
179 |
CXXFLAGS_COMMON += -mt |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
180 |
CFLAGS_COMMON += -mt |
2 | 181 |
|
182 |
# Assume no C++ exceptions are used |
|
183 |
CXXFLAGS_COMMON += -features=no%except -DCC_NOEX |
|
184 |
||
185 |
# For C++, these options tell it to assume nothing about locating libraries |
|
186 |
# either at compile time, or at runtime. Use of these options will likely |
|
187 |
# require the use of -L and -R options to indicate where libraries will |
|
188 |
# be found at compile time (-L) and at runtime (-R). |
|
189 |
# The /usr/lib location comes for free, so no need to specify that one. |
|
190 |
# Note: C is much simplier and there is no need for these options. This |
|
191 |
# is mostly needed to avoid dependencies on libraries in the |
|
192 |
# Compiler install area, also see LIBCXX and LIBM. |
|
193 |
CXXFLAGS_COMMON += -norunpath -xnolib |
|
194 |
||
195 |
# |
|
196 |
# Treat compiler warnings as errors, if requested |
|
197 |
# |
|
198 |
ifeq ($(COMPILER_WARNINGS_FATAL),true) |
|
199 |
CFLAGS_COMMON += -errwarn=%all |
|
200 |
CXXFLAGS_COMMON += -errwarn=%all |
|
201 |
endif |
|
202 |
||
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
203 |
CXXFLAGS_OPT = $(CXX_OPT) |
2 | 204 |
CXXFLAGS_DBG = $(CXXFLAGS_DEBUG_OPTION) |
205 |
CXXFLAGS_COMMON += $(CFLAGS_REQUIRED) |
|
206 |
||
207 |
# Add -xstrconst to the library compiles. This forces all string |
|
208 |
# literals into the read-only data section, which prevents them from |
|
209 |
# being written to and increases the runtime pages shared on the system. |
|
210 |
# |
|
211 |
ifdef LIBRARY |
|
212 |
CFLAGS_COMMON +=-xstrconst |
|
213 |
endif |
|
214 |
||
215 |
# Source browser database |
|
216 |
# |
|
217 |
# COMPILE_WITH_SB |
|
218 |
# If defined adds -xsb to compiles and creates a |
|
219 |
# source browsing database during compilation. |
|
220 |
# |
|
221 |
ifdef COMPILE_WITH_SB |
|
222 |
ifeq ($(LIBRARY), java) |
|
223 |
CFLAGS_DBG += -xsb |
|
224 |
endif |
|
225 |
endif |
|
226 |
||
227 |
# Lint Flags: |
|
228 |
# -Xa ANSI C plus K&R, favor ANSI rules |
|
229 |
# -fd report on old style func defs |
|
230 |
# -errchk=structarg report on 64bit struct args by value |
|
231 |
# -errchk=longptr64 report on 64bit to 32bit issues (ignores casts) |
|
232 |
# -errchk=parentheses report on suggested use of extra parens |
|
233 |
# -v suppress unused args |
|
234 |
# -x suppress unused externs |
|
235 |
# -u suppress extern func/vars used/defined |
|
236 |
# -errfmt=simple use one line errors with position info |
|
642
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
30
diff
changeset
|
237 |
# $(LINT_XARCH_OPTION) See Compiler-sun.gwk |
2 | 238 |
|
239 |
LINTFLAGS_COMMON = -Xa |
|
240 |
LINTFLAGS_COMMON += -fd |
|
241 |
LINTFLAGS_COMMON += -errchk=structarg,longptr64,parentheses |
|
242 |
LINTFLAGS_COMMON += -v |
|
243 |
LINTFLAGS_COMMON += -x |
|
244 |
LINTFLAGS_COMMON += -u |
|
245 |
LINTFLAGS_COMMON += -errfmt=simple |
|
246 |
LINTFLAGS_OPT = |
|
247 |
LINTFLAGS_DBG = |
|
248 |
||
249 |
# The -W0,-noglobal tells the compiler to NOT generate mangled global |
|
250 |
# ELF data symbols for file local static data. |
|
251 |
# This can break fix&continue, but we'd rather do the same compilations |
|
252 |
# for deliverable bits as we do for non-deliverable bits |
|
253 |
# Tell the compilers to never generate globalized names, all the time. |
|
254 |
CFLAGS_COMMON += -W0,-noglobal |
|
255 |
||
642
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
30
diff
changeset
|
256 |
# If we have a specific arch value to use, add it |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
30
diff
changeset
|
257 |
CFLAGS_COMMON += $(XARCH_OPTION) |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
30
diff
changeset
|
258 |
CXXFLAGS_COMMON += $(XARCH_OPTION) |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
30
diff
changeset
|
259 |
ASFLAGS_COMMON += $(AS_XARCH_OPTION) |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
30
diff
changeset
|
260 |
EXTRA_LIBS += $(XARCH_OPTION) |
d1f02d5e4c74
6563752: Build and test JDK7 with Sun Studio 12 Express compilers (prep makefiles)
ohair
parents:
30
diff
changeset
|
261 |
LINTFLAGS_COMMON += $(LINT_XARCH_OPTION) |
2 | 262 |
|
263 |
# |
|
264 |
# uncomment the following to build with PERTURBALOT set |
|
265 |
# |
|
266 |
# OTHER_CFLAGS += -DPERTURBALOT |
|
267 |
# |
|
268 |
||
849
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
269 |
CPPFLAGS_COMMON = -D__solaris__ -D$(ARCH_FAMILY) |
be386e469547
6727683: Cleanup use of COMPILER_WARNINGS_FATAL in makefiles
ohair
parents:
715
diff
changeset
|
270 |
CPPFLAGS_OPT = -DNDEBUG |
2 | 271 |
CPPFLAGS_DBG = -DDEBUG |
272 |
||
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
273 |
ifneq ($(PRODUCT), java) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
274 |
CPPFLAGS_DBG += -DLOGGING -DDBINFO |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
275 |
endif |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
276 |
|
2 | 277 |
ifeq ($(ARCH_FAMILY), i586) |
278 |
# The macro _LITTLE_ENDIAN needs to be defined the same to avoid the |
|
279 |
# Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN |
|
280 |
# (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h). |
|
281 |
# Note: -Dmacro is the same as #define macro 1 |
|
282 |
# -Dmacro= is the same as #define macro |
|
283 |
# |
|
284 |
CPPFLAGS_COMMON += -DcpuIntel -D_LITTLE_ENDIAN= -D$(LIBARCH) |
|
285 |
# Turn off a superfluous compiler error message on Intel |
|
286 |
CFLAGS_COMMON += -erroff=E_BAD_PRAGMA_PACK_VALUE |
|
287 |
endif |
|
288 |
||
289 |
# Java memory management is based on memory mapping by default, but a |
|
290 |
# system only assuming malloc/free can be built by adding -DUSE_MALLOC |
|
291 |
||
292 |
CPPFLAGS_COMMON += -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS |
|
293 |
CPPFLAGS_OPT += -DTRIMMED |
|
294 |
||
295 |
LDFLAGS_DEFS_OPTION = -z defs |
|
296 |
LDFLAGS_COMMON += $(LDFLAGS_DEFS_OPTION) |
|
297 |
||
298 |
# |
|
299 |
# -L paths for finding and -ljava |
|
300 |
# |
|
301 |
LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH) |
|
302 |
LDFLAGS_OPT = |
|
303 |
LDFLAGS_DBG = |
|
304 |
||
305 |
# |
|
306 |
# We never really want the incremental linker, ever |
|
307 |
# The -xildoff option tells Sun's compilers to NOT use incremental linker |
|
308 |
# |
|
309 |
LDFLAGS_COMMON += -xildoff |
|
310 |
||
311 |
ifdef LIBRARY |
|
312 |
# Libraries need to locate other libraries at runtime, and you can tell |
|
313 |
# a library where to look by way of the dynamic runpaths (RPATH or RUNPATH) |
|
314 |
# buried inside the .so. The $ORIGIN says to look relative to where |
|
315 |
# the library itself is and it can be followed with relative paths from |
|
316 |
# that. By default we always look in $ORIGIN, optionally we add relative |
|
317 |
# paths if the Makefile sets LD_RUNPATH_EXTRAS to those relative paths. |
|
318 |
# The environment variable LD_LIBRARY_PATH will over-ride these runpaths. |
|
319 |
# Try: 'dump -Lv lib*.so' to see these settings in a library. |
|
320 |
# |
|
321 |
LDFLAGS_COMMON += -R\$$ORIGIN |
|
322 |
LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-R\$$ORIGIN/%) |
|
323 |
endif |
|
324 |
||
325 |
EXTRA_LIBS += -lc |
|
326 |
||
327 |
# Postprocessing is done on the images directories only |
|
328 |
# |
|
329 |
ifeq ($(VARIANT), OPT) |
|
330 |
ifeq ($(PARTIAL_GPROF), true) |
|
331 |
NO_STRIP = true |
|
332 |
endif |
|
333 |
ifeq ($(GPROF), true) |
|
334 |
NO_STRIP = true |
|
335 |
endif |
|
336 |
ifneq ($(NO_STRIP), true) |
|
337 |
# Debug 'strip -x' leaves local function Elf symbols (better stack traces) |
|
338 |
POST_STRIP_PROCESS = $(STRIP) -x |
|
339 |
endif |
|
340 |
endif |
|
341 |
POST_MCS_PROCESS=$(MCS) -d -a "JDK $(FULL_VERSION)" |
|
342 |
||
343 |
# |
|
344 |
# Sun C compiler will take -M and pass it on to ld. |
|
345 |
# Usage: ld $(LD_MAPFILE_FLAG) mapfile *.o |
|
346 |
# |
|
347 |
ifeq ($(CC_VERSION),gcc) |
|
348 |
LD_MAPFILE_FLAG = -Xlinker -M -Xlinker |
|
349 |
else |
|
350 |
LD_MAPFILE_FLAG = -M |
|
351 |
endif |
|
352 |
||
353 |
# |
|
354 |
# Variables globally settable from the make command line (default |
|
355 |
# values in brackets): |
|
356 |
# GPROF (false) |
|
357 |
# Eg: % gnumake GPROF=true |
|
358 |
GPROF = false |
|
359 |
ifeq ($(GPROF), true) |
|
360 |
CFLAGS_COMMON += -DGPROF -xpg |
|
361 |
EXTRA_LIBS += -xpg |
|
362 |
endif |
|
363 |
||
364 |
# PARTIAL_GPROF is to be used ONLY during compilation - it should not |
|
365 |
# appear during linking of libraries or programs. It also should |
|
366 |
# prevent linking with -z defs to allow a symbol to remain undefined. |
|
367 |
# |
|
368 |
PARTIAL_GPROF = false |
|
369 |
ifeq ($(PARTIAL_GPROF), true) |
|
370 |
CFLAGS_GPROF += -xpg |
|
371 |
LDFLAGS_DEFS_OPTION = -z nodefs |
|
372 |
endif |
|
373 |
||
374 |
# |
|
375 |
# For a TCOV build we add in the TCOV_OPTION |
|
376 |
# |
|
377 |
ifdef TCOV_BUILD |
|
378 |
TCOV_OPTION = -xprofile=tcov |
|
379 |
LDFLAGS_COMMON += $(TCOV_OPTION) -Kpic |
|
380 |
CFLAGS_COMMON += $(TCOV_OPTION) |
|
381 |
CXXFLAGS_COMMON += $(TCOV_OPTION) |
|
382 |
EXTRA_LIBS += $(TCOV_OPTION) |
|
383 |
LDNOMAP=true |
|
384 |
endif |
|
385 |
||
386 |
# |
|
387 |
# Solaris only uses native threads. |
|
388 |
# |
|
389 |
THREADS_FLAG= native |
|
390 |
THREADS_DIR= threads |
|
391 |
||
392 |
# |
|
393 |
# Support for Quantify. |
|
394 |
# |
|
395 |
ifdef QUANTIFY |
|
396 |
QUANTIFY_CMD = quantify |
|
397 |
QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes |
|
398 |
LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS) |
|
399 |
ifdef LIBRARY |
|
400 |
CFLAGS_COMMON += -K PIC |
|
401 |
endif |
|
402 |
endif |
|
403 |
||
404 |
# |
|
405 |
# Support for Purify. |
|
406 |
# |
|
407 |
ifdef PURIFY |
|
408 |
PURIFY_CMD = /net/suntools.eng/export/tools/sparc/bin/purify |
|
409 |
PURIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes |
|
410 |
LINK_PRE_CMD = $(PURIFY_CMD) $(PURIFY_OPTIONS) |
|
411 |
ifdef LIBRARY |
|
412 |
CFLAGS_COMMON += -K PIC |
|
413 |
endif |
|
414 |
endif |
|
415 |
||
416 |
# |
|
417 |
# Different "levels" of optimization. |
|
418 |
# |
|
419 |
ifeq ($(CC_VERSION),gcc) |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
420 |
|
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
421 |
CC_OPT/NONE = |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
422 |
CC_OPT/LOWER = -O2 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
423 |
CC_OPT/HIGHER = -O3 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
424 |
CC_OPT/HIGHEST = -O3 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
425 |
|
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
426 |
CXX_OPT/NONE = |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
427 |
CXX_OPT/LOWER = -O2 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
428 |
CXX_OPT/HIGHER = -O3 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
429 |
CXX_OPT/HIGHEST = -O3 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
430 |
|
2 | 431 |
CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer |
432 |
CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
433 |
|
2 | 434 |
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch) |
435 |
# (See Rules.gmk) May need to wait for gcc 5? |
|
436 |
AUTOMATIC_PCH_OPTION = |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
437 |
|
2 | 438 |
else |
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
439 |
|
2 | 440 |
# Highest could be -xO5, but indications are that -xO5 should be reserved |
441 |
# for a per-file use, on sources with known performance impacts. |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
442 |
OPT_LEVEL/LOWER = 2 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
443 |
OPT_LEVEL/HIGHER = 4 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
444 |
OPT_LEVEL/HIGHEST = 4 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
445 |
|
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
446 |
CC_OPT/NONE = |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
447 |
CC_OPT/LOWER = $(OPT_LEVEL/LOWER:%=-xO%) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
448 |
CC_OPT/HIGHER = $(OPT_LEVEL/HIGHER:%=-xO%) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
449 |
CC_OPT/HIGHEST = $(OPT_LEVEL/HIGHEST:%=-xO%) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
450 |
|
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
451 |
CXX_OPT/NONE = |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
452 |
CXX_OPT/LOWER = $(OPT_LEVEL/LOWER:%=-xO%) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
453 |
CXX_OPT/HIGHER = $(OPT_LEVEL/HIGHER:%=-xO%) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
454 |
CXX_OPT/HIGHEST = $(OPT_LEVEL/HIGHEST:%=-xO%) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
455 |
|
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
456 |
# We need stack frames at all times |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
457 |
USE_XKEEPFRAME_OPTION = false |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
458 |
ifeq ($(USE_XKEEPFRAME_OPTION),true) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
459 |
|
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
460 |
# Unknown spelling on this option at this time (Maybe in SS13?) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
461 |
CC_XKEEPFRAME_OPTIONS = -xkeepframe |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
462 |
CXX_XKEEPFRAME_OPTIONS = -xkeepframe |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
463 |
|
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
464 |
else |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
465 |
|
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
466 |
# On X86, make sure tail call optimization is off |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
467 |
# The z and y are the tail call optimizations. |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
468 |
ifeq ($(ARCH_FAMILY), i586) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
469 |
ifeq ($(shell $(EXPR) $(CC_VER) \> 5.8), 1) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
470 |
# Somehow, tail call optimization is creeping in. |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
471 |
# Make sure it is off. |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
472 |
# WARNING: These may cause compiler warnings about duplicate -O options |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
473 |
CC_XKEEPFRAME_OPTIONS += -Wu,-O$(OPT_LEVEL/$(OPTIMIZATION_LEVEL))~yz |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
474 |
CXX_XKEEPFRAME_OPTIONS += -Qoption ube -O$(OPT_LEVEL/$(OPTIMIZATION_LEVEL))~yz |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
475 |
endif |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
476 |
endif |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
477 |
|
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
478 |
# On i586 we need to tell the code generator to ALWAYS use a |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
479 |
# frame pointer. |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
480 |
ifeq ($(ARCH_FAMILY), i586) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
481 |
# Note that in 5.7, this is done with -xregs=no%frameptr |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
482 |
ifeq ($(CC_VER), 5.5) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
483 |
# It's not exactly clear when this optimization kicks in, the |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
484 |
# current assumption is -xO4 or greater and for C++ with |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
485 |
# the -features=no%except option and -xO4 and greater. |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
486 |
# Bottom line is, we ALWAYS want a frame pointer! |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
487 |
CC_XKEEPFRAME_OPTIONS += -Wu,-Z~B |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
488 |
CXX_XKEEPFRAME_OPTIONS += -Qoption ube -Z~B |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
489 |
endif |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
490 |
ifeq ($(shell $(EXPR) $(CC_VER) \> 5.6), 1) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
491 |
# Do NOT use frame pointer register as a general purpose opt register |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
492 |
CC_OPT/NONE += -xregs=no%frameptr |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
493 |
CXX_OPT/NONE += -xregs=no%frameptr |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
494 |
CC_XKEEPFRAME_OPTIONS += -xregs=no%frameptr |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
495 |
CXX_XKEEPFRAME_OPTIONS += -xregs=no%frameptr |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
496 |
endif |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
497 |
endif |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
498 |
|
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
499 |
# Optimizer for sparc needs to be told not to do certain things |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
500 |
# related to frames or save instructions. |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
501 |
ifeq ($(ARCH_FAMILY), sparc) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
502 |
# Do not use save instructions instead of add instructions |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
503 |
# This was an optimization starting in SC5.0 that made it hard for us to |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
504 |
# find the "save" instruction (which got turned into an "add") |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
505 |
CC_XKEEPFRAME_OPTIONS += -Wc,-Qrm-s |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
506 |
CXX_XKEEPFRAME_OPTIONS += -Qoption cg -Qrm-s |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
507 |
# Don't allow tail call code optimization. Started in SC5.0. |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
508 |
# We don't like code of this form: |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
509 |
# save |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
510 |
# <code> |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
511 |
# call foo |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
512 |
# restore |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
513 |
# because we can't tell if the method will have a stack frame |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
514 |
# and register windows or not. |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
515 |
CC_XKEEPFRAME_OPTIONS += -Wc,-Qiselect-T0 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
516 |
CXX_XKEEPFRAME_OPTIONS += -Qoption cg -Qiselect-T0 |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
517 |
endif |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
518 |
|
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
519 |
endif |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
520 |
|
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
521 |
# Extra options used with HIGHEST |
2 | 522 |
# |
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
523 |
# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be |
2 | 524 |
# done with care, there are some assumptions below that need to |
525 |
# be understood about the use of pointers, and IEEE behavior. |
|
526 |
# |
|
527 |
# Use non-standard floating point mode (not IEEE 754) |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
528 |
CC_HIGHEST_EXTRAS += -fns |
2 | 529 |
# Do some simplification of floating point arithmetic (not IEEE 754) |
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
530 |
CC_HIGHEST_EXTRAS += -fsimple |
2 | 531 |
# Use single precision floating point with 'float' |
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
532 |
CC_HIGHEST_EXTRAS += -fsingle |
2 | 533 |
# Assume memory references via basic pointer types do not alias |
534 |
# (Source with excessing pointer casting and data access with mixed |
|
535 |
# pointer types are not recommended) |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
536 |
CC_HIGHEST_EXTRAS += -xalias_level=basic |
2 | 537 |
# Use intrinsic or inline versions for math/std functions |
538 |
# (If you expect perfect errno behavior, do not use this) |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
539 |
CC_HIGHEST_EXTRAS += -xbuiltin=%all |
2 | 540 |
# Loop data dependency optimizations (need -xO3 or higher) |
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
541 |
CC_HIGHEST_EXTRAS += -xdepend |
2 | 542 |
# Pointer parameters to functions do not overlap |
543 |
# (Similar to -xalias_level=basic usage, but less obvious sometimes. |
|
544 |
# If you pass in multiple pointers to the same data, do not use this) |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
545 |
CC_HIGHEST_EXTRAS += -xrestrict |
2 | 546 |
# Inline some library routines |
547 |
# (If you expect perfect errno behavior, do not use this) |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
548 |
CC_HIGHEST_EXTRAS += -xlibmil |
2 | 549 |
# Use optimized math routines |
550 |
# (If you expect perfect errno behavior, do not use this) |
|
551 |
# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
552 |
# CC_HIGHEST_EXTRAS += -xlibmopt |
2 | 553 |
ifeq ($(ARCH_FAMILY), sparc) |
554 |
# Assume at most 8byte alignment, raise SIGBUS on error |
|
555 |
### Presents an ABI issue with customer JNI libs? |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
556 |
####CC_HIGHEST_EXTRAS += -xmemalign=8s |
2 | 557 |
# Automatic prefetch instructions, explicit prefetch macros |
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
558 |
CC_HIGHEST_EXTRAS += -xprefetch=auto,explicit |
2 | 559 |
# Pick ultra as the chip to optimize to |
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
560 |
CC_HIGHEST_EXTRAS += -xchip=ultra |
2 | 561 |
endif |
562 |
ifeq ($(ARCH), i586) |
|
563 |
# Pick pentium as the chip to optimize to |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
564 |
CC_HIGHEST_EXTRAS += -xchip=pentium |
2 | 565 |
endif |
566 |
ifdef LIBRARY |
|
567 |
# The Solaris CBE (Common Build Environment) requires that the use |
|
568 |
# of appl registers be disabled when compiling a public library (or |
|
569 |
# a library that's loaded by a public library) on sparc. |
|
570 |
CFLAGS_REQUIRED_sparc += -xregs=no%appl |
|
571 |
CFLAGS_REQUIRED_sparcv9 += -xregs=no%appl |
|
572 |
endif |
|
573 |
ifeq ($(shell $(EXPR) $(CC_VER) \> 5.6), 1) |
|
574 |
# We MUST allow data alignment of 4 for sparc V8 (32bit) |
|
575 |
# Presents an ABI issue with customer JNI libs? We must be able to |
|
576 |
# to handle 4byte aligned objects? (rare occurance, but possible?) |
|
577 |
CFLAGS_REQUIRED_sparc += -xmemalign=4s |
|
578 |
endif |
|
579 |
# Just incase someone trys to use the SOS9 compilers |
|
580 |
ifeq ($(CC_VER), 5.6) |
|
581 |
# We MUST allow data alignment of 4 for sparc (sparcv9 is ok at 8s) |
|
582 |
CFLAGS_REQUIRED_sparc += -xmemalign=4s |
|
583 |
endif |
|
584 |
# Automatic precompiled header option to use (if COMPILE_APPROACH=batch) |
|
585 |
# (See Rules.gmk) The SS11 -xpch=auto* options appear to be broken. |
|
586 |
AUTOMATIC_PCH_OPTION = |
|
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
587 |
|
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
588 |
# Add in keep frame options |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
589 |
CC_OPT/LOWER += $(CC_XKEEPFRAME_OPTIONS) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
590 |
CC_OPT/HIGHER += $(CC_XKEEPFRAME_OPTIONS) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
591 |
CC_OPT/HIGHEST += $(CC_XKEEPFRAME_OPTIONS) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
592 |
CXX_OPT/LOWER += $(CXX_XKEEPFRAME_OPTIONS) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
593 |
CXX_OPT/HIGHER += $(CXX_XKEEPFRAME_OPTIONS) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
594 |
CXX_OPT/HIGHEST += $(CXX_XKEEPFRAME_OPTIONS) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
595 |
|
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
596 |
# Add in highest optimization settings |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
597 |
CC_OPT/HIGHEST += $(CC_HIGHEST_EXTRAS) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
598 |
CXX_OPT/HIGHEST += $(CC_HIGHEST_EXTRAS) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
599 |
|
2 | 600 |
endif |
601 |
||
917
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
602 |
# Default optimization settings based on level. |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
603 |
CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL)) |
75261da60fff
6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2
ohair
parents:
715
diff
changeset
|
604 |
CXX_OPT = $(CXX_OPT/$(OPTIMIZATION_LEVEL)) |
2 | 605 |
|
606 |
# Flags required all the time |
|
607 |
CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH)) |
|
608 |
||
609 |
# |
|
610 |
# Path and option to link against the VM, if you have to. Note that |
|
611 |
# there are libraries that link against only -ljava, but they do get |
|
612 |
# -L to the -ljvm, this is because -ljava depends on -ljvm, whereas |
|
613 |
# the library itself should not. |
|
614 |
# |
|
615 |
VM_NAME = server |
|
616 |
JVMLIB = -L$(LIBDIR)/$(LIBARCH)/$(VM_NAME) -ljvm |
|
617 |
JAVALIB = -ljava $(JVMLIB) |
|
618 |
||
619 |
# Part of INCREMENTAL_BUILD mechanism. |
|
620 |
# Compiler emits things like: path/file.o: file.h |
|
621 |
# We want something like: relative_path/file.o relative_path/file.d: file.h |
|
622 |
# In addition on Solaris, any include file starting with / is deleted, |
|
623 |
# this gets rid of things like /usr/include files, which never change. |
|
624 |
CC_DEPEND = -xM1 |
|
625 |
CC_DEPEND_FILTER = $(SED) -e '/:[ ]*[/]/d' -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g' | $(SORT) -u |
|
626 |
||
627 |
# Location of openwin libraries (do we really need this anymore?) |
|
628 |
OPENWIN_HOME = /usr/openwin |
|
629 |
OPENWIN_LIB = $(OPENWIN_HOME)/lib$(ISA_DIR) |
|
630 |
||
631 |
# Runtime graphics library search paths... |
|
632 |
OPENWIN_RUNTIME_LIB = /usr/openwin/lib$(ISA_DIR) |
|
633 |
AWT_RUNPATH = -R/usr/dt/lib$(ISA_DIR) -R$(OPENWIN_RUNTIME_LIB) |
|
634 |
||
635 |
# C++ Runtime library (libCrun.so), use instead of -lCrun. |
|
636 |
# Originally used instead of -lCrun to guarantee use of the system |
|
637 |
# .so version and not the .a or .so that came with the compilers. |
|
638 |
# With the newer compilers this could probably change back to -lCrun but |
|
639 |
# in general this is ok to continue to do. |
|
640 |
LIBCXX = /usr/lib$(ISA_DIR)/libCrun.so.1 |
|
641 |
||
5579
1a5e995a710b
6307603: [X11] Use RENDER extension for complex operations done in software
ceisserer
parents:
2398
diff
changeset
|
642 |
# JDK now requires Solaris 10, so pick up libm.so.2 |
1a5e995a710b
6307603: [X11] Use RENDER extension for complex operations done in software
ceisserer
parents:
2398
diff
changeset
|
643 |
LIBM = /usr/lib$(ISA_DIR)/libm.so.2 |
2 | 644 |
|
645 |
# Socket library |
|
646 |
LIBSOCKET = -lsocket |
|
647 |
||
5780 | 648 |
# Network Services library |
649 |
LIBNSL = -lnsl |
|
650 |
||
2 | 651 |
# GLOBAL_KPIC: If set means all libraries are PIC, position independent code |
652 |
# EXCEPT for select compiles |
|
653 |
# If a .o file is compiled non-PIC then it should be forced |
|
654 |
# into the RW data segment with a mapfile option. This is done |
|
655 |
# with object files which generated from .s files. |
|
656 |
# The -ztext enforces that no relocations remain in the text segment |
|
657 |
# so that it remains purely read-only for optimum system performance. |
|
658 |
# Some libraries may use a smaller size (13bit -Kpic) on sparc instead of |
|
659 |
# (32 bit -KPIC) and will override GLOBAL_KPIC appropriately. |
|
660 |
# |
|
661 |
PIC_CODE_LARGE = -KPIC |
|
662 |
PIC_CODE_SMALL = -Kpic |
|
663 |
ifndef TCOV_BUILD |
|
664 |
GLOBAL_KPIC = $(PIC_CODE_LARGE) |
|
665 |
CXXFLAGS_COMMON += $(GLOBAL_KPIC) |
|
666 |
CFLAGS_COMMON += $(GLOBAL_KPIC) |
|
667 |
LDFLAGS_COMMON += -ztext |
|
668 |
endif # TCOV_BUILD |
|
669 |
||
670 |
# If your platform has DPS, it will have Type1 fonts too, in which case |
|
671 |
# it is best to enable DPS support until such time as 2D's rasteriser |
|
672 |
# can fully handle Type1 fonts in all cases. Default is "yes". |
|
673 |
# HAVE_DPS should only be "no" if the platform has no DPS headers or libs |
|
674 |
# DPS (Displayable PostScript) is available on Solaris machines |
|
675 |
||
676 |
HAVE_DPS = yes |
|
677 |
||
678 |
# |
|
679 |
# Japanese manpages |
|
680 |
# |
|
681 |
JA_SOURCE_ENCODING = eucJP |
|
682 |
JA_TARGET_ENCODINGS = eucJP UTF-8 PCK |
|
683 |
||
684 |
# Settings for the JDI - Serviceability Agent binding. |
|
685 |
HOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH) |
|
686 |
SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX) |
|
687 |
INCLUDE_SA=true |
|
688 |