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