comparison build/linux/makefiles/sparcWorks.make @ 50:485d403e94e1

6452081: 3/4 Allow for Linux builds with Sun Studio Linux compilers Summary: (for Serguei) Allow for Linux builds with Sun Studio Linux compilers Reviewed-by: sspitsyn, ohair
author dcubed
date Wed, 12 Mar 2008 18:37:03 -0700
parents
children
comparison
equal deleted inserted replaced
49:31000d79ec71 50:485d403e94e1
1 #
2 # Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved.
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 #
19 # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
20 # CA 95054 USA or visit www.sun.com if you need additional information or
21 # have any questions.
22 #
23 #
24
25 #------------------------------------------------------------------------
26 # CC, CPP & AS
27
28 CPP = CC
29 CC = cc
30 AS = $(CC) -c
31
32 ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
33 ARCHFLAG/i486 = -m32
34 ARCHFLAG/amd64 = -m64
35
36 CFLAGS += $(ARCHFLAG)
37 AOUT_FLAGS += $(ARCHFLAG)
38 LFLAGS += $(ARCHFLAG)
39 ASFLAGS += $(ARCHFLAG)
40
41 #------------------------------------------------------------------------
42 # Compiler flags
43
44 # position-independent code
45 PICFLAG = -KPIC
46
47 CFLAGS += $(PICFLAG)
48 # no more exceptions
49 CFLAGS += -features=no%except
50 # Reduce code bloat by reverting back to 5.0 behavior for static initializers
51 CFLAGS += -features=no%split_init
52 # allow zero sized arrays
53 CFLAGS += -features=zla
54
55 # Use C++ Interpreter
56 ifdef CC_INTERP
57 CFLAGS += -DCC_INTERP
58 endif
59
60 # We don't need libCstd.so and librwtools7.so, only libCrun.so
61 CFLAGS += -library=Crun
62 LIBS += -lCrun
63
64 CFLAGS += -mt
65 LFLAGS += -mt
66
67 # Compiler warnings are treated as errors
68 #WARNINGS_ARE_ERRORS = -errwarn=%all
69 CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS)
70 # Special cases
71 CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@))
72
73 # The flags to use for an Optimized build
74 OPT_CFLAGS+=-xO4
75 OPT_CFLAGS/NOOPT=-xO0
76
77 #------------------------------------------------------------------------
78 # Linker flags
79
80 # Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file.
81 MAPFLAG = -Wl,--version-script=FILENAME
82
83 # Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj
84 SONAMEFLAG = -h SONAME
85
86 # Build shared library
87 SHARED_FLAG = -G
88
89 #------------------------------------------------------------------------
90 # Debug flags
91 DEBUG_CFLAGS += -g
92 FASTDEBUG_CFLAGS = -g0
93