author | trims |
Thu, 27 May 2010 19:08:38 -0700 | |
changeset 5547 | f4b087cbb361 |
parent 670 | ddf3e9583f2f |
child 7397 | 5b173b4ca846 |
permissions | -rw-r--r-- |
223
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
1 |
# |
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
670
diff
changeset
|
2 |
# Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. |
223
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
4 |
# |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
8 |
# |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
9 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
10 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
11 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
12 |
# version 2 for more details (a copy is included in the LICENSE file that |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
13 |
# accompanied this code). |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
14 |
# |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
15 |
# You should have received a copy of the GNU General Public License version |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
16 |
# 2 along with this work; if not, write to the Free Software Foundation, |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
17 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
18 |
# |
5547
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
670
diff
changeset
|
19 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
f4b087cbb361
6941466: Oracle rebranding changes for Hotspot repositories
trims
parents:
670
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:
670
diff
changeset
|
21 |
# questions. |
223
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
22 |
# |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
23 |
# |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
24 |
|
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
25 |
#------------------------------------------------------------------------ |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
26 |
# CC, CPP & AS |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
27 |
|
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
28 |
CPP = CC |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
29 |
CC = cc |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
30 |
AS = $(CC) -c |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
31 |
|
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
32 |
ARCHFLAG = $(ARCHFLAG/$(BUILDARCH)) |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
33 |
ARCHFLAG/i486 = -m32 |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
34 |
ARCHFLAG/amd64 = -m64 |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
35 |
|
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
36 |
CFLAGS += $(ARCHFLAG) |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
37 |
AOUT_FLAGS += $(ARCHFLAG) |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
38 |
LFLAGS += $(ARCHFLAG) |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
39 |
ASFLAGS += $(ARCHFLAG) |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
40 |
|
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
41 |
#------------------------------------------------------------------------ |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
42 |
# Compiler flags |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
43 |
|
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
44 |
# position-independent code |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
45 |
PICFLAG = -KPIC |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
46 |
|
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
47 |
CFLAGS += $(PICFLAG) |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
48 |
# no more exceptions |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
49 |
CFLAGS += -features=no%except |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
50 |
# Reduce code bloat by reverting back to 5.0 behavior for static initializers |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
51 |
CFLAGS += -features=no%split_init |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
52 |
# allow zero sized arrays |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
53 |
CFLAGS += -features=zla |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
54 |
|
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
55 |
# Use C++ Interpreter |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
56 |
ifdef CC_INTERP |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
57 |
CFLAGS += -DCC_INTERP |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
58 |
endif |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
59 |
|
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
60 |
# We don't need libCstd.so and librwtools7.so, only libCrun.so |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
61 |
CFLAGS += -library=Crun |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
62 |
LIBS += -lCrun |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
63 |
|
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
64 |
CFLAGS += -mt |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
65 |
LFLAGS += -mt |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
66 |
|
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
67 |
# Compiler warnings are treated as errors |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
68 |
#WARNINGS_ARE_ERRORS = -errwarn=%all |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
69 |
CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
70 |
# Special cases |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
71 |
CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
72 |
|
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
73 |
# The flags to use for an Optimized build |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
74 |
OPT_CFLAGS+=-xO4 |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
75 |
OPT_CFLAGS/NOOPT=-xO0 |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
76 |
|
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
77 |
#------------------------------------------------------------------------ |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
78 |
# Linker flags |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
79 |
|
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
80 |
# Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file. |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
81 |
MAPFLAG = -Wl,--version-script=FILENAME |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
82 |
|
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
83 |
# Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
84 |
SONAMEFLAG = -h SONAME |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
85 |
|
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
86 |
# Build shared library |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
87 |
SHARED_FLAG = -G |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
88 |
|
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
89 |
#------------------------------------------------------------------------ |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
90 |
# Debug flags |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
91 |
DEBUG_CFLAGS += -g |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
92 |
FASTDEBUG_CFLAGS = -g0 |
5c3b023117d9
6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers
dcubed
parents:
diff
changeset
|
93 |